algolia 3.8.0 → 3.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,6 @@ module Algolia
60
60
  # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
61
61
  attr_accessor :minimum_around_radius
62
62
 
63
- # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
64
63
  attr_accessor :inside_bounding_box
65
64
 
66
65
  # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
@@ -176,7 +175,6 @@ module Algolia
176
175
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
177
176
  attr_accessor :advanced_syntax
178
177
 
179
- # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
180
178
  attr_accessor :optional_words
181
179
 
182
180
  # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
@@ -201,9 +199,6 @@ module Algolia
201
199
  # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
202
200
  attr_accessor :response_fields
203
201
 
204
- # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
205
- attr_accessor :max_facet_hits
206
-
207
202
  # Maximum number of facet values to return for each facet.
208
203
  attr_accessor :max_values_per_facet
209
204
 
@@ -229,6 +224,9 @@ module Algolia
229
224
  # Text to search inside the facet's values.
230
225
  attr_accessor :facet_query
231
226
 
227
+ # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
228
+ attr_accessor :max_facet_hits
229
+
232
230
  attr_accessor :type
233
231
 
234
232
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -304,7 +302,6 @@ module Algolia
304
302
  :replace_synonyms_in_highlight => :replaceSynonymsInHighlight,
305
303
  :min_proximity => :minProximity,
306
304
  :response_fields => :responseFields,
307
- :max_facet_hits => :maxFacetHits,
308
305
  :max_values_per_facet => :maxValuesPerFacet,
309
306
  :sort_facet_values_by => :sortFacetValuesBy,
310
307
  :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
@@ -314,6 +311,7 @@ module Algolia
314
311
  :facet => :facet,
315
312
  :index_name => :indexName,
316
313
  :facet_query => :facetQuery,
314
+ :max_facet_hits => :maxFacetHits,
317
315
  :type => :type
318
316
  }
319
317
  end
@@ -346,7 +344,7 @@ module Algolia
346
344
  :around_radius => :"AroundRadius",
347
345
  :around_precision => :"AroundPrecision",
348
346
  :minimum_around_radius => :"Integer",
349
- :inside_bounding_box => :"Array<Array<Float>>",
347
+ :inside_bounding_box => :"InsideBoundingBox",
350
348
  :inside_polygon => :"Array<Array<Float>>",
351
349
  :natural_languages => :"Array<SupportedLanguage>",
352
350
  :rule_contexts => :"Array<String>",
@@ -387,7 +385,7 @@ module Algolia
387
385
  :mode => :"Mode",
388
386
  :semantic_search => :"SemanticSearch",
389
387
  :advanced_syntax => :"Boolean",
390
- :optional_words => :"Array<String>",
388
+ :optional_words => :"OptionalWords",
391
389
  :disable_exact_on_attributes => :"Array<String>",
392
390
  :exact_on_single_word_query => :"ExactOnSingleWordQuery",
393
391
  :alternatives_as_exact => :"Array<AlternativesAsExact>",
@@ -396,7 +394,6 @@ module Algolia
396
394
  :replace_synonyms_in_highlight => :"Boolean",
397
395
  :min_proximity => :"Integer",
398
396
  :response_fields => :"Array<String>",
399
- :max_facet_hits => :"Integer",
400
397
  :max_values_per_facet => :"Integer",
401
398
  :sort_facet_values_by => :"String",
402
399
  :attribute_criteria_computed_by_min_proximity => :"Boolean",
@@ -406,6 +403,7 @@ module Algolia
406
403
  :facet => :"String",
407
404
  :index_name => :"String",
408
405
  :facet_query => :"String",
406
+ :max_facet_hits => :"Integer",
409
407
  :type => :"SearchTypeFacet"
410
408
  }
411
409
  end
@@ -413,7 +411,10 @@ module Algolia
413
411
  # List of attributes with nullable: true
414
412
  def self.openapi_nullable
415
413
  Set.new(
416
- []
414
+ [
415
+ :inside_bounding_box,
416
+ :optional_words
417
+ ]
417
418
  )
