@cool-digital-solutions/interferir-models 1.4.70 → 1.4.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -269,6 +269,19 @@ companySchema.pre('findOneAndUpdate', function (next) {
|
|
|
269
269
|
const customCollation = {
|
|
270
270
|
locale: 'en',
|
|
271
271
|
};
|
|
272
|
+
companySchema.index({ baseDomains: 1 }, {
|
|
273
|
+
partialFilterExpression: {
|
|
274
|
+
isDomainBasedAccess: true,
|
|
275
|
+
deleteDate: null,
|
|
276
|
+
},
|
|
277
|
+
background: true,
|
|
278
|
+
});
|
|
279
|
+
companySchema.index({ baseDomains: 1 }, {
|
|
280
|
+
partialFilterExpression: {
|
|
281
|
+
deleteDate: null,
|
|
282
|
+
},
|
|
283
|
+
background: true,
|
|
284
|
+
});
|
|
272
285
|
model_indexes_1.INDEX.forEach((indexField) => {
|
|
273
286
|
const isTextIndex = Object.values(indexField).some((val) => val === 'text');
|
|
274
287
|
const options = isTextIndex ? {} : { collation: customCollation };
|
|
@@ -25,7 +25,6 @@ const INDEX = [
|
|
|
25
25
|
{ investmentPortfolio: 1 },
|
|
26
26
|
{ 'investmentPortfolio.portfolioCompanyAnalyses.company': 1 },
|
|
27
27
|
{ exits: 1 },
|
|
28
|
-
{ baseDomains: -1, isDomainBasedAccess: -1 },
|
|
29
28
|
{ name: 'text', website: 'text', slug: 'text', profileDetailUrls: 'text' },
|
|
30
29
|
];
|
|
31
30
|
exports.INDEX = INDEX;
|