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: 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' 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: