Skip to content

SERVER-6131 Describe new behavior when $unwind is applied to missing and... #71

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

Merged
merged 1 commit into from
Jul 14, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions source/reference/aggregation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,15 @@ The current pipeline operators are:
:pipeline:`$group` pipeline operators.

- If you specify a target field for :pipeline:`$unwind` that
does not exist in an input document, the document passes
through :pipeline:`$unwind` unchanged.
does not exist in an input document, the input document is
ignored (generates no result documents).

- If you specify a target field for :pipeline:`$unwind` that is
not an array, :mongodb:func:`aggregate()` generates an error.

- If you specify a target field for :pipeline:`$unwind` that
holds an empty array (``[]``), then that field is removed
from the result while all other fields are passed through
unchanged.
holds an empty array (``[]``) in an input document, the input
document is ignored (generates no result documents).

.. pipeline:: $group

Expand Down