From 5c2ef26943d402d32526ae56627beaac3ec244c9 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 12 Oct 2022 12:29:39 -0700 Subject: [PATCH] Update firestore.indexes.json --- firestore.indexes.json | 268 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 254 insertions(+), 14 deletions(-) diff --git a/firestore.indexes.json b/firestore.indexes.json index 2b7ef839..6eb2627c 100644 --- a/firestore.indexes.json +++ b/firestore.indexes.json @@ -100,20 +100,6 @@ } ] }, - { - "collectionGroup": "comments", - "queryScope": "COLLECTION", - "fields": [ - { - "fieldPath": "userId", - "order": "ASCENDING" - }, - { - "fieldPath": "createdTime", - "order": "ASCENDING" - } - ] - }, { "collectionGroup": "comments", "queryScope": "COLLECTION_GROUP", @@ -142,6 +128,20 @@ } ] }, + { + "collectionGroup": "comments", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "userId", + "order": "ASCENDING" + }, + { + "fieldPath": "createdTime", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "contracts", "queryScope": "COLLECTION", @@ -188,6 +188,56 @@ } ] }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "creatorId", + "order": "ASCENDING" + }, + { + "fieldPath": "resolution", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "creatorId", + "order": "ASCENDING" + }, + { + "fieldPath": "uniqueBettorCount", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "groupSlug", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "isResolved", + "order": "ASCENDING" + }, + { + "fieldPath": "visibility", + "order": "ASCENDING" + }, + { + "fieldPath": "popularityScore", + "order": "DESCENDING" + } + ] + }, { "collectionGroup": "contracts", "queryScope": "COLLECTION", @@ -206,6 +256,34 @@ } ] }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "groupSlugs", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "popularityScore", + "order": "DESCENDING" + } + ] + }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "groupSlugs", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "probChanges.day", + "order": "ASCENDING" + } + ] + }, { "collectionGroup": "contracts", "queryScope": "COLLECTION", @@ -274,6 +352,24 @@ } ] }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "isResolved", + "order": "ASCENDING" + }, + { + "fieldPath": "visibility", + "order": "ASCENDING" + }, + { + "fieldPath": "createdTime", + "order": "DESCENDING" + } + ] + }, { "collectionGroup": "contracts", "queryScope": "COLLECTION", @@ -474,6 +570,62 @@ } ] }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "uniqueBettorIds", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "popularityScore", + "order": "DESCENDING" + } + ] + }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "uniqueBettorIds", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "probChanges.day", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "contracts", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "uniqueBettorIds", + "arrayConfig": "CONTAINS" + }, + { + "fieldPath": "probChanges.day", + "order": "DESCENDING" + } + ] + }, + { + "collectionGroup": "groups", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "anyoneCanJoin", + "order": "ASCENDING" + }, + { + "fieldPath": "totalMembers", + "order": "DESCENDING" + } + ] + }, { "collectionGroup": "manalinks", "queryScope": "COLLECTION", @@ -530,6 +682,34 @@ } ] }, + { + "collectionGroup": "txns", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "toId", + "order": "ASCENDING" + }, + { + "fieldPath": "createdTime", + "order": "ASCENDING" + } + ] + }, + { + "collectionGroup": "txns", + "queryScope": "COLLECTION", + "fields": [ + { + "fieldPath": "toId", + "order": "ASCENDING" + }, + { + "fieldPath": "createdTime", + "order": "DESCENDING" + } + ] + }, { "collectionGroup": "txns", "queryScope": "COLLECTION", @@ -778,6 +958,66 @@ } ] }, + { + "collectionGroup": "groupContracts", + "fieldPath": "contractId", + "indexes": [ + { + "order": "ASCENDING", + "queryScope": "COLLECTION" + }, + { + "order": "DESCENDING", + "queryScope": "COLLECTION" + }, + { + "arrayConfig": "CONTAINS", + "queryScope": "COLLECTION" + }, + { + "order": "ASCENDING", + "queryScope": "COLLECTION_GROUP" + }, + { + "order": "DESCENDING", + "queryScope": "COLLECTION_GROUP" + }, + { + "arrayConfig": "CONTAINS", + "queryScope": "COLLECTION_GROUP" + } + ] + }, + { + "collectionGroup": "groupMembers", + "fieldPath": "userId", + "indexes": [ + { + "order": "ASCENDING", + "queryScope": "COLLECTION" + }, + { + "order": "DESCENDING", + "queryScope": "COLLECTION" + }, + { + "arrayConfig": "CONTAINS", + "queryScope": "COLLECTION" + }, + { + "order": "ASCENDING", + "queryScope": "COLLECTION_GROUP" + }, + { + "order": "DESCENDING", + "queryScope": "COLLECTION_GROUP" + }, + { + "arrayConfig": "CONTAINS", + "queryScope": "COLLECTION_GROUP" + } + ] + }, { "collectionGroup": "portfolioHistory", "fieldPath": "timestamp",