This commit is contained in:
syuilo
2018-06-16 15:23:03 +09:00
parent cd8bfca29c
commit 9cac293efc
4 changed files with 14 additions and 12 deletions

View File

@ -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;