-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.7, 2.5.3
-
Component/s: Querying
This seems like an inconsistency. I'd assume that {a: {$gte: X}} should return a superset of {a: X} for all values of X. However this doesn't hold for arrays:
> db.z.drop() true > db.z.insert({a:[1,2]}) > db.z.find({a:[1,2]}) { "_id" : ObjectId("526aa2fad081e73cd00ecfd9"), "a" : [ 1, 2 ] } > db.z.find({a:{$gte:[1,2]}}) >
- duplicates
-
SERVER-2841 matcher does not match arrays in inequalities to themselves
- Closed
- is duplicated by
-
SERVER-11444 $lt/$lte/$gte/$gt behaves differently with array operand
- Closed
- related to
-
SERVER-11406 Change in behavior on how $gte work with an array as a parameter
- Closed