collect
Requests AggregateFlow to start streaming data according to the specified aggregation pipeline.
If the aggregation pipeline ends with an
$out
or$merge
stage, then finds all documents in the affected namespace and emits them. You may want to use toCollection instead.Otherwise, emits no values.