Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

304
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!