Concept Flow - $out and $merge for writing results
Start Aggregation Pipeline
Process Documents
$out
Replace Target
Write Complete
End
The pipeline processes documents, then either replaces a collection with $out or merges results into a collection with $merge.