1
votes

I have 1000 documents in a single collection in Cloud Firestore, is it possible to fetch random documents?

example I collection named as "user" where i save all user data and now my question is that how can i select randomly one or more user from the database ..

1
Please check my answer over here: stackoverflow.com/a/61895031/4700001 - Banana droid

1 Answers

0
votes

Suggestion: Collate all document names in your collection. Store it in some list. Do your randomization on that list and fetch that specific document.