Skip to content

Commit ce7c407

Browse files
feat(specs): add specific documentation for facets query parameter in Composition API (generated)
algolia/api-clients-automation#5477 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]>
1 parent 3aefb91 commit ce7c407

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/algolia/models/composition/main_injection_query_parameters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class MainInjectionQueryParameters
141141
# Whether faceting should be applied after deduplication with `distinct` This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
142142
attr_accessor :faceting_after_distinct
143143

144-
# 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).
144+
# 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).
145145
attr_accessor :facets
146146

147147
# Number of hits per page.

lib/algolia/models/composition/params.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class Params
2323
# Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
2424
attr_accessor :relevancy_strictness
2525

26-
# 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).
27-
attr_accessor :facets
28-
2926
attr_accessor :facet_filters
3027

28+
# 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).
29+
attr_accessor :facets
30+
3131
attr_accessor :optional_filters
3232

3333
attr_accessor :numeric_filters
@@ -94,8 +94,8 @@ def self.attribute_map
9494
:page => :page,
9595
:get_ranking_info => :getRankingInfo,
9696
:relevancy_strictness => :relevancyStrictness,
97-
:facets => :facets,
9897
:facet_filters => :facetFilters,
98+
:facets => :facets,
9999
:optional_filters => :optionalFilters,
100100
:numeric_filters => :numericFilters,
101101
:hits_per_page => :hitsPerPage,
@@ -128,8 +128,8 @@ def self.types_mapping
128128
:page => :"Integer",
129129
:get_ranking_info => :"Boolean",
130130
:relevancy_strictness => :"Integer",
131-
:facets => :"Array<String>",
132131
:facet_filters => :"FacetFilters",
132+
:facets => :"Array<String>",
133133
:optional_filters => :"OptionalFilters",
134134
:numeric_filters => :"NumericFilters",
135135
:hits_per_page => :"Integer",
@@ -203,16 +203,16 @@ def initialize(attributes = {})
203203
self.relevancy_strictness = attributes[:relevancy_strictness]
204204
end
205205

206+
if attributes.key?(:facet_filters)
207+
self.facet_filters = attributes[:facet_filters]
208+
end
209+
206210
if attributes.key?(:facets)
207211
if (value = attributes[:facets]).is_a?(Array)
208212
self.facets = value
209213
end
210214
end
211215

212-
if attributes.key?(:facet_filters)
213-
self.facet_filters = attributes[:facet_filters]
214-
end
215-
216216
if attributes.key?(:optional_filters)
217217
self.optional_filters = attributes[:optional_filters]
218218
end
@@ -320,8 +320,8 @@ def ==(other)
320320
page == other.page &&
321321
get_ranking_info == other.get_ranking_info &&
322322
relevancy_strictness == other.relevancy_strictness &&
323-
facets == other.facets &&
324323
facet_filters == other.facet_filters &&
324+
facets == other.facets &&
325325
optional_filters == other.optional_filters &&
326326
numeric_filters == other.numeric_filters &&
327327
hits_per_page == other.hits_per_page &&
@@ -360,8 +360,8 @@ def hash
360360
page,
361361
get_ranking_info,
362362
relevancy_strictness,
363-
facets,
364363
facet_filters,
364+
facets,
365365
optional_filters,
366366
numeric_filters,
367367
hits_per_page,

0 commit comments

Comments
 (0)