Add index for analytics server log collection

Created on live analytics server as well.
This commit is contained in:
Matt Lott 2016-02-09 16:50:51 -08:00
parent 06436a4bb7
commit 61d2ce3dc5

View file

@ -18,6 +18,7 @@ AnalyticsLogEventSchema = new mongoose.Schema({
AnalyticsLogEventSchema.index({event: 1, _id: -1})
AnalyticsLogEventSchema.index({event: 1, 'properties.level': 1})
AnalyticsLogEventSchema.index({event: 1, 'properties.levelID': 1})
AnalyticsLogEventSchema.index({user: 1, event: 1})
AnalyticsLogEventSchema.statics.logEvent = (user, event, properties={}) ->