Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

292
Vistas
Firestore: get list of documents (but no all) in a collection

Let's supose I have a collection containing several documents, each of them named as something like FIS01181, or INF01202 (three upper case letters followed by four digits). This collection may have perhaps a thousand of these docs, but for each user will only need 40 ou 50. So I though it would be an nice optimization if each access only downloaded just it needed.

I know I could loop through these 50 docs I needed and download them individually; I tried this but it got really slow. Perhaps downloading all of them at once would be faster, but again, a lot of waste of network traffic (besides the higher billing). The Firestore reference hints that there is a function for this named where, but I don't know if that is exactly what I'm looking for:

const q = query(collection(db, "cities"), where("capital", "==", true));

I want to have an array of document names, like let arrayOfDocs = ["FIS01181", "INF01202"]; and get all of them from Firebase at once. Is it possible?

Note: I am using version 9 of Firebase with Javascript.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda