key matching is not handled properly for the $elemMatch operator

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Key matching is not implemented properly for $elemMatch. For now we should disable key matching with $elemMatch.

      Test:

      > c.drop()
      false
      > c.ensureIndex( { a:1 } )
      c>c.save( { a:[ { b:1 } ] } )
      > c.find( { a:{ $elemMatch:{ b:{ $gte:1 } } } } ).hint( { $natural:1 } )
      { "_id" : ObjectId("4fcd1f7c52eebdbb9f04430d"), "a" : [ { "b" : 1 } ] }
      > c.find( { a:{ $elemMatch:{ b:{ $gte:1 } } } } ).hint( { a:1 } )
      > 
      

              Assignee:
              Aaron Staple (Inactive)
              Reporter:
              Aaron Staple (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: