@@ -60,7 +60,7 @@ public class FallbackParams {
6060 private Integer minimumAroundRadius ;
6161
6262 @ JsonProperty ("insideBoundingBox" )
63- private List < List < Double >> insideBoundingBox ;
63+ private InsideBoundingBox insideBoundingBox ;
6464
6565 @ JsonProperty ("insidePolygon" )
6666 private List <List <Double >> insidePolygon ;
@@ -152,6 +152,9 @@ public class FallbackParams {
152152 @ JsonProperty ("attributeForDistinct" )
153153 private String attributeForDistinct ;
154154
155+ @ JsonProperty ("maxFacetHits" )
156+ private Integer maxFacetHits ;
157+
155158 @ JsonProperty ("attributesToRetrieve" )
156159 private List <String > attributesToRetrieve ;
157160
@@ -222,7 +225,7 @@ public class FallbackParams {
222225 private Boolean advancedSyntax ;
223226
224227 @ JsonProperty ("optionalWords" )
225- private List < String > optionalWords ;
228+ private OptionalWords optionalWords ;
226229
227230 @ JsonProperty ("disableExactOnAttributes" )
228231 private List <String > disableExactOnAttributes ;
@@ -248,9 +251,6 @@ public class FallbackParams {
248251 @ JsonProperty ("responseFields" )
249252 private List <String > responseFields ;
250253
251- @ JsonProperty ("maxFacetHits" )
252- private Integer maxFacetHits ;
253-
254254 @ JsonProperty ("maxValuesPerFacet" )
255255 private Integer maxValuesPerFacet ;
256256
@@ -500,28 +500,14 @@ public Integer getMinimumAroundRadius() {
500500 return minimumAroundRadius ;
501501 }
502502
503- public FallbackParams setInsideBoundingBox (List < List < Double >> insideBoundingBox ) {
503+ public FallbackParams setInsideBoundingBox (InsideBoundingBox insideBoundingBox ) {
504504 this .insideBoundingBox = insideBoundingBox ;
505505 return this ;
506506 }
507507
508- public FallbackParams addInsideBoundingBox (List <Double > insideBoundingBoxItem ) {
509- if (this .insideBoundingBox == null ) {
510- this .insideBoundingBox = new ArrayList <>();
511- }
512- this .insideBoundingBox .add (insideBoundingBoxItem );
513- return this ;
514- }
515-
516- /**
517- * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two
518- * opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1
519- * long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more
520- * information, see [rectangular
521- * area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
522- */
508+ /** Get insideBoundingBox */
523509 @ javax .annotation .Nullable
524- public List < List < Double >> getInsideBoundingBox () {
510+ public InsideBoundingBox getInsideBoundingBox () {
525511 return insideBoundingBox ;
526512 }
527513
@@ -1120,6 +1106,21 @@ public String getAttributeForDistinct() {
11201106 return attributeForDistinct ;
11211107 }
11221108
1109+ public FallbackParams setMaxFacetHits (Integer maxFacetHits ) {
1110+ this .maxFacetHits = maxFacetHits ;
1111+ return this ;
1112+ }
1113+
1114+ /**
1115+ * Maximum number of facet values to return when [searching for facet
1116+ * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1117+ * maximum: 100
1118+ */
1119+ @ javax .annotation .Nullable
1120+ public Integer getMaxFacetHits () {
1121+ return maxFacetHits ;
1122+ }
1123+
11231124 public FallbackParams setAttributesToRetrieve (List <String > attributesToRetrieve ) {
11241125 this .attributesToRetrieve = attributesToRetrieve ;
11251126 return this ;
@@ -1507,38 +1508,14 @@ public Boolean getAdvancedSyntax() {
15071508 return advancedSyntax ;
15081509 }
15091510
1510- public FallbackParams setOptionalWords (List < String > optionalWords ) {
1511+ public FallbackParams setOptionalWords (OptionalWords optionalWords ) {
15111512 this .optionalWords = optionalWords ;
15121513 return this ;
15131514 }
15141515
1515- public FallbackParams addOptionalWords (String optionalWordsItem ) {
1516- if (this .optionalWords == null ) {
1517- this .optionalWords = new ArrayList <>();
1518- }
1519- this .optionalWords .add (optionalWordsItem );
1520- return this ;
1521- }
1522-
1523- /**
1524- * Words that should be considered optional when found in the query. By default, records must
1525- * match all words in the search query to be included in the search results. Adding optional words
1526- * can help to increase the number of search results by running an additional search query that
1527- * doesn't include the optional words. For example, if the search query is \"action video\" and
1528- * \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and
1529- * one for \"action\". Records that match all words are ranked higher. For a search query with 4
1530- * or more words **and** all its words are optional, the number of matched words required for a
1531- * record to be included in the search results increases for every 1,000 records: - If
1532- * `optionalWords` has less than 10 words, the required number of matched words increases by 1:
1533- * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If
1534- * `optionalWords` has 10 or more words, the number of required matched words increases by the
1535- * number of optional words divided by 5 (rounded down). For example, with 18 optional words:
1536- * results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more
1537- * information, see [Optional
1538- * words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
1539- */
1516+ /** Get optionalWords */
15401517 @ javax .annotation .Nullable
1541- public List < String > getOptionalWords () {
1518+ public OptionalWords getOptionalWords () {
15421519 return optionalWords ;
15431520 }
15441521
@@ -1705,21 +1682,6 @@ public List<String> getResponseFields() {
17051682 return responseFields ;
17061683 }
17071684
1708- public FallbackParams setMaxFacetHits (Integer maxFacetHits ) {
1709- this .maxFacetHits = maxFacetHits ;
1710- return this ;
1711- }
1712-
1713- /**
1714- * Maximum number of facet values to return when [searching for facet
1715- * values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1716- * maximum: 100
1717- */
1718- @ javax .annotation .Nullable
1719- public Integer getMaxFacetHits () {
1720- return maxFacetHits ;
1721- }
1722-
17231685 public FallbackParams setMaxValuesPerFacet (Integer maxValuesPerFacet ) {
17241686 this .maxValuesPerFacet = maxValuesPerFacet ;
17251687 return this ;
@@ -1858,6 +1820,7 @@ public boolean equals(Object o) {
18581820 Objects .equals (this .userData , fallbackParams .userData ) &&
18591821 Objects .equals (this .customNormalization , fallbackParams .customNormalization ) &&
18601822 Objects .equals (this .attributeForDistinct , fallbackParams .attributeForDistinct ) &&
1823+ Objects .equals (this .maxFacetHits , fallbackParams .maxFacetHits ) &&
18611824 Objects .equals (this .attributesToRetrieve , fallbackParams .attributesToRetrieve ) &&
18621825 Objects .equals (this .ranking , fallbackParams .ranking ) &&
18631826 Objects .equals (this .relevancyStrictness , fallbackParams .relevancyStrictness ) &&
@@ -1890,7 +1853,6 @@ public boolean equals(Object o) {
18901853 Objects .equals (this .replaceSynonymsInHighlight , fallbackParams .replaceSynonymsInHighlight ) &&
18911854 Objects .equals (this .minProximity , fallbackParams .minProximity ) &&
18921855 Objects .equals (this .responseFields , fallbackParams .responseFields ) &&
1893- Objects .equals (this .maxFacetHits , fallbackParams .maxFacetHits ) &&
18941856 Objects .equals (this .maxValuesPerFacet , fallbackParams .maxValuesPerFacet ) &&
18951857 Objects .equals (this .sortFacetValuesBy , fallbackParams .sortFacetValuesBy ) &&
18961858 Objects .equals (this .attributeCriteriaComputedByMinProximity , fallbackParams .attributeCriteriaComputedByMinProximity ) &&
@@ -1949,6 +1911,7 @@ public int hashCode() {
19491911 userData ,
19501912 customNormalization ,
19511913 attributeForDistinct ,
1914+ maxFacetHits ,
19521915 attributesToRetrieve ,
19531916 ranking ,
19541917 relevancyStrictness ,
@@ -1981,7 +1944,6 @@ public int hashCode() {
19811944 replaceSynonymsInHighlight ,
19821945 minProximity ,
19831946 responseFields ,
1984- maxFacetHits ,
19851947 maxValuesPerFacet ,
19861948 sortFacetValuesBy ,
19871949 attributeCriteriaComputedByMinProximity ,
@@ -2041,6 +2003,7 @@ public String toString() {
20412003 sb .append (" userData: " ).append (toIndentedString (userData )).append ("\n " );
20422004 sb .append (" customNormalization: " ).append (toIndentedString (customNormalization )).append ("\n " );
20432005 sb .append (" attributeForDistinct: " ).append (toIndentedString (attributeForDistinct )).append ("\n " );
2006+ sb .append (" maxFacetHits: " ).append (toIndentedString (maxFacetHits )).append ("\n " );
20442007 sb .append (" attributesToRetrieve: " ).append (toIndentedString (attributesToRetrieve )).append ("\n " );
20452008 sb .append (" ranking: " ).append (toIndentedString (ranking )).append ("\n " );
20462009 sb .append (" relevancyStrictness: " ).append (toIndentedString (relevancyStrictness )).append ("\n " );
@@ -2073,7 +2036,6 @@ public String toString() {
20732036 sb .append (" replaceSynonymsInHighlight: " ).append (toIndentedString (replaceSynonymsInHighlight )).append ("\n " );
20742037 sb .append (" minProximity: " ).append (toIndentedString (minProximity )).append ("\n " );
20752038 sb .append (" responseFields: " ).append (toIndentedString (responseFields )).append ("\n " );
2076- sb .append (" maxFacetHits: " ).append (toIndentedString (maxFacetHits )).append ("\n " );
20772039 sb .append (" maxValuesPerFacet: " ).append (toIndentedString (maxValuesPerFacet )).append ("\n " );
20782040 sb .append (" sortFacetValuesBy: " ).append (toIndentedString (sortFacetValuesBy )).append ("\n " );
20792041 sb
0 commit comments