[DOCS-1185] Clarify that _id field is included in results if not explicitly excluded. Created: 01/Mar/13  Updated: 25/Mar/13  Resolved: 25/Mar/13

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 10 years, 47 weeks, 2 days ago

 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 }

 Comments   
Comment by Kay Kim (Inactive) [ 25/Mar/13 ]

forgot to close this earlier

Comment by auto [ 22/Mar/13 ]

Author:

{u'date': u'2013-03-21T15:05:12Z', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-1185 clarify _id and projection doc

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/fbeb2829a4d459263d1e95c025e2826bc483d58a

Generated at Thu Feb 08 07:40:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.