From 064f433040be26d52652eecc0b9159489d8a2787 Mon Sep 17 00:00:00 2001 From: Morgan Leroi Date: Mon, 24 Mar 2025 17:18:08 +0100 Subject: [PATCH 1/2] feat(spec): add CT Query predicate pro --- specs/ingestion/common/schemas/source.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/specs/ingestion/common/schemas/source.yml b/specs/ingestion/common/schemas/source.yml index a49e88e7831..735376e3d02 100644 --- a/specs/ingestion/common/schemas/source.yml +++ b/specs/ingestion/common/schemas/source.yml @@ -135,6 +135,10 @@ SourceCommercetools: default: true description: | Whether a fallback value is stored in the Algolia record if there's no inventory information about the product. + productQueryPredicate: + type: string + description: | + Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query). customFields: $ref: '#/CommercetoolsCustomFields' required: @@ -405,6 +409,10 @@ SourceUpdateCommercetools: type: boolean description: | Whether a fallback value is stored in the Algolia record if there's no inventory information about the product. + productQueryPredicate: + type: string + description: | + Predicate to filter out specific products when indexing. For more information, see [Query Predicate](https://docs.commercetools.com/api/predicates/query). customFields: $ref: '#/CommercetoolsCustomFields' From c834ace3ae24b4086292f020816594e38f367075 Mon Sep 17 00:00:00 2001 From: Morgan Leroi Date: Tue, 25 Mar 2025 10:00:20 +0100 Subject: [PATCH 2/2] add test on prop --- tests/CTS/requests/ingestion/createSource.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/CTS/requests/ingestion/createSource.json b/tests/CTS/requests/ingestion/createSource.json index ec94ead0b2c..be8452047cc 100644 --- a/tests/CTS/requests/ingestion/createSource.json +++ b/tests/CTS/requests/ingestion/createSource.json @@ -12,7 +12,8 @@ "de" ], "url": "http://commercetools.com", - "projectKey": "keyID" + "projectKey": "keyID", + "productQueryPredicate": "masterVariant(attributes(name=\"Brand\" and value=\"Algolia\"))" }, "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f" }, @@ -30,7 +31,8 @@ "de" ], "url": "http://commercetools.com", - "projectKey": "keyID" + "projectKey": "keyID", + "productQueryPredicate": "masterVariant(attributes(name=\"Brand\" and value=\"Algolia\"))" }, "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f" }