Skip to content
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
7 changes: 5 additions & 2 deletions source/reference/operator/aggregation/merge.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ The :pipeline:`$merge` takes a document with the following fields:
- The unique index can be a :ref:`sparse <index-type-sparse>`
index.

- The unique index cannot be a :ref:`partial <index-type-partial>`
index.

- For output collections that already exist, the corresponding
index must already exist.

Expand Down Expand Up @@ -517,10 +520,10 @@ The ``newrestaurants`` collection will contain documents with
information on new restaurant openings by month (``date`` field) and
postcode (shard key); specifically, the :ref:`on <merge-on>`
identifier is ``["date", "postcode"]`` (the ordering of the fields
does not matter). Because :pipeline:`$merge` requires a unique,
does not matter). Because :pipeline:`$merge` requires a unique
index with keys that correspond to the :ref:`on
<merge-on>` identifier fields, create the unique index
(the ordering of the fields do not matter): [#uniqueoption]_
(the ordering of the fields do not matter): [#uniqueoption]_

.. code-block:: javascript

Expand Down