Skip to content

Commit

Permalink
Add some indexes for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok committed Mar 23, 2016
1 parent 457cf15 commit 3662cd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rocketchat-lib/server/models/Messages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ RocketChat.models.Messages = new class extends RocketChat.models._Base
@_initModel 'message'

@tryEnsureIndex { 'rid': 1, 'ts': 1 }
@tryEnsureIndex { 'ts': 1 }
@tryEnsureIndex { 'editedAt': 1 }, { sparse: 1 }
@tryEnsureIndex { 'editedBy._id': 1 }, { sparse: 1 }
@tryEnsureIndex { 'rid': 1, 't': 1, 'u._id': 1 }
@tryEnsureIndex { 'expireAt': 1 }, { expireAfterSeconds: 0 }
@tryEnsureIndex { 'msg': 'text' }
@tryEnsureIndex { 'file._id': 1 }, { sparse: 1 }
@tryEnsureIndex { 'mentions.username': 1 }, { sparse: 1 }


# FIND ONE
Expand Down

0 comments on commit 3662cd3

Please sign in to comment.