diff --git a/src/app/models/form.server.model.ts b/src/app/models/form.server.model.ts index a6636e2cb0..7fde470b2f 100644 --- a/src/app/models/form.server.model.ts +++ b/src/app/models/form.server.model.ts @@ -487,6 +487,16 @@ const compileFormModel = (db: Mongoose): IFormModel => { title: 'text', }) + FormSchema.index({ + 'permissionList.email': 1, + lastModified: -1, + }) + + FormSchema.index({ + admin: 1, + lastModified: -1, + }) + const FormModel = db.model( FORM_SCHEMA_ID, FormSchema,