@pintahub/database-schemas 5.5.1 → 5.6.0
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.
- package/package.json +1 -1
- package/schemas/Product.js +4 -2
package/package.json
CHANGED
package/schemas/Product.js
CHANGED
|
@@ -202,7 +202,6 @@ const Product = new Schema({
|
|
|
202
202
|
is_imported: {
|
|
203
203
|
type: Boolean,
|
|
204
204
|
default: false,
|
|
205
|
-
index: true,
|
|
206
205
|
},
|
|
207
206
|
|
|
208
207
|
/** Temporary flag: image upload in progress */
|
|
@@ -264,7 +263,6 @@ const Product = new Schema({
|
|
|
264
263
|
is_primary: {
|
|
265
264
|
type: Boolean,
|
|
266
265
|
default: true,
|
|
267
|
-
index: true,
|
|
268
266
|
},
|
|
269
267
|
|
|
270
268
|
/** Whether product is available for purchase */
|
|
@@ -377,6 +375,10 @@ const Product = new Schema({
|
|
|
377
375
|
|
|
378
376
|
Product.index({store: 1, status: 1, is_primary: 1, sales_count: -1})
|
|
379
377
|
|
|
378
|
+
Product.index({store: 1, status: 1, collections: 1, views_count: -1}, {
|
|
379
|
+
partialFilterExpression: {status: 'active'}
|
|
380
|
+
})
|
|
381
|
+
|
|
380
382
|
Product.index({store: 1, product_type: 1, status: 1})
|
|
381
383
|
|
|
382
384
|
/** Full-text search index */
|