You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
__name__ beeing stripped from firestore:indexes cmd #8758
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
Hey @glumb, thanks for the detailed report and for opening up a PR for this! Let me know if I may be wrong here, but I looked around other repositories and I think the code snippet you're using is something like:
Activity
Fix __name__ field beeing stripped from index listing
Fix __name__ field beeing stripped from index listing
aalej commentedon Jun 20, 2025
Hey @glumb, thanks for the detailed report and for opening up a PR for this! Let me know if I may be wrong here, but I looked around other repositories and I think the code snippet you're using is something like:
Which is similar to the code you provided in firebase/firebase-js-sdk#9097.
I was able to reproduce the issue using the code snippet you provided in the JS SDK repository. The generated index looks like
Running
firebase firestore:indexesoutputs{ "indexes": [ { "collectionGroup": "Auditlog", "queryScope": "COLLECTION", "fields": [ { "fieldPath": "tenantID", "order": "ASCENDING" }, { "fieldPath": "_meta.dateCreated", "order": "DESCENDING" } ] } ], "fieldOverrides": [] }Then deploying this to a different project outputs a different index

Looking at some of the issue we have, I think we can mark this as a duplicate of #7629. Could you link the PR you filed to that issue instead?
I'm closing this one as a duplicate, but please let me know if you think this is a different issue and needs to be reopened.
Fix __name__ field beeing stripped from index listing (#8761)