418
419
  end
419
420
 
@@ -533,9 +534,7 @@ module Algolia
533
534
  end
534
535
 
535
536
  if attributes.key?(:inside_bounding_box)
536
- if (value = attributes[:inside_bounding_box]).is_a?(Array)
537
- self.inside_bounding_box = value
538
- end
537
+ self.inside_bounding_box = attributes[:inside_bounding_box]
539
538
  end
540
539
 
541
540
  if attributes.key?(:inside_polygon)
@@ -721,9 +720,7 @@ module Algolia
721
720
  end
722
721
 
723
722
  if attributes.key?(:optional_words)
724
- if (value = attributes[:optional_words]).is_a?(Array)
725
- self.optional_words = value
726
- end
723
+ self.optional_words = attributes[:optional_words]
727
724
  end
728
725
 
729
726
  if attributes.key?(:disable_exact_on_attributes)
@@ -766,10 +763,6 @@ module Algolia
766
763
  end
767
764
  end
768
765
 
769
- if attributes.key?(:max_facet_hits)
770
- self.max_facet_hits = attributes[:max_facet_hits]
771
- end
772
-
773
766
  if attributes.key?(:max_values_per_facet)
774
767
  self.max_values_per_facet = attributes[:max_values_per_facet]
775
768
  end
@@ -810,6 +803,10 @@ module Algolia
810
803
  self.facet_query = attributes[:facet_query]
811
804
  end
812
805
 
806
+ if attributes.key?(:max_facet_hits)
807
+ self.max_facet_hits = attributes[:max_facet_hits]
808
+ end
809
+
813
810
  if attributes.key?(:type)
814
811
  self.type = attributes[:type]
815
812
  else
@@ -892,7 +889,6 @@ module Algolia
892
889
  replace_synonyms_in_highlight == other.replace_synonyms_in_highlight &&
893
890
  min_proximity == other.min_proximity &&
894
891
  response_fields == other.response_fields &&
895
- max_facet_hits == other.max_facet_hits &&
896
892
  max_values_per_facet == other.max_values_per_facet &&
897
893
  sort_facet_values_by == other.sort_facet_values_by &&
898
894
  attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
@@ -902,6 +898,7 @@ module Algolia
902
898
  facet == other.facet &&
903
899
  index_name == other.index_name &&
904
900
  facet_query == other.facet_query &&
901
+ max_facet_hits == other.max_facet_hits &&
905
902
  type == other.type
906
903
  end
907
904
 
@@ -985,7 +982,6 @@ module Algolia
985
982
  replace_synonyms_in_highlight,
986
983
  min_proximity,
987
984
  response_fields,
988
- max_facet_hits,
989
985
  max_values_per_facet,
990
986
  sort_facet_values_by,
991
987
  attribute_criteria_computed_by_min_proximity,
@@ -995,6 +991,7 @@ module Algolia
995
991
  facet,
996
992
  index_name,
997
993
  facet_query,
994
+ max_facet_hits,
998
995
  type
999
996
  ].hash
1000
997
  end
@@ -60,7 +60,6 @@ module Algolia
60
60
  # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
61
61
  attr_accessor :minimum_around_radius
62
62
 
63
- # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
64
63
  attr_accessor :inside_bounding_box
65
64
 
66
65
  # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
@@ -176,7 +175,6 @@ module Algolia
176
175
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
177
176
  attr_accessor :advanced_syntax
178
177
 
179
- # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
180
178
  attr_accessor :optional_words
181
179
 
182
180
  # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
@@ -201,9 +199,6 @@ module Algolia
201
199
  # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
202
200
  attr_accessor :response_fields
203
201
 
204
- # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
205
- attr_accessor :max_facet_hits
206
-
207
202
  # Maximum number of facet values to return for each facet.
208
203
  attr_accessor :max_values_per_facet
209
204
 
