Adds Author Index for Comments

- Fixes #1529
This commit is contained in:
Wyatt Johnson
2018-04-17 12:31:31 -06:00
parent 87ffa45050
commit 87a97d4053
+11
View File
@@ -163,6 +163,17 @@ CommentSchema.index(
}
);
// Add an index that is optimized for finding a user's comments.
CommentSchema.index(
{
author_id: 1,
created_at: -1,
},
{
background: true,
}
);
// Add an index that is optimized for finding flagged comments.
CommentSchema.index(
{