From 5fb2a358ad21447e300ed298938eff1c05376259 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 4d33b100e..4390e000c 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 {