Skip to content

Fixed possible incorrect result in $unwind docs #1818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

balupton
Copy link

@balupton balupton commented Jun 4, 2014

The original result implies that the "tags" field was set to the unintuitive ["fun", "good", "fun"], would be better to imply it was set to ["fun", "good", "awesome"] instead — which is what this change does.

Alternatively, and perhaps more usefully, it would be good to see two blog posts, the first using fun and good, the second using just fun.

The original result implies that the "tags" field was set to the unintuitive `["fun", "good", "fun"]`, would be better to imply it was set to `["fun", "good", "awesome"]` instead — which is what this change does.

Alternatively, and perhaps more usefully, it would be good to see two blog posts, the first using fun and good, the second using just fun.
@kay-kim
Copy link
Contributor

kay-kim commented Jun 4, 2014

Hi -- thank you so much for your contribution as well as your thoughtful explanation.
I think that the original intent of the existing example was to show that even if the array contains duplicate elements, the $unwind operator treats each element as distinct.

As such we will close this pull request. However, we do have a rewrite of the aggregation documentation (https://jira.mongodb.org/browse/DOCS-2981) and as we progress, we'll keep in mind your comment and at the minimum, show the original document before we run the aggregate method.

Regards,

Kay Kim

@kay-kim kay-kim closed this Jun 4, 2014
mongo-cr-bot pushed a commit that referenced this pull request Sep 9, 2022
mongodb-server-docs-sync-bot bot pushed a commit that referenced this pull request Jun 26, 2025
* (DOCSP-43127): Backports DOCSP-42290 to v1.27. (#1818)
* Update sample files from MEKO (#1825)
* Fixing a build error post migration to next gen (#1824)

---------

Co-authored-by: Corry Root <[email protected]>
Co-authored-by: mircea-cosbuc <[email protected]>
mongodb-server-docs-sync-bot bot pushed a commit that referenced this pull request Jun 26, 2025
* (DOCSP-43127): Backports DOCSP-42290 to v1.27. (#1818)
* Update sample files from MEKO (#1825)
* Fixing a build error post migration to next gen (#1824)

---------

Co-authored-by: Corry Root <[email protected]>
Co-authored-by: mircea-cosbuc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants