From cd0aeca87c313bfe65d6c9a80e75cdbbd589cda5 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Mon, 9 Jul 2018 12:20:05 -0400 Subject: [PATCH] Add suggested index to comments (#1740) --- models/schema/comment.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/models/schema/comment.js b/models/schema/comment.js index 7ae51ff41..bdc5bb2f8 100644 --- a/models/schema/comment.js +++ b/models/schema/comment.js @@ -163,6 +163,12 @@ Comment.index({ created_at: -1, }); +Comment.index({ + asset_id: 1, + parent_id: 1, + created_at: 1, +}); + Comment.index( { 'action_counts.flag': 1,