[SERVER-3408] querying with a combination of $all and $exists does not work Created: 11/Jul/11  Updated: 08/Mar/13  Resolved: 26/Feb/13

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 1.8.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ed Shadi Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: $all, $exists, query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac OSX


Issue Links:
Duplicate
duplicates SERVER-3072 $all + expressions Backlog
Operating System: OS X
Participants:

 Description   

Given the following record in a collection named "tests":

{
name : "Testing",
values : [

{value1 : 123}

,

{value2 : 456}

]
}

This query returns the record:
db.tests.find({values : { $all : [

{value1 : 123 }

] } } )

This query does not return the record:
db.tests.find({values : { $all : [ {value1 :

{ $exists : true }

} ] } } )

That seems incorrect. Am I doing anything wrong or should this work?



 Comments   
Comment by Aaron Staple [ 25/Nov/12 ]

Nesting a match expression inside $all like this is not supported currently.

Generated at Thu Feb 08 03:02:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.