Enumeration ProcessingMode

This controls how input and output documents are processed to meet different application needs. Each mode has different trade offs for; immutability, reference sharing, and performance.

Enumeration Members


Clone inputs prior to processing, and the outputs if some objects graphs may be shared. Use this option to keep input collection immutable and to get distinct output objects.

Note: This option is expensive and reduces performance.


Clones inputs prior to processing. This option will return output objects with shared graphs in their path if specific operators are used. Use this option to keep the input collection immutable.


Turn off cloning and modifies the input collection as needed. This option will also return output objects with shared paths in their graph when specific operators are used. This option provides the greatest speedup for the biggest tradeoff. When using the aggregation pipeline, you can use the "$out" operator to collect immutable intermediate results.



Clones the output to return distinct objects with no shared paths. This option modifies the input collection and during processing.

Generated using TypeDoc