diff --git a/specs/composition/common/params/Composition.yml b/specs/composition/common/params/Composition.yml index 8cb46cbb0b5..7bd078e96da 100644 --- a/specs/composition/common/params/Composition.yml +++ b/specs/composition/common/params/Composition.yml @@ -1,3 +1,23 @@ +# ######################### +# ### Category Faceting ### +# ######################### + +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 `*`. + To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. + For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](https://www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting). + default: [] + example: + - ['category', 'disjunctive(brand)', 'price'] + - ['*'] + x-categories: + - Faceting + # ###################### # ### Category Rules ### # ###################### diff --git a/specs/composition/common/params/Search.yml b/specs/composition/common/params/Search.yml index eadfae62605..b4f206325a5 100644 --- a/specs/composition/common/params/Search.yml +++ b/specs/composition/common/params/Search.yml @@ -70,9 +70,6 @@ enableRules: exactOnSingleWordQuery: $ref: '../../../common/schemas/IndexSettings.yml#/exactOnSingleWordQuery' -facets: - $ref: '../../../common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets' - facetFilters: $ref: '../../../common/schemas/SearchParams.yml#/facetFilters' diff --git a/specs/composition/common/schemas/components/Injection.yml b/specs/composition/common/schemas/components/Injection.yml index fd3d63d5f41..9bf595639b1 100644 --- a/specs/composition/common/schemas/components/Injection.yml +++ b/specs/composition/common/schemas/components/Injection.yml @@ -110,7 +110,7 @@ mainInjectionQueryParameters: facetingAfterDistinct: $ref: '../../params/Search.yml#/facetingAfterDistinct' facets: - $ref: '../../params/Search.yml#/facets' + $ref: '../../params/Composition.yml#/facets' hitsPerPage: $ref: '../../params/Search.yml#/hitsPerPage' maxValuesPerFacet: diff --git a/specs/composition/common/schemas/requestBodies/RunParams.yml b/specs/composition/common/schemas/requestBodies/RunParams.yml index d37c129dc2a..1234cf812dc 100644 --- a/specs/composition/common/schemas/requestBodies/RunParams.yml +++ b/specs/composition/common/schemas/requestBodies/RunParams.yml @@ -15,6 +15,8 @@ params: $ref: '../../params/Search.yml#/relevancyStrictness' facetFilters: $ref: '../../params/Search.yml#/facetFilters' + facets: + $ref: '../../params/Composition.yml#/facets' optionalFilters: $ref: '../../params/Search.yml#/optionalFilters' numericFilters: