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

two-dimension Array $elemMatch bug

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.5
    • Component/s: Querying
    • Labels:
      None
    • ALL
    • Hide
      db.foo.insert({x:[{a:[[1,2]], b:[[3,4]]}], y:[{a:[[5,6]], b:[[7,8]]}]})
      db.foo.find({x:{$elemMatch:{a:{$elemMatch:{$in:[2]}}}}})
      
      Show
      db.foo.insert({x:[{a:[[1,2]], b:[[3,4]]}], y:[{a:[[5,6]], b:[[7,8]]}]}) db.foo.find({x:{$elemMatch:{a:{$elemMatch:{$in:[2]}}}}})

      like this query

        
      {
      	"fieldsValue" : {
      		  "$elemMatch" : {
       			"namePath" : {
      				"$elemMatch" : {
      					"$in" : ["some word"]
      				}
      			}
      		}
      	}
      }
      

      at 2.4.8 version can work ok,at 2.6.5 find nothing,not test other version

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            rendong rendong
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: