From b151cd99119e6d0c93008ee02afb57ae37d5052b Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 5 Feb 2024 15:27:06 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=87=20refactor(convoSchema):=20index?= =?UTF-8?q?=20`updatedAt`=20field=20(#1732)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/models/schema/convoSchema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/models/schema/convoSchema.js b/api/models/schema/convoSchema.js index a282287ecc..4810f68321 100644 --- a/api/models/schema/convoSchema.js +++ b/api/models/schema/convoSchema.js @@ -55,7 +55,7 @@ if (process.env.MEILI_HOST && process.env.MEILI_MASTER_KEY) { }); } -convoSchema.index({ createdAt: 1 }); +convoSchema.index({ createdAt: 1, updatedAt: 1 }); const Conversation = mongoose.models.Conversation || mongoose.model('Conversation', convoSchema);