@unchainedshop/core-assortments 4.8.9 → 4.8.11
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.
|
@@ -10,7 +10,7 @@ export const AssortmentMediaCollection = async (db) => {
|
|
|
10
10
|
]);
|
|
11
11
|
await buildDbIndexes(AssortmentMediaTexts, [
|
|
12
12
|
{ index: { assortmentMediaId: 1 } },
|
|
13
|
-
{ index: { locale: 1 } },
|
|
13
|
+
{ index: { locale: 1, assortmentMediaId: 1 } },
|
|
14
14
|
]);
|
|
15
15
|
return {
|
|
16
16
|
AssortmentMedia,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildDbIndexes,
|
|
1
|
+
import { buildDbIndexes, mongodb } from '@unchainedshop/mongodb';
|
|
2
2
|
export const AssortmentsCollection = async (db) => {
|
|
3
3
|
const Assortments = db.collection('assortments');
|
|
4
4
|
const AssortmentTexts = db.collection('assortment_texts');
|
|
@@ -6,41 +6,33 @@ export const AssortmentsCollection = async (db) => {
|
|
|
6
6
|
const AssortmentLinks = db.collection('assortment_links');
|
|
7
7
|
const AssortmentFilters = db.collection('assortment_filters');
|
|
8
8
|
const AssortmentProductIdCache = db.collection('assortment_productId_cache');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
name: 'assortments_fulltext_search',
|
|
15
|
-
},
|
|
9
|
+
await buildDbIndexes(Assortments, [
|
|
10
|
+
{
|
|
11
|
+
index: { slugs: 'text' },
|
|
12
|
+
options: {
|
|
13
|
+
name: 'assortments_fulltext_search',
|
|
16
14
|
},
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
},
|
|
16
|
+
]);
|
|
19
17
|
await buildDbIndexes(Assortments, [
|
|
20
|
-
{ index: { deleted: 1 } },
|
|
21
|
-
{ index: { isActive: 1 } },
|
|
22
|
-
{ index: { isRoot: 1 } },
|
|
23
|
-
{ index: { sequence: 1 } },
|
|
18
|
+
{ index: { deleted: 1, isActive: 1, isRoot: 1, sequence: 1 } },
|
|
24
19
|
{ index: { slugs: 1 } },
|
|
25
20
|
{ index: { tags: 1 } },
|
|
26
21
|
]);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
subtitle: 6,
|
|
35
|
-
},
|
|
36
|
-
name: 'assortments_texts_fulltext_search',
|
|
22
|
+
await buildDbIndexes(AssortmentTexts, [
|
|
23
|
+
{
|
|
24
|
+
index: { title: 'text', subtitle: 'text' },
|
|
25
|
+
options: {
|
|
26
|
+
weights: {
|
|
27
|
+
title: 8,
|
|
28
|
+
subtitle: 6,
|
|
37
29
|
},
|
|
30
|
+
name: 'assortments_texts_fulltext_search',
|
|
38
31
|
},
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
41
34
|
await buildDbIndexes(AssortmentTexts, [
|
|
42
35
|
{ index: { assortmentId: 1 } },
|
|
43
|
-
{ index: { locale: 1 } },
|
|
44
36
|
{ index: { slug: 1 } },
|
|
45
37
|
{ index: { locale: 1, assortmentId: 1 } },
|
|
46
38
|
]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SortDirection } from '@unchainedshop/utils';
|
|
2
2
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
3
|
-
import { generateDbFilterById, findPreservingIds, buildSortOptions, mongodb, generateDbObjectId,
|
|
3
|
+
import { generateDbFilterById, findPreservingIds, buildSortOptions, mongodb, generateDbObjectId, } from '@unchainedshop/mongodb';
|
|
4
4
|
import { createLogger } from '@unchainedshop/logger';
|
|
5
5
|
import { AssortmentsCollection, } from "../db/AssortmentsCollection.js";
|
|
6
6
|
import { configureAssortmentFiltersModule } from "./configureAssortmentFiltersModule.js";
|
|
@@ -33,7 +33,6 @@ export const buildFindSelector = ({ assortmentIds, assortmentSelector, slugs, ta
|
|
|
33
33
|
selector.isRoot = true;
|
|
34
34
|
}
|
|
35
35
|
if (queryString) {
|
|
36
|
-
assertDocumentDBCompatMode();
|
|
37
36
|
selector.$text = { $search: queryString };
|
|
38
37
|
}
|
|
39
38
|
if (!assortmentSelector && !includeInactive) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-assortments",
|
|
3
3
|
"description": "Assortment and category management module for the Unchained Engine",
|
|
4
|
-
"version": "4.8.
|
|
4
|
+
"version": "4.8.11",
|
|
5
5
|
"main": "lib/assortments-index.js",
|
|
6
6
|
"types": "lib/assortments-index.d.ts",
|
|
7
7
|
"type": "module",
|