[SERVER-36931] Handle returnKey option for $** indexes Created: 29/Aug/18  Updated: 29/Oct/23  Resolved: 21/Sep/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.1.3

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Yuta Arai
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-36198 Enable $** index builds by default in... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-09-24, Query 2018-10-08
Participants:

 Description   

At the moment, returnKey with an all paths index causes the query to fail uncleanly. This can be reproduced as follows:

db.c.drop();
db.c.createIndex({"$**": 1});
db.c.insert({a: 1});
db.c.find({a: 1}).hint({"$**": 1}).returnKey().itcount();



 Comments   
Comment by Githook User [ 21/Sep/18 ]

Author:

{'name': 'yarai', 'email': 'yuta.arai@10gen.com', 'username': 'yarai'}

Message: SERVER-36931 Handle returnKey option for $** indexes
Branch: master
https://github.com/mongodb/mongo/commit/fc75cfdf2e8f97572efd97a348893ba08a82276a

Generated at Thu Feb 08 04:44:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.