Randomly selects the specified number of documents from its input. Warning: $sample may output the same document more than once in its result set. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample
See Implementation
Randomly selects the specified number of documents from its input. Warning: $sample may output the same document more than once in its result set. MongoDB Documentation: https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#pipe._S_sample