[SERVER-4518] match nested fields of index keys Created: 18/Dec/11  Updated: 06/Dec/22  Resolved: 13/Aug/18

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Aaron Staple Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4408 _id index should be used for find que... Backlog
Assigned Teams:
Query
Participants:

 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});


Generated at Thu Feb 08 03:06:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.