Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
Query
Description
Say I do this:
c.ensureIndex({a:1});
|
c.save({a:{b:1}});
|
Right now I can match the following using the index key:
c.find({a:{b:1}});
|
But I can't match the following at the index level; I need to load 'b' from the full document.
c.find({'a.b':1});
|
Since the 'b' field is inside the index key, we could extract it for matching.
Would need to make sure we test handling of multikey cases correctly, so for example:
c.save({a:[{b:1},{c:2}]});
|
c.find({'a.b':1,'a.c':2});
|
Attachments
Issue Links
- duplicates
-
SERVER-4408 _id index should be used for find queries against nested fields of the _id object
-
- Backlog
-