From e5747e0cb657d6cc906eea4df29cded9cdedc22e Mon Sep 17 00:00:00 2001 From: Julian Beisert Date: Thu, 12 Nov 2020 17:00:39 +0100 Subject: [PATCH] feat(index): add compound index to applicationID and closed --- src/whisp/whisp.schema.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/whisp/whisp.schema.ts b/src/whisp/whisp.schema.ts index d5564b1f1..ae9e7f828 100644 --- a/src/whisp/whisp.schema.ts +++ b/src/whisp/whisp.schema.ts @@ -25,4 +25,6 @@ export const whispSchema = new mongoose.Schema({ ], }); +whispSchema.index({ applicationID: 1, closed: -1 }); + mongoose.model('Whisp', whispSchema);