We've decided to go about this by adding a new aggregation stage: $sample. Given a positive integer, the stage will pseudo-randomly choose that number of documents from the incoming stream of documents, which is implicitly the entire collection when $sample is the first stage in the pipeline.
Picking a random item from a collection is used in many cases. For example, you want a random item from the collection photos. Currently this can be accomplished by counting the resulting query, computing a random index within that count, and then getting that item with that random index.
A easier approach would be requesting a random item directly from mongo given a query
// this would act like .next() but instead would simply return a random item that matches the query
// this would act just like find_one, except it would return a random item that matches the query