From e3069741e8373a2b20ee5be044ecd2fe9c0d1b75 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 4 Mar 2019 19:26:05 +0900 Subject: [PATCH] Add indexes --- src/models/log.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/log.ts b/src/models/log.ts index f74332e94..6f79e83c7 100644 --- a/src/models/log.ts +++ b/src/models/log.ts @@ -3,6 +3,8 @@ import db from '../db/mongodb'; const Log = db.get('logs'); Log.createIndex('createdAt', { expireAfterSeconds: 3600 * 24 * 3 }); +Log.createIndex('level'); +Log.createIndex('domain'); export default Log; export interface ILog {