summaryrefslogtreecommitdiff
path: root/src/models/note.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-16 15:23:03 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-16 15:23:03 +0900
commit9cac293efc5433f6a2efc7ec7ae3f5244bcfbd0d (patch)
treeb56ffaea869314c44e839a7976d901bdfa202da3 /src/models/note.ts
parentnpm install --only=dev するのが既存のドキュメントと互換性が... (diff)
downloadsharkey-9cac293efc5433f6a2efc7ec7ae3f5244bcfbd0d.tar.gz
sharkey-9cac293efc5433f6a2efc7ec7ae3f5244bcfbd0d.tar.bz2
sharkey-9cac293efc5433f6a2efc7ec7ae3f5244bcfbd0d.zip
#1708
Diffstat (limited to 'src/models/note.ts')
-rw-r--r--src/models/note.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/models/note.ts b/src/models/note.ts
index 461bb405a0..21ec2b3857 100644
--- a/src/models/note.ts
+++ b/src/models/note.ts
@@ -16,7 +16,7 @@ import Following from './following';
const Note = db.get<INote>('notes');
Note.createIndex('uri', { sparse: true, unique: true });
Note.createIndex('userId');
-Note.createIndex('tags', { sparse: true });
+Note.createIndex('tagsLower');
Note.createIndex({
createdAt: -1
});
@@ -40,6 +40,7 @@ export type INote = {
poll: any; // todo
text: string;
tags: string[];
+ tagsLower: string[];
cw: string;
userId: mongo.ObjectID;
appId: mongo.ObjectID;