Description:
This mode for $out allows users to update documents in the output collection. The updates will use the following semantics:
- match using the 'uniqueKey'
- upsert: true
- multi: false
- replacement style
Note that we do not guarantee an ordering of documents through the pipeline, and thus do not guarantee an ordering of the updates. This means that if the pipeline produces multiple documents with the same uniqueKey, the final resulting document is not guaranteed.
Engineering Ticket Description:
If an existing document already exists with the same unique key, the old document is replaced with the new one.