Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
None
-
None
Description
On http://docs.mongodb.org/manual/applications/indexes/ page,
emphasize and clarify the last sentence:
To ensure that a query is covered, create an index that includes all the fields listed in the query result and the query document. This means that if the index does not include the _id field, the projection document, which specifies the fields MongoDB returns, must explicitly exclude the _id field from the result set.
Also, clarify the second example -->
{ user: 1 }is same as
{ user:1, _id: 1 }