Skip to content

Commit d0c5b9d

Browse files
committed
add domain text index
1 parent 5c479d5 commit d0c5b9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/setup/mongo.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ async function setupMongo() {
1313
await db.collection('documents').createIndex({ relatesTo: 1 });
1414
await db.collection('documenttypes').createIndex({ id: 1 }, { unique: true });
1515
await db.collection('documenttypes').createIndex({ createdAt: 1 });
16+
await db.collection('domains').createIndex({ id: 1 }, { unique: true });
17+
await db.collection('domains').createIndex({ createdAt: 1 });
18+
await db.collection('domains').createIndex({ 'structure.structureId': 1 });
19+
await db.collection('domains').createIndex({ 'structure.id': 1 });
20+
await db.collection('domains').createIndex({ domainName: 'text' });
1621
await db.collection('emails').createIndex({ id: 1 }, { unique: true });
1722
await db.collection('emails').createIndex({ createdAt: 1 });
1823
await db.collection('emails').createIndex({ resourceId: 1 });

0 commit comments

Comments
 (0)