Open hoanghiep1x0 opened 4 months ago
what about something like this:
schema: {
email: {
type: 'string',
required: true,
unique: true,
index: true,
},
},
https://mongoosejs.com/docs/api/schematype.html#SchemaType.prototype.index()
I used a hook but it doesn't seem to hit the index