{"id":"090d9ce9-8c22-4632-8451-e43015a9ef38","task":"Create a Firestore composite index to support multi-field queries with ordering","domain":"firebase.google.com","steps":["Attempt the query in your app; if a composite index is required, Firestore returns an error with a direct link to create the index in the Firebase console — click that link as the fastest path.","Alternatively, define the index in `firestore.indexes.json`: add an entry under `indexes` with `collectionGroup`, `queryScope`, and the `fields` array specifying each field and its `order` (ASCENDING or DESCENDING).","Deploy the index with the Firebase CLI: `firebase deploy --only firestore:indexes`.","Monitor index build status in the Firebase console under Firestore > Indexes; large collections can take minutes to hours.","Once the index status is 'Enabled', re-run your query to confirm it executes without error."],"gotchas":["Firestore automatically creates single-field indexes; composite indexes are only needed when filtering or ordering on multiple fields simultaneously.","There is a limit on the number of composite indexes per database — audit and delete unused indexes to stay within the quota.","An `array-contains` filter on a field combined with ordering on a different field always requires a composite index."],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:41:57.021Z"},"url":"https://mcp.waymark.network/r/090d9ce9-8c22-4632-8451-e43015a9ef38"}