From bc9b28b5494c9ac4035210d1656ffa38f8444425 Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Fri, 31 Jan 2025 14:25:47 +0100 Subject: [PATCH 1/3] fix(specs): allow search params as object for sffv --- specs/search/paths/search/searchForFacetValues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/search/paths/search/searchForFacetValues.yml b/specs/search/paths/search/searchForFacetValues.yml index c5072779f7..5ecb238934 100644 --- a/specs/search/paths/search/searchForFacetValues.yml +++ b/specs/search/paths/search/searchForFacetValues.yml @@ -33,7 +33,7 @@ post: additionalProperties: false properties: params: - $ref: '../../../common/schemas/SearchParams.yml#/paramsAsString' + $ref: '../../../common/schemas/SearchParams.yml#/searchParams' facetQuery: $ref: '../../common/schemas/SearchQuery.yml#/facetQuery' maxFacetHits: From 5f8793f11687135d1c10097bb41422d18d9e2e65 Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Fri, 31 Jan 2025 14:38:06 +0100 Subject: [PATCH 2/3] fix: add cts for new option --- .../requests/search/searchForFacetValues.json | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/CTS/requests/search/searchForFacetValues.json b/tests/CTS/requests/search/searchForFacetValues.json index 64b65017fb..89ad4f4819 100644 --- a/tests/CTS/requests/search/searchForFacetValues.json +++ b/tests/CTS/requests/search/searchForFacetValues.json @@ -11,7 +11,7 @@ } }, { - "testName": "get searchForFacetValues results with all parameters", + "testName": "get searchForFacetValues results with all parameters as string", "parameters": { "indexName": "indexName", "facetName": "facetName", @@ -31,6 +31,30 @@ } } }, + { + "testName": "get searchForFacetValues results with all parameters as object", + "parameters": { + "indexName": "indexName", + "facetName": "facetName", + "searchForFacetValuesRequest": { + "params": { + "query": "foo", + "facetFilters": ["bar"] + }, + "facetQuery": "foo", + "maxFacetHits": 42 + } + }, + "request": { + "path": "/1/indexes/indexName/facets/facetName/query", + "method": "POST", + "body": { + "params": "query=foo&facetFilters=['bar']", + "facetQuery": "foo", + "maxFacetHits": 42 + } + } + }, { "testName": "facetName and facetQuery", "parameters": { From 4923525ea7aa4e34c266b48011a1aac605f365dc Mon Sep 17 00:00:00 2001 From: Kai Welke Date: Fri, 31 Jan 2025 15:14:32 +0100 Subject: [PATCH 3/3] fix: needs another definition --- tests/CTS/requests/search/searchForFacetValues.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/CTS/requests/search/searchForFacetValues.json b/tests/CTS/requests/search/searchForFacetValues.json index 89ad4f4819..46d012d703 100644 --- a/tests/CTS/requests/search/searchForFacetValues.json +++ b/tests/CTS/requests/search/searchForFacetValues.json @@ -38,7 +38,6 @@ "facetName": "facetName", "searchForFacetValuesRequest": { "params": { - "query": "foo", "facetFilters": ["bar"] }, "facetQuery": "foo", @@ -49,7 +48,9 @@ "path": "/1/indexes/indexName/facets/facetName/query", "method": "POST", "body": { - "params": "query=foo&facetFilters=['bar']", + "params": { + "facetFilters": ["bar"] + }, "facetQuery": "foo", "maxFacetHits": 42 }