-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.6.5
-
Component/s: Index Maintenance, Querying
-
None
-
Environment:Linux 32bit, MongoDB 1.6.5
-
ALL
When $all is combined with other operators (ie: $in, $gt, $lt), the results are not the expected.
Example:
Having these 9 documents:
> db.x.find({x:{ $in: ["a","b"] }}); return all the documents
having "a" or "b" as values of the x array - 8 documents (just
the 9th document is excluded).
> db.x.find({x:{ $all: ["c"] }}); return all the documents
having "c" as value of the x array, - 5 documents (the 3, 6, 7,
8 and 9).
> db.x.find({x:{ $in: ["a","b"], $all: ["c"] }}); should return all the documents having "a" or "b" as values and having "c" as value (the 3, 6, 7 and 8) - the intersection of both queries. Instead, return nothing.
mongodb-user theread: http://groups.google.com/group/mongodb-user/browse_thread/thread/4033cd8335f7261e
- duplicates
-
SERVER-2165 $in and $all don't work together
- Closed