@@ -60,7 +60,7 @@ public class FallbackParams {
60
60
private Integer minimumAroundRadius ;
61
61
62
62
@ JsonProperty ("insideBoundingBox" )
63
- private List < List < Double >> insideBoundingBox ;
63
+ private InsideBoundingBox insideBoundingBox ;
64
64
65
65
@ JsonProperty ("insidePolygon" )
66
66
private List <List <Double >> insidePolygon ;
@@ -152,6 +152,9 @@ public class FallbackParams {
152
152
@ JsonProperty ("attributeForDistinct" )
153
153
private String attributeForDistinct ;
154
154
155
+ @ JsonProperty ("maxFacetHits" )
156
+ private Integer maxFacetHits ;
157
+
155
158
@ JsonProperty ("attributesToRetrieve" )
156
159
private List <String > attributesToRetrieve ;
157
160
@@ -222,7 +225,7 @@ public class FallbackParams {
222
225
private Boolean advancedSyntax ;
223
226
224
227
@ JsonProperty ("optionalWords" )
225
- private List < String > optionalWords ;
228
+ private OptionalWords optionalWords ;
226
229
227
230
@ JsonProperty ("disableExactOnAttributes" )
228
231
private List <String > disableExactOnAttributes ;
@@ -248,9 +251,6 @@ public class FallbackParams {
248
251
@ JsonProperty ("responseFields" )
249
252
private List <String > responseFields ;
250
253
251
- @ JsonProperty ("maxFacetHits" )
252
- private Integer maxFacetHits ;
253
-
254
254
@ JsonProperty ("maxValuesPerFacet" )
255
255
private Integer maxValuesPerFacet ;
256
256
@@ -500,28 +500,14 @@ public Integer getMinimumAroundRadius() {
500
500
return minimumAroundRadius ;
501
501
}
502
502
503
- public FallbackParams setInsideBoundingBox (List < List < Double >> insideBoundingBox ) {
503
+ public FallbackParams setInsideBoundingBox (InsideBoundingBox insideBoundingBox ) {
504
504
this .insideBoundingBox = insideBoundingBox ;
505
505
return this ;
506
506
}
507
507
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 */
523
509
@ javax .annotation .Nullable
524
- public List < List < Double >> getInsideBoundingBox () {
510
+ public InsideBoundingBox getInsideBoundingBox () {
525
511
return insideBoundingBox ;
526
512
}
527
513
@@ -1120,6 +1106,21 @@ public String getAttributeForDistinct() {
1120
1106
return attributeForDistinct ;
1121
1107
}
1122
1108
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
+
1123
1124
public FallbackParams setAttributesToRetrieve (List <String > attributesToRetrieve ) {
1124
1125
this .attributesToRetrieve = attributesToRetrieve ;
1125
1126
return this ;
@@ -1507,38 +1508,14 @@ public Boolean getAdvancedSyntax() {
1507
1508
return advancedSyntax ;
1508
1509
}
1509
1510
1510
- public FallbackParams setOptionalWords (List < String > optionalWords ) {
1511
+ public FallbackParams setOptionalWords (OptionalWords optionalWords ) {
1511
1512
this .optionalWords = optionalWords ;
1512
1513
return this ;
1513
1514
}
1514
1515
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 */
1540
1517
@ javax .annotation .Nullable
1541
- public List < String > getOptionalWords () {
1518
+ public OptionalWords getOptionalWords () {
1542
1519
return optionalWords ;
1543
1520
}
1544
1521
@@ -1705,21 +1682,6 @@ public List<String> getResponseFields() {
1705
1682
return responseFields ;
1706
1683
}
1707
1684
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
-
1723
1685
public FallbackParams setMaxValuesPerFacet (Integer maxValuesPerFacet ) {
1724
1686
this .maxValuesPerFacet = maxValuesPerFacet ;
1725
1687
return this ;
@@ -1858,6 +1820,7 @@ public boolean equals(Object o) {
1858
1820
Objects .equals (this .userData , fallbackParams .userData ) &&
1859
1821
Objects .equals (this .customNormalization , fallbackParams .customNormalization ) &&
1860
1822
Objects .equals (this .attributeForDistinct , fallbackParams .attributeForDistinct ) &&
1823
+ Objects .equals (this .maxFacetHits , fallbackParams .maxFacetHits ) &&
1861
1824
Objects .equals (this .attributesToRetrieve , fallbackParams .attributesToRetrieve ) &&
1862
1825
Objects .equals (this .ranking , fallbackParams .ranking ) &&
1863
1826
Objects .equals (this .relevancyStrictness , fallbackParams .relevancyStrictness ) &&
@@ -1890,7 +1853,6 @@ public boolean equals(Object o) {
1890
1853
Objects .equals (this .replaceSynonymsInHighlight , fallbackParams .replaceSynonymsInHighlight ) &&
1891
1854
Objects .equals (this .minProximity , fallbackParams .minProximity ) &&
1892
1855
Objects .equals (this .responseFields , fallbackParams .responseFields ) &&
1893
- Objects .equals (this .maxFacetHits , fallbackParams .maxFacetHits ) &&
1894
1856
Objects .equals (this .maxValuesPerFacet , fallbackParams .maxValuesPerFacet ) &&
1895
1857
Objects .equals (this .sortFacetValuesBy , fallbackParams .sortFacetValuesBy ) &&
1896
1858
Objects .equals (this .attributeCriteriaComputedByMinProximity , fallbackParams .attributeCriteriaComputedByMinProximity ) &&
@@ -1949,6 +1911,7 @@ public int hashCode() {
1949
1911
userData ,
1950
1912
customNormalization ,
1951
1913
attributeForDistinct ,
1914
+ maxFacetHits ,
1952
1915
attributesToRetrieve ,
1953
1916
ranking ,
1954
1917
relevancyStrictness ,
@@ -1981,7 +1944,6 @@ public int hashCode() {
1981
1944
replaceSynonymsInHighlight ,
1982
1945
minProximity ,
1983
1946
responseFields ,
1984
- maxFacetHits ,
1985
1947
maxValuesPerFacet ,
1986
1948
sortFacetValuesBy ,
1987
1949
attributeCriteriaComputedByMinProximity ,
@@ -2041,6 +2003,7 @@ public String toString() {
2041
2003
sb .append (" userData: " ).append (toIndentedString (userData )).append ("\n " );
2042
2004
sb .append (" customNormalization: " ).append (toIndentedString (customNormalization )).append ("\n " );
2043
2005
sb .append (" attributeForDistinct: " ).append (toIndentedString (attributeForDistinct )).append ("\n " );
2006
+ sb .append (" maxFacetHits: " ).append (toIndentedString (maxFacetHits )).append ("\n " );
2044
2007
sb .append (" attributesToRetrieve: " ).append (toIndentedString (attributesToRetrieve )).append ("\n " );
2045
2008
sb .append (" ranking: " ).append (toIndentedString (ranking )).append ("\n " );
2046
2009
sb .append (" relevancyStrictness: " ).append (toIndentedString (relevancyStrictness )).append ("\n " );
@@ -2073,7 +2036,6 @@ public String toString() {
2073
2036
sb .append (" replaceSynonymsInHighlight: " ).append (toIndentedString (replaceSynonymsInHighlight )).append ("\n " );
2074
2037
sb .append (" minProximity: " ).append (toIndentedString (minProximity )).append ("\n " );
2075
2038
sb .append (" responseFields: " ).append (toIndentedString (responseFields )).append ("\n " );
2076
- sb .append (" maxFacetHits: " ).append (toIndentedString (maxFacetHits )).append ("\n " );
2077
2039
sb .append (" maxValuesPerFacet: " ).append (toIndentedString (maxValuesPerFacet )).append ("\n " );
2078
2040
sb .append (" sortFacetValuesBy: " ).append (toIndentedString (sortFacetValuesBy )).append ("\n " );
2079
2041
sb
0 commit comments