@@ -298,7 +293,6 @@ module Algolia
298
293
  :replace_synonyms_in_highlight => :replaceSynonymsInHighlight,
299
294
  :min_proximity => :minProximity,
300
295
  :response_fields => :responseFields,
301
- :max_facet_hits => :maxFacetHits,
302
296
  :max_values_per_facet => :maxValuesPerFacet,
303
297
  :sort_facet_values_by => :sortFacetValuesBy,
304
298
  :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
@@ -338,7 +332,7 @@ module Algolia
338
332
  :around_radius => :"AroundRadius",
339
333
  :around_precision => :"AroundPrecision",
340
334
  :minimum_around_radius => :"Integer",
341
- :inside_bounding_box => :"Array<Array<Float>>",
335
+ :inside_bounding_box => :"InsideBoundingBox",
342
336
  :inside_polygon => :"Array<Array<Float>>",
343
337
  :natural_languages => :"Array<SupportedLanguage>",
344
338
  :rule_contexts => :"Array<String>",
@@ -379,7 +373,7 @@ module Algolia
379
373
  :mode => :"Mode",
380
374
  :semantic_search => :"SemanticSearch",
381
375
  :advanced_syntax => :"Boolean",
382
- :optional_words => :"Array<String>",
376
+ :optional_words => :"OptionalWords",
383
377
  :disable_exact_on_attributes => :"Array<String>",
384
378
  :exact_on_single_word_query => :"ExactOnSingleWordQuery",
385
379
  :alternatives_as_exact => :"Array<AlternativesAsExact>",
@@ -388,7 +382,6 @@ module Algolia
388
382
  :replace_synonyms_in_highlight => :"Boolean",
389
383
  :min_proximity => :"Integer",
390
384
  :response_fields => :"Array<String>",
391
- :max_facet_hits => :"Integer",
392
385
  :max_values_per_facet => :"Integer",
393
386
  :sort_facet_values_by => :"String",
394
387
  :attribute_criteria_computed_by_min_proximity => :"Boolean",
@@ -403,7 +396,10 @@ module Algolia
403
396
  # List of attributes with nullable: true
404
397
  def self.openapi_nullable
405
398
  Set.new(
406
- []
399
+ [
400
+ :inside_bounding_box,
401
+ :optional_words
402
+ ]
407
403
  )
408
404
  end
409
405
 
@@ -523,9 +519,7 @@ module Algolia
523
519
  end
524
520
 
525
521
  if attributes.key?(:inside_bounding_box)
526
- if (value = attributes[:inside_bounding_box]).is_a?(Array)
527
- self.inside_bounding_box = value
528
- end
522
+ self.inside_bounding_box = attributes[:inside_bounding_box]
529
523
  end
530
524
 
531
525
  if attributes.key?(:inside_polygon)
@@ -711,9 +705,7 @@ module Algolia
711
705
  end
712
706
 
713
707
  if attributes.key?(:optional_words)
714
- if (value = attributes[:optional_words]).is_a?(Array)
715
- self.optional_words = value
716
- end
708
+ self.optional_words = attributes[:optional_words]
717
709
  end
718
710
 
719
711
  if attributes.key?(:disable_exact_on_attributes)
@@ -756,10 +748,6 @@ module Algolia
756
748
  end
757
749
  end
758
750
 
759
- if attributes.key?(:max_facet_hits)
760
- self.max_facet_hits = attributes[:max_facet_hits]
761
- end
762
-
763
751
  if attributes.key?(:max_values_per_facet)
764
752
  self.max_values_per_facet = attributes[:max_values_per_facet]
765
753
  end
@@ -870,7 +858,6 @@ module Algolia
870
858
  replace_synonyms_in_highlight == other.replace_synonyms_in_highlight &&
871
859
  min_proximity == other.min_proximity &&
872
860
  response_fields == other.response_fields &&
873
- max_facet_hits == other.max_facet_hits &&
874
861
  max_values_per_facet == other.max_values_per_facet &&
875
862
  sort_facet_values_by == other.sort_facet_values_by &&
876
863
  attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
@@ -961,7 +948,6 @@ module Algolia
961
948
  replace_synonyms_in_highlight,
962
949
  min_proximity,
963
950
  response_fields,
964
- max_facet_hits,
965
951
  max_values_per_facet,
966
952
  sort_facet_values_by,
967
953
  attribute_criteria_computed_by_min_proximity,
@@ -58,7 +58,6 @@ module Algolia
58
58
  # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
59
59
  attr_accessor :minimum_around_radius
60
60
 
61
- # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
62
61
  attr_accessor :inside_bounding_box
63
62
 
64
63
  # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
@@ -174,7 +173,6 @@ module Algolia
174
173
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
175
174
  attr_accessor :advanced_syntax
176
175
 
177
- # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
178
176
  attr_accessor :optional_words
179
177
 
180
178
  # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
@@ -199,9 +197,6 @@ module Algolia
199
197
  # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
200
198
  attr_accessor :response_fields
201
199
 
202
- # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
203
- attr_accessor :max_facet_hits
204
-
205
200
  # Maximum number of facet values to return for each facet.
206
201
  attr_accessor :max_values_per_facet
207
202
 
@@ -290,7 +285,6 @@ module Algolia
290
285
  :replace_synonyms_in_highlight => :replaceSynonymsInHighlight,
291
286
  :min_proximity => :minProximity,
292
287
  :response_fields => :responseFields,
293
- :max_facet_hits => :maxFacetHits,
294
288
  :max_values_per_facet => :maxValuesPerFacet,
295
289
  :sort_facet_values_by => :sortFacetValuesBy,
296
290
  :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
@@ -327,7 +321,7 @@ module Algolia
327
321
  :around_radius => :"AroundRadius",
328
322
  :around_precision => :"AroundPrecision",
329
323
  :minimum_around_radius => :"Integer",
330
- :inside_bounding_box => :"Array<Array<Float>>",
324
+ :inside_bounding_box => :"InsideBoundingBox",
331
325
  :inside_polygon => :"Array<Array<Float>>",
332
326
  :natural_languages => :"Array<SupportedLanguage>",
333
327
  :rule_contexts => :"Array<String>",
@@ -368,7 +362,7 @@ module Algolia
368
362
  :mode => :"Mode",
369
363
  :semantic_search => :"SemanticSearch",
370
364
  :advanced_syntax => :"Boolean",
371
- :optional_words => :"Array<String>",
365
+ :optional_words => :"OptionalWords",
372
366
  :disable_exact_on_attributes => :"Array<String>",
373
367
  :exact_on_single_word_query => :"ExactOnSingleWordQuery",
374
368
  :alternatives_as_exact => :"Array<AlternativesAsExact>",
@@ -377,7 +371,6 @@ module Algolia
377
371
  :replace_synonyms_in_highlight => :"Boolean",
378
372
  :min_proximity => :"Integer",
379
373
  :response_fields => :"Array<String>",
380
- :max_facet_hits => :"Integer",
381
374
  :max_values_per_facet => :"Integer",
382
375
  :sort_facet_values_by => :"String",
383
376
  :attribute_criteria_computed_by_min_proximity => :"Boolean",
@@ -390,7 +383,10 @@ module Algolia
390
383
  # List of attributes with nullable: true
391
384
  def self.openapi_nullable
392
385
  Set.new(
393
- []
386
+ [
387
+ :inside_bounding_box,
388
+ :optional_words
389
+ ]
394
390
  )
395
391
  end
396
392
 
@@ -506,9 +502,7 @@ module Algolia
506
502
  end
507
503
 
508
504
  if attributes.key?(:inside_bounding_box)
509
- if (value = attributes[:inside_bounding_box]).is_a?(Array)
510
- self.inside_bounding_box = value
511
- end
505
+ self.inside_bounding_box = attributes[:inside_bounding_box]
512
506
  end
513
507
 
514
508
  if attributes.key?(:inside_polygon)
