Aggregate.prototype.addCursorFlag

Parameters
  • flag «String»
  • value «Boolean»
Returns:
  • «Aggregate» this
Type:
  • «property»

Sets an option on this aggregation. This function will be deprecated in a future release. Use the cursor(), collation(), etc. helpers to set individual options, or access agg.options directly.

Note that MongoDB aggregations do not support the noCursorTimeout flag, if you try setting that flag with this function you will get a “unrecognized field ‘noCursorTimeout’” error.