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

key matching is not handled properly for the $elemMatch operator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.2
    • Component/s: None
    • Labels:
      None
    • Operating System:
      ALL

      Description

      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 } )
      > 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aaron Aaron Staple
              Reporter:
              aaron Aaron Staple
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: