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

key matching is not handled properly for the $elemMatch operator

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

      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 Aaron Staple
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: