Pipeline implementing the $sample stage.
$sample
The context used to generate this pipeline.
Changes the type of the returned document, with no type-safety.
Randomly selects size documents.
JSON representation of this pipeline.
Creates a new pipeline that expands on the current one by adding stage.
Writes the entire pipeline into writer.