@@ -694,9 +688,7 @@ module Algolia
694
688
  end
695
689
 
696
690
  if attributes.key?(:optional_words)
697
- if (value = attributes[:optional_words]).is_a?(Array)
698
- self.optional_words = value
699
- end
691
+ self.optional_words = attributes[:optional_words]
700
692
  end
701
693
 
702
694
  if attributes.key?(:disable_exact_on_attributes)
@@ -739,10 +731,6 @@ module Algolia
739
731
  end
740
732
  end
741
733
 
742
- if attributes.key?(:max_facet_hits)
743
- self.max_facet_hits = attributes[:max_facet_hits]
744
- end
745
-
746
734
  if attributes.key?(:max_values_per_facet)
747
735
  self.max_values_per_facet = attributes[:max_values_per_facet]
748
736
  end
@@ -842,7 +830,6 @@ module Algolia
842
830
  replace_synonyms_in_highlight == other.replace_synonyms_in_highlight &&
843
831
  min_proximity == other.min_proximity &&
844
832
  response_fields == other.response_fields &&
845
- max_facet_hits == other.max_facet_hits &&
846
833
  max_values_per_facet == other.max_values_per_facet &&
847
834
  sort_facet_values_by == other.sort_facet_values_by &&
848
835
  attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
@@ -930,7 +917,6 @@ module Algolia
930
917
  replace_synonyms_in_highlight,
931
918
  min_proximity,
932
919
  response_fields,
933
- max_facet_hits,
934
920
  max_values_per_facet,
935
921
  sort_facet_values_by,
936
922
  attribute_criteria_computed_by_min_proximity,
@@ -57,6 +57,9 @@ module Algolia
57
57
  # Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
58
58
  attr_accessor :attribute_for_distinct
59
59
 
60
+ # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
61
+ attr_accessor :max_facet_hits
62
+
60
63
  # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
61
64
  attr_accessor :attributes_to_retrieve
62
65
 
@@ -134,7 +137,6 @@ module Algolia
134
137
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
135
138
  attr_accessor :advanced_syntax
136
139
 
137
- # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
138
140
  attr_accessor :optional_words
139
141
 
140
142
  # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
@@ -159,9 +161,6 @@ module Algolia
159
161
  # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
160
162
  attr_accessor :response_fields
161
163
 
162
- # Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
163
- attr_accessor :max_facet_hits
164
-
165
164
  # Maximum number of facet values to return for each facet.
166
165
  attr_accessor :max_values_per_facet
167
166
 
@@ -201,6 +200,7 @@ module Algolia
201
200
  :user_data => :userData,
202
201
  :custom_normalization => :customNormalization,
203
202
  :attribute_for_distinct => :attributeForDistinct,
203
+ :max_facet_hits => :maxFacetHits,
204
204
  :attributes_to_retrieve => :attributesToRetrieve,
205
205
  :ranking => :ranking,
206
206
  :custom_ranking => :customRanking,
@@ -238,7 +238,6 @@ module Algolia
238
238
  :replace_synonyms_in_highlight => :replaceSynonymsInHighlight,
239
239
  :min_proximity => :minProximity,
240
240
  :response_fields => :responseFields,
241
- :max_facet_hits => :maxFacetHits,
242
241
  :max_values_per_facet => :maxValuesPerFacet,
243
242
  :sort_facet_values_by => :sortFacetValuesBy,
244
243
  :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
@@ -274,6 +273,7 @@ module Algolia
274
273
  :user_data => :"Object",
275
274
  :custom_normalization => :"Hash<String, Hash<String, String>>",
276
275
  :attribute_for_distinct => :"String",
276
+ :max_facet_hits => :"Integer",
277
277
  :attributes_to_retrieve => :"Array<String>",
278
278
  :ranking => :"Array<String>",
279
279
  :custom_ranking => :"Array<String>",
@@ -302,7 +302,7 @@ module Algolia
302
302
  :mode => :"Mode",
