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
  • 957
  • 3
  • 15
  • 24

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.

Ny Regency
  • 1,620
  • 8
  • 25
  • 43