Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1678

Query on a field of deep nested arrays and dictionaries don't find all document

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.6.1
    • Querying
    • None
    • ALL

    Description

      I've got this 3 document in a collection: http://pastie.org/1114659 , and I have these query objects:

      {'fields.5.3.0': 31}

          (nº1)

      {'fields.5.6.0': 31}

          (nº2)
      The first two document differs only in the name of a key (I changed it from "3" to "6"), and the third is like the first only with one nested dictionary less.
      Obviously, the query nº1 should match the 1st and the 3rd document, and the nº2 should match the 2nd document, but:
      > db.bug.find(

      {'fields.5.3.0': 31}

      ).count()
      1
      (instead of 2)
      > db.bug.find(

      {'fields.5.6.0': 31}

      ).count()
      1
      (it seems corrent)

      Am I mistaking somewhere?

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            kosii kosii
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: