[SERVER-84929] Review MongoDB Manual Page /manual/reference/operator/projection/elemMatch/ Created: 31/Jan/14  Updated: 12/Jan/24  Resolved: 25/Feb/14

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

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: David Storch
Resolution: Done Votes: 0
Labels: audit-2014, audit-content, audit-nav
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Hello,

To ensure that the documentation remains accurate and up to date, we're asking a group of engineers and solutions architects to review content from the MongoDB Manual to ensure that the content is accurate, addresses the core consideration of potential users, and presents sensible recommendations.

This issue addresses the single page:

http://docs.mongodb.org/manual/reference/operator/projection/elemMatch/

As you review the documentation, consider four major dimensions:

1. The correctness and completeness of the content.

2. The utility of the content for new users of MongoDB.

3. The utility of the content for expert users of MongoDB.

4. The organization of the page and its focus on the important aspects of the content.

When you complete your review of the page please fill out the documentation audit survey.

If you have additional questions or would like to make additional changes, please create a DOCS ticket or leave a comment on this ticket.

Thank you for your time and effort, and for your help in improving the documentation.

Regards,

the docs team



 Comments   
Comment by David Storch [ 31/Jan/14 ]

Overall this page looks really good. I always get confused about $elemMatch, and this is a very clear explanation of what $elemMatch projection is supposed to do.

That said, the very last part of the page, starting with the quote below, may be misleading.

When the find() method includes a sort(), the find() method applies the sort() to order the matching documents before it applies the projection.

I think $elemMatch projection is actually orthogonal to .sort() because $elemMatch depends on the ordering of subdocuments within an array whereas .sort() is about the order in which the top-level documents are returned. Setting a .sort() will change the order in which documents are returned, but it should not affect which array elements are projected through $elemMatch projection. Assuming that I'm not missing something, it seems like we can just delete the part of the page discussing .sort().

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