feat: add text index for address field in permits collection
This commit is contained in:
@@ -105,7 +105,10 @@ const permitSchema = new mongoose.Schema({
|
||||
taggedUsers: Array,
|
||||
noc: String,
|
||||
deed: String,
|
||||
}).index({ tenantId: 1, permitNumber: 1 }, { unique: true });
|
||||
});
|
||||
|
||||
permitSchema.index({ tenantId: 1, permitNumber: 1 }, { unique: true });
|
||||
permitSchema.index({ "address.full_address": "text" });
|
||||
|
||||
export const permitFields = Object.keys(permitSchema.paths).filter(
|
||||
(path) => path !== "__v"
|
||||
|
||||
Reference in New Issue
Block a user