From 8de8b40e30acda59ef2d64a2e8213828b745be64 Mon Sep 17 00:00:00 2001 From: loothero Date: Tue, 10 Sep 2024 16:30:03 +0000 Subject: [PATCH] add mongo indexes for new claim collections --- indexer/scripts/mongo-init/init-mongo.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/indexer/scripts/mongo-init/init-mongo.js b/indexer/scripts/mongo-init/init-mongo.js index 030f267ce..447e2dc94 100644 --- a/indexer/scripts/mongo-init/init-mongo.js +++ b/indexer/scripts/mongo-init/init-mongo.js @@ -38,3 +38,21 @@ db.scores.createIndex({ "_cursor.from": 1 }); db.scores.createIndex({ "_cursor.to": 1 }); db.scores.createIndex({ "xp": -1}); db.scores.createIndex({ "rank": -1}); + +// claimed free games +db.claimed_free_games.createIndex({ "_cursor.to": 1, "token": 1 }); +db.claimed_free_games.createIndex({ "_cursor.from": 1 }); +db.claimed_free_games.createIndex({ "_cursor.to": 1 }); +db.claimed_free_games.createIndex({ "token": 1}); +db.claimed_free_games.createIndex({ "gameOwnerAddress": 1, "token": 1 }) +db.claimed_free_games.createIndex({ "hash": 1 }) + +// collection totals +db.collection_totals.createIndex({ "_cursor.from": 1 }); +db.collection_totals.createIndex({ "_cursor.to": 1 }); + +// tokens +db.tokens.createIndex({ "_cursor.to": 1, "nftOwnerAddress": 1 }); +db.tokens.createIndex({ "_cursor.from": 1 }); +db.tokens.createIndex({ "_cursor.to": 1 }); +db.tokens.createIndex({ "nftOwnerAddress": 1 }); \ No newline at end of file