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

range query breaks on nested documents after creating an index

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      reported by raphael marvie on the list:

      >>> db.foo.save({"x": [{"y": [

      {"z": 1}

      ,

      {"z": 2}

      ]}]})
      ObjectId('\xf9\xea\xde\xad\xa8\xc7:\xe0\x83\xf2\x04\xdd')
      >>> db.foo.save({"x": [{"y": [

      {"z": 12}

      ,

      {"z": 2}

      ]}]})
      ObjectId('eL\x1f\x8e\xfc\x1a\x06^\x0cL\xf7\xe3')
      >>> db.foo.find({"x.y.z": {"$gt": 10, "$lt": 20}}).count()
      1
      >>> db.foo.ensure_index("x.y.z", 1)
      u'x.y.z_1'
      >>> db.foo.find({"x.y.z": {"$gt": 10, "$lt": 20}}).count()
      0

      Attachments

        Activity

          People

            aaron Aaron Staple
            mike Michael Dirolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: