-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
This page: http://docs.mongodb.org/master/core/multikey-index-bounds/
It should mention the following limitation. If there is a compound multi-key index including a non-array field, then if this field is queried (and even if it's a leading field in the index and if queried alone with no array field) then MongoDB will not be able to intersect the bounds properly. And $elemMatch will not help because it is designed to work with array fields only.
The only workaround is to create a non-multi key index on the non-array field and use that for the range queries.
The situation is explained in detail in SERVER-6720.
- is related to
-
DOCS-8120 3.4 per-field multikey tracking
- Closed
- related to
-
SERVER-15086 Allow for efficient range queries over non-array fields in multikey indices
- Closed