From 406c0725cd36d2165149aa3297b6f1eff4c7f2bc Mon Sep 17 00:00:00 2001 From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:35:11 +0200 Subject: [PATCH 1/5] feat(specs): add `facets` query parameter available at run time --- specs/composition/common/schemas/requestBodies/RunParams.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specs/composition/common/schemas/requestBodies/RunParams.yml b/specs/composition/common/schemas/requestBodies/RunParams.yml index d37c129dc2a..465f39a5c40 100644 --- a/specs/composition/common/schemas/requestBodies/RunParams.yml +++ b/specs/composition/common/schemas/requestBodies/RunParams.yml @@ -13,6 +13,8 @@ params: $ref: '../../params/Composition.yml#/getRankingInfo' relevancyStrictness: $ref: '../../params/Search.yml#/relevancyStrictness' + facets: + $ref: '../../params/Search.yml#/facets' facetFilters: $ref: '../../params/Search.yml#/facetFilters' optionalFilters: From ea1cf1fd85275ba241a7b8fa6e1cdaf0792e932d Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Thu, 16 Oct 2025 17:16:56 +0200 Subject: [PATCH 2/5] rename the other one --- specs/common/schemas/SearchParams.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml index 2d81a24cdbe..fd8a6b124de 100644 --- a/specs/common/schemas/SearchParams.yml +++ b/specs/common/schemas/SearchParams.yml @@ -43,17 +43,7 @@ baseSearchParamsWithoutQuery: restrictSearchableAttributes: $ref: '#/restrictSearchableAttributes' facets: - type: array - items: - type: string - description: | - Facets for which to retrieve facet values that match the search criteria and the number of matching facet values - To retrieve all facets, use the wildcard character `*`. - For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). - default: [] - example: ['*'] - x-categories: - - Faceting + $ref: '#/searchParamsFacets' facetingAfterDistinct: $ref: '#/facetingAfterDistinct' page: @@ -463,6 +453,19 @@ restrictSearchableAttributes: x-categories: - Filtering +searchParamsFacets: + type: array + items: + type: string + description: | + Facets for which to retrieve facet values that match the search criteria and the number of matching facet values + To retrieve all facets, use the wildcard character `*`. + For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + default: [] + example: ['*'] + x-categories: + - Faceting + ruleContexts: type: array items: From 755bd81767e87cf19a60d267b1c3cec0b19efa71 Mon Sep 17 00:00:00 2001 From: Clara Muller <5667350+ClaraMuller@users.noreply.github.com> Date: Thu, 16 Oct 2025 17:33:07 +0200 Subject: [PATCH 3/5] fix: put the right link --- specs/composition/common/params/Search.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/composition/common/params/Search.yml b/specs/composition/common/params/Search.yml index eadfae62605..c8af93f4474 100644 --- a/specs/composition/common/params/Search.yml +++ b/specs/composition/common/params/Search.yml @@ -71,7 +71,7 @@ exactOnSingleWordQuery: $ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery' facets: - $ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets' + $ref: '../../../common/schemas/SearchParams.yml#/searchParamsFacets' facetFilters: $ref: '../../../common/schemas/SearchParams.yml#/facetFilters' From 6ce96bc0eb0f6c15adbb09bbb492a57f6f7bb1b7 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Mon, 20 Oct 2025 17:23:22 +0200 Subject: [PATCH 4/5] revert --- specs/common/schemas/SearchParams.yml | 25 ++++++++++------------ specs/composition/common/params/Search.yml | 2 +- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/specs/common/schemas/SearchParams.yml b/specs/common/schemas/SearchParams.yml index fd8a6b124de..2d81a24cdbe 100644 --- a/specs/common/schemas/SearchParams.yml +++ b/specs/common/schemas/SearchParams.yml @@ -43,7 +43,17 @@ baseSearchParamsWithoutQuery: restrictSearchableAttributes: $ref: '#/restrictSearchableAttributes' facets: - $ref: '#/searchParamsFacets' + type: array + items: + type: string + description: | + Facets for which to retrieve facet values that match the search criteria and the number of matching facet values + To retrieve all facets, use the wildcard character `*`. + For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). + default: [] + example: ['*'] + x-categories: + - Faceting facetingAfterDistinct: $ref: '#/facetingAfterDistinct' page: @@ -453,19 +463,6 @@ restrictSearchableAttributes: x-categories: - Filtering -searchParamsFacets: - type: array - items: - type: string - description: | - Facets for which to retrieve facet values that match the search criteria and the number of matching facet values - To retrieve all facets, use the wildcard character `*`. - For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts). - default: [] - example: ['*'] - x-categories: - - Faceting - ruleContexts: type: array items: diff --git a/specs/composition/common/params/Search.yml b/specs/composition/common/params/Search.yml index c8af93f4474..eadfae62605 100644 --- a/specs/composition/common/params/Search.yml +++ b/specs/composition/common/params/Search.yml @@ -71,7 +71,7 @@ exactOnSingleWordQuery: $ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery' facets: - $ref: '../../../common/schemas/SearchParams.yml#/searchParamsFacets' + $ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets' facetFilters: $ref: '../../../common/schemas/SearchParams.yml#/facetFilters' From 39b73281fe08ccb01dd42f68ffe2b27e2b24f744 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 22 Oct 2025 10:21:27 +0200 Subject: [PATCH 5/5] bc --- .../src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java index 0a74f76d04a..5e09fd84a01 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaSwiftGenerator.java @@ -152,6 +152,7 @@ public class AlgoliaSwiftGenerator extends Swift5ClientCodegen { "facethits", "gettaskresponse", "hit", + "indexsettingsfacets", "main", "multiplebatchrequest", "multiplebatchresponse",