Enum MergeStageWhenNotMatched
The behavior of $merge if a result document does not match an existing document in the output collection.
public enum MergeStageWhenNotMatched
Fields
Insert = 0
Insert the document into the output collection.
Discard = 1
Discard the document; i.e. $merge does not insert the document into the output collection.
Fail = 2
Stop and fail the aggregation operation. Any changes to the output collection from previous documents are not reverted.