0

I have an array of users IDs under my current user object..i want to get all those members from my "members" collection whose IDs is in my array.

  1. Is there any way to query specific documents with specific IDs (more then one IDs)?
  2. Is firestore pipeline request can handle this case, if yes then how ?
  3. Is this approach is good if use pipeline technique?
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Yasir Ali
  • 155
  • 1
  • 11
  • In the client-side SDKs for Firestore there is no way to retrieve multiple documents by their Id with a single call. See https://stackoverflow.com/questions/46721517/google-firestore-how-to-get-document-by-multiple-ids-in-one-round-trip – Frank van Puffelen Apr 19 '19 at 14:37
  • @FrankvanPuffelen so pipelining all document request is the only solution for this? – Yasir Ali Apr 19 '19 at 14:42
  • With the Android SDK that is indeed the way to go. It's quite common, and not nearly as slow as you may think when applied to a number of documents that you'd reasonably expect to process in a mobile app. For server-side, see https://stackoverflow.com/a/48423626. – Frank van Puffelen Apr 19 '19 at 14:55
  • Thanks @FrankvanPuffelen pipelining is really fast i just implemented it. – Yasir Ali Apr 19 '19 at 14:57

0 Answers0