Skip to content

Extend 2.6 release notes for $out #1246

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
Closed
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
16 changes: 14 additions & 2 deletions source/release-notes/2.6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,20 @@ Aggregation Pipeline Changes
:pipeline:`$out`.

:pipeline:`$out` will create a new collection if one does not
already exist in the current database.

already exist in the current database. This collection will not be
visible at that name until the aggregation completes. If the aggregation
fails part-way through, no collection will be created.

If the output collection already exists, the behavior is the same
as MapReduce's replace mode. To be specific if the aggregation completes
successfully, the output collection will be atomically replaced by a newer
version. Any indexes that existed at the start of the aggregation on the
original output collection will also exist on the new collection.
Importantly, this means that the pipeline will error out if the output
documents would violate any unique indexes (including _id) that existed
on the original output collection.


You may *only* specify :pipeline:`$out` at the end of a pipeline.

.. example::
Expand Down