Complete the code to create a composite index for fields 'age' and 'score'.
firestore.indexes().create({fields: [{fieldPath: 'age'}, {fieldPath: '[1]'}]})The composite index must include both 'age' and 'score' fields to support queries filtering or ordering by these fields.
Complete the code to specify the direction of the composite index on 'age' as ascending.
firestore.indexes().create({fields: [{fieldPath: 'age', [1]: 'ASCENDING'}, {fieldPath: 'score', order: 'DESCENDING'}]})The correct property to specify the sort order in Firestore composite indexes is 'order'.
Fix the error in the composite index definition by completing the missing field name.
firestore.indexes().create({fields: [{fieldPath: 'age', order: 'ASCENDING'}, {fieldPath: '[1]', order: 'DESCENDING'}]})The composite index must include 'score' as the second field to match the query requirements.
Fill both blanks to create a composite index with 'city' ascending and 'population' descending.
firestore.indexes().create({fields: [{fieldPath: '[1]', order: 'ASCENDING'}, {fieldPath: '[2]', order: 'DESCENDING'}]})The composite index must have 'city' with ascending order and 'population' with descending order to support queries filtering or ordering by these fields.
Fill all three blanks to define a composite index with 'country' ascending, 'state' ascending, and 'city' descending.
firestore.indexes().create({fields: [{fieldPath: '[1]', order: 'ASCENDING'}, {fieldPath: '[2]', order: 'ASCENDING'}, {fieldPath: '[3]', order: 'DESCENDING'}]})This composite index supports queries filtering or ordering by 'country' and 'state' ascending, and 'city' descending.