mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
Merge pull request #1531 from coralproject/indexes
Adds Author Index for Comments
This commit is contained in:
@@ -187,6 +187,17 @@ Comment.index(
|
||||
}
|
||||
);
|
||||
|
||||
// Add an index that is optimized for finding a user's comments.
|
||||
Comment.index(
|
||||
{
|
||||
author_id: 1,
|
||||
created_at: -1,
|
||||
},
|
||||
{
|
||||
background: true,
|
||||
}
|
||||
);
|
||||
|
||||
// Optimize for tag searches/counts.
|
||||
Comment.index(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user