303
303
  :semantic_search => :"SemanticSearch",
304
304
  :advanced_syntax => :"Boolean",
305
- :optional_words => :"Array<String>",
305
+ :optional_words => :"OptionalWords",
306
306
  :disable_exact_on_attributes => :"Array<String>",
307
307
  :exact_on_single_word_query => :"ExactOnSingleWordQuery",
308
308
  :alternatives_as_exact => :"Array<AlternativesAsExact>",
@@ -311,7 +311,6 @@ module Algolia
311
311
  :replace_synonyms_in_highlight => :"Boolean",
312
312
  :min_proximity => :"Integer",
313
313
  :response_fields => :"Array<String>",
314
- :max_facet_hits => :"Integer",
315
314
  :max_values_per_facet => :"Integer",
316
315
  :sort_facet_values_by => :"String",
317
316
  :attribute_criteria_computed_by_min_proximity => :"Boolean",
@@ -325,7 +324,9 @@ module Algolia
325
324
  # List of attributes with nullable: true
326
325
  def self.openapi_nullable
327
326
  Set.new(
328
- []
327
+ [
328
+ :optional_words
329
+ ]
329
330
  )
330
331
  end
331
332
 
@@ -450,6 +451,10 @@ module Algolia
450
451
  self.attribute_for_distinct = attributes[:attribute_for_distinct]
451
452
  end
452
453
 
454
+ if attributes.key?(:max_facet_hits)
455
+ self.max_facet_hits = attributes[:max_facet_hits]
456
+ end
457
+
453
458
  if attributes.key?(:attributes_to_retrieve)
454
459
  if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
455
460
  self.attributes_to_retrieve = value
@@ -577,9 +582,7 @@ module Algolia
577
582
  end
578
583
 
579
584
  if attributes.key?(:optional_words)
580
- if (value = attributes[:optional_words]).is_a?(Array)
581
- self.optional_words = value
582
- end
585
+ self.optional_words = attributes[:optional_words]
583
586
  end
584
587
 
585
588
  if attributes.key?(:disable_exact_on_attributes)
@@ -622,10 +625,6 @@ module Algolia
622
625
  end
623
626
  end
624
627
 
625
- if attributes.key?(:max_facet_hits)
626
- self.max_facet_hits = attributes[:max_facet_hits]
627
- end
628
-
629
628
  if attributes.key?(:max_values_per_facet)
630
629
  self.max_values_per_facet = attributes[:max_values_per_facet]
631
630
  end
@@ -677,6 +676,7 @@ module Algolia
677
676
  user_data == other.user_data &&
678
677
  custom_normalization == other.custom_normalization &&
679
678
  attribute_for_distinct == other.attribute_for_distinct &&
679
+ max_facet_hits == other.max_facet_hits &&
680
680
  attributes_to_retrieve == other.attributes_to_retrieve &&
681
681
  ranking == other.ranking &&
682
682
  custom_ranking == other.custom_ranking &&
@@ -714,7 +714,6 @@ module Algolia
714
714
  replace_synonyms_in_highlight == other.replace_synonyms_in_highlight &&
715
715
  min_proximity == other.min_proximity &&
716
716
  response_fields == other.response_fields &&
717
- max_facet_hits == other.max_facet_hits &&
718
717
  max_values_per_facet == other.max_values_per_facet &&
719
718
  sort_facet_values_by == other.sort_facet_values_by &&
720
719
  attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
@@ -751,6 +750,7 @@ module Algolia
751
750
  user_data,
752
751
  custom_normalization,
753
752
  attribute_for_distinct,
753
+ max_facet_hits,
754
754
  attributes_to_retrieve,
755
755
  ranking,
756
756
  custom_ranking,
@@ -788,7 +788,6 @@ module Algolia
788
788
  replace_synonyms_in_highlight,
789
789
  min_proximity,
790
790
  response_fields,
791
- max_facet_hits,
792
791
  max_values_per_facet,
793
792
  sort_facet_values_by,
