Closed as duplicate of#7629
Description
Why it matters
The issue is that some queries require a non standard __name__
sorting, like
const query = await db.collection("Auditlog")
.where("tenantID", "in", ["IeZfE0yKWs0kGBl1IG5M"])
.orderBy("_meta.dateCreated", "desc")
.limit(50)
.get();
wants me to create this index (maybe this is another bug? as I read that the name shall automatically sort according to the last sort in the index)
When I now create this index online in the firebase console, download the indexes via the client and redeploy them to another project, the __name__
sorting information got lost, as its now creating an index sorting by DESCENDING for __name__
[REQUIRED] Environment info
firebase-tools: 14.7.0
Platform: macOS
[REQUIRED] Test case
just call firebase firestore:indexes
. the __name__
field is stripped
[REQUIRED] Steps to reproduce
- have an index in firestore
- call
firebase firestore:indexes
. - the
__name__
field is stripped
[REQUIRED] Expected behavior
__name__
is present
[REQUIRED] Actual behavior
the __name__
field is stripped due to
firebase-tools/src/firestore/api.ts
Lines 187 to 191 in 843b6b4