G
G
GF2020-07-19 13:34:35
MongoDB
GF, 2020-07-19 13:34:35

How to select multiple random non-duplicate records from mongoDB?

Subject. All I could find is this answer https://stackoverflow.com/questions/2824157/random... , but

As noted in the comments, when size is greater than 1, there may be duplicates in the returned document sample.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question