From ddc3c5ba6825786716f2fe2c0f591ae1abebacf9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 2 Nov 2018 12:49:18 +0900 Subject: [PATCH] Better index --- src/models/poll-vote.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/poll-vote.ts b/src/models/poll-vote.ts index 4d33b100e7..4390e000c3 100644 --- a/src/models/poll-vote.ts +++ b/src/models/poll-vote.ts @@ -2,6 +2,8 @@ import * as mongo from 'mongodb'; import db from '../db/mongodb'; const PollVote = db.get('pollVotes'); +PollVote.createIndex('userId'); +PollVote.createIndex('noteId'); export default PollVote; export interface IPollVote {