1

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 ..

Hitanshu Gogoi
  • 877
  • 2
  • 14
  • 21

1 Answers1

0

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

nypogi
  • 1,400
  • 7
  • 22
  • 39