Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

delete_spam_1

Modify these:

 

...

Remove _type_1_commentable_id_1_context_1_pinned_-1_created_at_-1

Code Block
{
        "v" : 1,
        "key" : {
            "_type" : 1,
            "commentable_id" : 1,
            "context" : 1,
            "pinned" : -1,
            "created_at" : -1
        },
        "name" : "_type_1_commentable_id_1_context_1_pinned_-1_created_at_-1",
        "ns" : "comments-prod.contents",
        "background" : true
    },

and re add as,

Code Block
db.contents.ensureIndex({"_type":-1, "commentable_id": -1, "course_id":1, "context":1, "pinned":-1, "created_at":-1}, "pinned" : {"background":true})

Add these:

Code Block
db.contents.ensureIndex({"_type":-1, "course_id":1, "pinned":-1, "endorsed": -1, "last_activity_at" : -1, "created_at": -1}, {"background":true})
Code Block
db.contents.ensureIndex({"_type" : -1, "course_id" : 1, "pinned" : -1, "endorsed": -1, "votes.point" : -1, "created_at": -1}, {"background":true})
Code Block
db.contents.ensureIndex({"_type" : -1, "course_id" : 1, "pinned" : -1, "endorsed": -1, "comment_count" : -1, "created_at": -1}, {"background":true})