-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.0
-
Component/s: Index Maintenance
-
Query
-
Fully Compatible
-
ALL
This looks like a partial regression of SERVER-5777
My test:
Index: {a:1, date:-1}
2.2.x query:
find({a:{$in:[1,2]}}).limit(5).sort({date:-1})
correctly limits documents (nscanned and nscannedObject to 10).
find({a:{$in:[null,2]}}).limit(5).sort({date:-1})
same thing.
2.4.x query:
find({a:{$in:[1,2]}}).limit(5).sort({date:-1})
correctly limits to 10 docs.
find({a:{$in:[null,2]}}).limit(5).sort({date:-1})
scans all matching a documents without applying limit.