794
793
  attribute_criteria_computed_by_min_proximity,
@@ -1,5 +1,5 @@
1
1
  # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  module Algolia
4
- VERSION = "3.8.0".freeze
4
+ VERSION = "3.8.1".freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.8.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-14 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -466,12 +466,14 @@ files:
466
466
  - lib/algolia/models/recommend/highlight_result_option.rb
467
467
  - lib/algolia/models/recommend/ignore_plurals.rb
468
468
  - lib/algolia/models/recommend/index_settings_facets.rb
469
+ - lib/algolia/models/recommend/inside_bounding_box.rb
469
470
  - lib/algolia/models/recommend/looking_similar_model.rb
470
471
  - lib/algolia/models/recommend/looking_similar_query.rb
471
472
  - lib/algolia/models/recommend/match_level.rb
472
473
  - lib/algolia/models/recommend/matched_geo_location.rb
473
474
  - lib/algolia/models/recommend/numeric_filters.rb
474
475
  - lib/algolia/models/recommend/optional_filters.rb
476
+ - lib/algolia/models/recommend/optional_words.rb
475
477
  - lib/algolia/models/recommend/params_consequence.rb
476
478
  - lib/algolia/models/recommend/personalization.rb
477
479
  - lib/algolia/models/recommend/promote_consequence_object.rb
@@ -487,8 +489,6 @@ files:
487
489
  - lib/algolia/models/recommend/recommendations_hit.rb
488
490
  - lib/algolia/models/recommend/recommendations_request.rb
489
491
  - lib/algolia/models/recommend/recommendations_results.rb
490
- - lib/algolia/models/recommend/recommended_for_you_model.rb
491
- - lib/algolia/models/recommend/recommended_for_you_query.rb
492
492
  - lib/algolia/models/recommend/redirect.rb
493
493
  - lib/algolia/models/recommend/redirect_rule_index_data.rb
494
494
  - lib/algolia/models/recommend/redirect_rule_index_metadata.rb
@@ -594,6 +594,7 @@ files:
594
594
  - lib/algolia/models/search/hit.rb
595
595
  - lib/algolia/models/search/ignore_plurals.rb
596
596
  - lib/algolia/models/search/index_settings.rb
597
+ - lib/algolia/models/search/inside_bounding_box.rb
597
598
  - lib/algolia/models/search/languages.rb
598
599
  - lib/algolia/models/search/list_api_keys_response.rb
599
600
  - lib/algolia/models/search/list_clusters_response.rb
@@ -611,6 +612,7 @@ files:
611
612
  - lib/algolia/models/search/operation_index_params.rb
612
613
  - lib/algolia/models/search/operation_type.rb
613
614
  - lib/algolia/models/search/optional_filters.rb
615
+ - lib/algolia/models/search/optional_words.rb
614
616
  - lib/algolia/models/search/personalization.rb
615
617
  - lib/algolia/models/search/promote.rb
616
618
  - lib/algolia/models/search/promote_object_id.rb
@@ -1,31 +0,0 @@
1
- # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
-
3
- require "date"
4
- require "time"
5
-
6
- module Algolia
7
- module Recommend
8
- class RecommendedForYouModel
9
- RECOMMENDED_FOR_YOU = "recommended-for-you".freeze
10
-
11
- def self.all_vars
12
- @all_vars ||= [RECOMMENDED_FOR_YOU].freeze
13
- end
14
-
15
- # Builds the enum from string
16
- # @param [String] The enum value in the form of the string
17
- # @return [String] The enum value
18
- def self.build_from_hash(value)
19
- new.build_from_hash(value)
20
- end
21
-
22
- # Builds the enum from string
23
- # @param [String] The enum value in the form of the string
24
- # @return [String] The enum value
25
- def build_from_hash(value)
26
- return value if RecommendedForYouModel.all_vars.include?(value)
27
- raise "Invalid ENUM value #{value} for class #RecommendedForYouModel"
28
- end
29
- end
30
- end
31
- end