From 7fb101f96eb199de08e47a50d9c886e1ae446c32 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Fri, 8 Oct 2021 15:54:25 +0200 Subject: [PATCH] DOCS-14827: $merge and partial indexes --- source/reference/operator/aggregation/merge.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/reference/operator/aggregation/merge.txt b/source/reference/operator/aggregation/merge.txt index 3bba3d14447..fd1ca57fd78 100644 --- a/source/reference/operator/aggregation/merge.txt +++ b/source/reference/operator/aggregation/merge.txt @@ -184,6 +184,9 @@ The :pipeline:`$merge` takes a document with the following fields: - The unique index can be a :ref:`sparse ` index. + - The unique index cannot be a :ref:`partial ` + index. + - For output collections that already exist, the corresponding index must already exist. @@ -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 ` 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 ` 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