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

308
Vistas
Composite index firestore

I am using two different queries to order my data and putting a where clause. I need a composite index. I am also using limitToLast

const tradesRef = firebase
    .firestore()
    .collection("trades")
    .orderBy("time", "asc")
    .where("type", "==", "fiveMinutes")
    .limit(15);

I have created a composite index such as: New Composite Index

I am still getting this error:

console error

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The fields indexed seem to be correct but you are not running a collection group query so have you tried setting the query scope to just "Collection" instead of "Collection group"?

Also try deleting current index and creating new index directly using the link in error.

about 4 years ago · Juan Pablo Isaza Denunciar

0

As mentioned in the stackoverflow Answer :

Since you're querying on two fields (status and createDate), there needs to be a composite index on those two fields. Indices on individual fields are automatically created, but composite indexes are only created when you ask for them. The error message should contain a link directly to the console to complete that task. If that's not the case, you can create it here.

For more information related to how firestore manages indexes, you can refer to the documentation.

about 4 years ago · Juan Pablo Isaza Denunciar
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