feat(medusa): Rollout index engine behind feature flag (#11431)
**What** - Add index engine feature flag - apply it to the `store/products` end point as well as `admin/products` - Query builder various fixes - search capabilities on full data of every entities. The `q` search will be applied to all involved joined table for selection/where clauses Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
This commit is contained in:
co-authored by
Carlos R. L. Rodrigues
parent
3b69f5a105
commit
448dbcb596
@@ -414,7 +414,19 @@ describe("IndexModuleService query", function () {
|
||||
},
|
||||
})
|
||||
|
||||
// NULLS LAST (DESC = first)
|
||||
expect(data).toEqual([
|
||||
{
|
||||
id: "prod_2",
|
||||
title: "Product 2 title",
|
||||
deep: {
|
||||
a: 1,
|
||||
obj: {
|
||||
b: 15,
|
||||
},
|
||||
},
|
||||
variants: [],
|
||||
},
|
||||
{
|
||||
id: "prod_1",
|
||||
variants: [
|
||||
@@ -440,17 +452,6 @@ describe("IndexModuleService query", function () {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "prod_2",
|
||||
title: "Product 2 title",
|
||||
deep: {
|
||||
a: 1,
|
||||
obj: {
|
||||
b: 15,
|
||||
},
|
||||
},
|
||||
variants: [],
|
||||
},
|
||||
])
|
||||
|
||||
const { data: dataAsc } = await module.query({
|
||||
@@ -469,17 +470,6 @@ describe("IndexModuleService query", function () {
|
||||
})
|
||||
|
||||
expect(dataAsc).toEqual([
|
||||
{
|
||||
id: "prod_2",
|
||||
title: "Product 2 title",
|
||||
deep: {
|
||||
a: 1,
|
||||
obj: {
|
||||
b: 15,
|
||||
},
|
||||
},
|
||||
variants: [],
|
||||
},
|
||||
{
|
||||
id: "prod_1",
|
||||
variants: [
|
||||
@@ -505,6 +495,17 @@ describe("IndexModuleService query", function () {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "prod_2",
|
||||
title: "Product 2 title",
|
||||
deep: {
|
||||
a: 1,
|
||||
obj: {
|
||||
b: 15,
|
||||
},
|
||||
},
|
||||
variants: [],
|
||||
},
|
||||
])
|
||||
})
|
||||
|
||||
@@ -565,6 +566,11 @@ describe("IndexModuleService query", function () {
|
||||
pagination: {
|
||||
take: 100,
|
||||
skip: 0,
|
||||
order: {
|
||||
product: {
|
||||
created_at: "ASC",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -596,7 +602,7 @@ describe("IndexModuleService query", function () {
|
||||
product: {
|
||||
variants: {
|
||||
prices: {
|
||||
amount: "DESC",
|
||||
amount: "ASC",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -608,14 +614,14 @@ describe("IndexModuleService query", function () {
|
||||
{
|
||||
id: "prod_1",
|
||||
variants: [
|
||||
{
|
||||
id: "var_1",
|
||||
sku: "aaa test aaa",
|
||||
},
|
||||
{
|
||||
id: "var_2",
|
||||
sku: "sku 123",
|
||||
},
|
||||
{
|
||||
id: "var_1",
|
||||
sku: "aaa test aaa",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user