@@ -29,6 +29,9 @@ public class Params {
2929 @ JsonProperty ("relevancyStrictness" )
3030 private Integer relevancyStrictness ;
3131
32+ @ JsonProperty ("facets" )
33+ private List <String > facets ;
34+
3235 @ JsonProperty ("facetFilters" )
3336 private FacetFilters facetFilters ;
3437
@@ -171,6 +174,30 @@ public Integer getRelevancyStrictness() {
171174 return relevancyStrictness ;
172175 }
173176
177+ public Params setFacets (List <String > facets ) {
178+ this .facets = facets ;
179+ return this ;
180+ }
181+
182+ public Params addFacets (String facetsItem ) {
183+ if (this .facets == null ) {
184+ this .facets = new ArrayList <>();
185+ }
186+ this .facets .add (facetsItem );
187+ return this ;
188+ }
189+
190+ /**
191+ * Facets for which to retrieve facet values that match the search criteria and the number of
192+ * matching facet values To retrieve all facets, use the wildcard character `*`. For more
193+ * information, see
194+ * [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
195+ */
196+ @ javax .annotation .Nullable
197+ public List <String > getFacets () {
198+ return facets ;
199+ }
200+
174201 public Params setFacetFilters (FacetFilters facetFilters ) {
175202 this .facetFilters = facetFilters ;
176203 return this ;
@@ -531,6 +558,7 @@ public boolean equals(Object o) {
531558 Objects .equals (this .page , params .page ) &&
532559 Objects .equals (this .getRankingInfo , params .getRankingInfo ) &&
533560 Objects .equals (this .relevancyStrictness , params .relevancyStrictness ) &&
561+ Objects .equals (this .facets , params .facets ) &&
534562 Objects .equals (this .facetFilters , params .facetFilters ) &&
535563 Objects .equals (this .optionalFilters , params .optionalFilters ) &&
536564 Objects .equals (this .numericFilters , params .numericFilters ) &&
@@ -564,6 +592,7 @@ public int hashCode() {
564592 page ,
565593 getRankingInfo ,
566594 relevancyStrictness ,
595+ facets ,
567596 facetFilters ,
568597 optionalFilters ,
569598 numericFilters ,
@@ -598,6 +627,7 @@ public String toString() {
598627 sb .append (" page: " ).append (toIndentedString (page )).append ("\n " );
599628 sb .append (" getRankingInfo: " ).append (toIndentedString (getRankingInfo )).append ("\n " );
600629 sb .append (" relevancyStrictness: " ).append (toIndentedString (relevancyStrictness )).append ("\n " );
630+ sb .append (" facets: " ).append (toIndentedString (facets )).append ("\n " );
601631 sb .append (" facetFilters: " ).append (toIndentedString (facetFilters )).append ("\n " );
602632 sb .append (" optionalFilters: " ).append (toIndentedString (optionalFilters )).append ("\n " );
603633 sb .append (" numericFilters: " ).append (toIndentedString (numericFilters )).append ("\n " );
0 commit comments