[SERVER-10956] Queries aren't covered when using 'true' or 'false' in projection (instead of '1' or '0') Created: 30/Sep/13  Updated: 30/Sep/13  Resolved: 30/Sep/13

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

Type: Bug Priority: Major - P3
Reporter: Eyal Roth Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 7 x64, MongoDB 2.4.5 (standalone)


Issue Links:
Duplicate
duplicates SERVER-3156 query projection spec using 'true' in... Closed
Operating System: ALL
Participants:

 Description   

Trying to execute a covered query using 'true' in the projection instead of '1' seems to make the query non-covered.

According to explain plans, the following query is covered:
db.coll.find({_id : "val"},{_id : 1})
But this one isn't:
db.coll.find({_id : "val"},{_id : true})

Same goes for the following queries where the collection has an index on the field 'a':
/covered/ db.coll.find(

{a : "val"}

,{_id : 0, a : 1})
/* non-covered */ db.coll.find(

{a : "val"}

,{_id : 0, a : true})
/* non-covered */ db.coll.find(

{a : "val"}

,{_id : false, a : 1})
/* non-covered */ db.coll.find(

{a : "val"}

,{_id : false, a : true})

Hinting the non-covered queries doesn't seem to help.


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