Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

307
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda