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_ALL: "CLONE_ALL"

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.

CLONE_INPUT: "CLONE_INPUT"

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.

CLONE_OFF: "CLONE_OFF"

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.

Default


CLONE_OUTPUT: "CLONE_OUTPUT"

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