algolia 3.3.2 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,9 +6,6 @@ require "time"
6
6
  module Algolia
7
7
  module Recommend
8
8
  class FallbackParams
9
- # Search query.
10
- attr_accessor :query
11
-
12
9
  # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
13
10
  attr_accessor :similar_query
14
11
 
@@ -35,15 +32,6 @@ module Algolia
35
32
  # 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`.
36
33
  attr_accessor :faceting_after_distinct
37
34
 
38
- # Page of search results to retrieve.
39
- attr_accessor :page
40
-
41
- # Position of the first hit to retrieve.
42
- attr_accessor :offset
43
-
44
- # Number of hits to retrieve (used in combination with `offset`).
45
- attr_accessor :length
46
-
47
35
  # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
48
36
  attr_accessor :around_lat_lng
49
37
 
@@ -96,15 +84,66 @@ module Algolia
96
84
  # Whether to enable A/B testing for this search.
97
85
  attr_accessor :enable_ab_test
98
86
 
87
+ # Search query.
88
+ attr_accessor :query
89
+
90
+ # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn't evalue the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
91
+ attr_accessor :attributes_for_faceting
92
+
93
+ # Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
94
+ attr_accessor :replicas
95
+
96
+ # Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.
97
+ attr_accessor :pagination_limited_to
98
+
99
+ # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
100
+ attr_accessor :unretrievable_attributes
101
+
102
+ # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
103
+ attr_accessor :disable_typo_tolerance_on_words
104
+
105
+ # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
106
+ attr_accessor :attributes_to_transliterate
107
+
108
+ # Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
109
+ attr_accessor :camel_case_attributes
110
+
111
+ # Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
112
+ attr_accessor :decompounded_attributes
113
+
114
+ # Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
115
+ attr_accessor :index_languages
116
+
117
+ # Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
118
+ attr_accessor :disable_prefix_on_attributes
119
+
120
+ # Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
121
+ attr_accessor :allow_compression_of_integer_array
122
+
123
+ # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
124
+ attr_accessor :numeric_attributes_for_filtering
125
+
126
+ # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
127
+ attr_accessor :separators_to_index
128
+
129
+ # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
130
+ attr_accessor :searchable_attributes
131
+
132
+ # An object with custom data. You can store up to 32kB as custom data.
133
+ attr_accessor :user_data
134
+
135
+ # Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
136
+ attr_accessor :custom_normalization
137
+
138
+ # 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.
139
+ attr_accessor :attribute_for_distinct
140
+
99
141
  # 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.
100
142
  attr_accessor :attributes_to_retrieve
101
143
 
102
144
  # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
103
145
  attr_accessor :ranking
104
146
 
105
- # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
106
- attr_accessor :custom_ranking
107
-
108
147
  # 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.
109
148
  attr_accessor :relevancy_strictness
110
149
 
@@ -126,9 +165,6 @@ module Algolia
126
165
  # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
127
166
  attr_accessor :restrict_highlight_and_snippet_arrays
128
167
 
129
- # Number of hits per page.
130
- attr_accessor :hits_per_page
131
-
132
168
  # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
133
169
  attr_accessor :min_word_sizefor1_typo
134
170
 
@@ -147,9 +183,6 @@ module Algolia
147
183
 
148
184
  attr_accessor :remove_stop_words
149
185
 
150
- # Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
151
- attr_accessor :keep_diacritics_on_characters
152
-
153
186
  # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
154
187
  attr_accessor :query_languages
155
188
 
@@ -166,10 +199,6 @@ module Algolia
166
199
 
167
200
  attr_accessor :remove_words_if_no_results
168
201
 
169
- attr_accessor :mode
170
-
171
- attr_accessor :semantic_search
172
-
173
202
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
174
203
  attr_accessor :advanced_syntax
175
204
 
@@ -220,7 +249,6 @@ module Algolia
220
249
  # Attribute mapping from ruby-style variable name to JSON key.
221
250
  def self.attribute_map
222
251
  {
223
- :query => :query,
224
252
  :similar_query => :similarQuery,
225
253
  :filters => :filters,
226
254
  :facet_filters => :facetFilters,
@@ -231,9 +259,6 @@ module Algolia
231
259
  :restrict_searchable_attributes => :restrictSearchableAttributes,
232
260
  :facets => :facets,
233
261
  :faceting_after_distinct => :facetingAfterDistinct,
234
- :page => :page,
235
- :offset => :offset,
236
- :length => :length,
237
262
  :around_lat_lng => :aroundLatLng,
238
263
  :around_lat_lng_via_ip => :aroundLatLngViaIP,
239
264
  :around_radius => :aroundRadius,
@@ -252,9 +277,26 @@ module Algolia
252
277
  :analytics_tags => :analyticsTags,
253
278
  :percentile_computation => :percentileComputation,
254
279
  :enable_ab_test => :enableABTest,
280
+ :query => :query,
281
+ :attributes_for_faceting => :attributesForFaceting,
282
+ :replicas => :replicas,
283
+ :pagination_limited_to => :paginationLimitedTo,
284
+ :unretrievable_attributes => :unretrievableAttributes,
285
+ :disable_typo_tolerance_on_words => :disableTypoToleranceOnWords,
286
+ :attributes_to_transliterate => :attributesToTransliterate,
287
+ :camel_case_attributes => :camelCaseAttributes,
288
+ :decompounded_attributes => :decompoundedAttributes,
289
+ :index_languages => :indexLanguages,
290
+ :disable_prefix_on_attributes => :disablePrefixOnAttributes,
291
+ :allow_compression_of_integer_array => :allowCompressionOfIntegerArray,
292
+ :numeric_attributes_for_filtering => :numericAttributesForFiltering,
293
+ :separators_to_index => :separatorsToIndex,
294
+ :searchable_attributes => :searchableAttributes,
295
+ :user_data => :userData,
296
+ :custom_normalization => :customNormalization,
297
+ :attribute_for_distinct => :attributeForDistinct,
255
298
  :attributes_to_retrieve => :attributesToRetrieve,
256
299
  :ranking => :ranking,
257
- :custom_ranking => :customRanking,
258
300
  :relevancy_strictness => :relevancyStrictness,
259
301
  :attributes_to_highlight => :attributesToHighlight,
260
302
  :attributes_to_snippet => :attributesToSnippet,
@@ -262,7 +304,6 @@ module Algolia
262
304
  :highlight_post_tag => :highlightPostTag,
263
305
  :snippet_ellipsis_text => :snippetEllipsisText,
264
306
  :restrict_highlight_and_snippet_arrays => :restrictHighlightAndSnippetArrays,
265
- :hits_per_page => :hitsPerPage,
266
307
  :min_word_sizefor1_typo => :minWordSizefor1Typo,
267
308
  :min_word_sizefor2_typos => :minWordSizefor2Typos,
268
309
  :typo_tolerance => :typoTolerance,
@@ -270,15 +311,12 @@ module Algolia
270
311
  :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes,
271
312
  :ignore_plurals => :ignorePlurals,
272
313
  :remove_stop_words => :removeStopWords,
273
- :keep_diacritics_on_characters => :keepDiacriticsOnCharacters,
274
314
  :query_languages => :queryLanguages,
275
315
  :decompound_query => :decompoundQuery,
276
316
  :enable_rules => :enableRules,
277
317
  :enable_personalization => :enablePersonalization,
278
318
  :query_type => :queryType,
279
319
  :remove_words_if_no_results => :removeWordsIfNoResults,
280
- :mode => :mode,
281
- :semantic_search => :semanticSearch,
282
320
  :advanced_syntax => :advancedSyntax,
283
321
  :optional_words => :optionalWords,
284
322
  :disable_exact_on_attributes => :disableExactOnAttributes,
@@ -307,7 +345,6 @@ module Algolia
307
345
  # Attribute type mapping.
308
346
  def self.types_mapping
309
347
  {
310
- :query => :"String",
311
348
  :similar_query => :"String",
312
349
  :filters => :"String",
313
350
  :facet_filters => :"FacetFilters",
@@ -318,9 +355,6 @@ module Algolia
318
355
  :restrict_searchable_attributes => :"Array<String>",
319
356
  :facets => :"Array<String>",
320
357
  :faceting_after_distinct => :"Boolean",
321
- :page => :"Integer",
322
- :offset => :"Integer",
323
- :length => :"Integer",
324
358
  :around_lat_lng => :"String",
325
359
  :around_lat_lng_via_ip => :"Boolean",
326
360
  :around_radius => :"AroundRadius",
@@ -339,9 +373,26 @@ module Algolia
339
373
  :analytics_tags => :"Array<String>",
340
374
  :percentile_computation => :"Boolean",
341
375
  :enable_ab_test => :"Boolean",
376
+ :query => :"String",
377
+ :attributes_for_faceting => :"Array<String>",
378
+ :replicas => :"Array<String>",
379
+ :pagination_limited_to => :"Integer",
380
+ :unretrievable_attributes => :"Array<String>",
381
+ :disable_typo_tolerance_on_words => :"Array<String>",
382
+ :attributes_to_transliterate => :"Array<String>",
383
+ :camel_case_attributes => :"Array<String>",
384
+ :decompounded_attributes => :"Object",
385
+ :index_languages => :"Array<SupportedLanguage>",
386
+ :disable_prefix_on_attributes => :"Array<String>",
387
+ :allow_compression_of_integer_array => :"Boolean",
388
+ :numeric_attributes_for_filtering => :"Array<String>",
389
+ :separators_to_index => :"String",
390
+ :searchable_attributes => :"Array<String>",
391
+ :user_data => :"Object",
392
+ :custom_normalization => :"Hash<String, Hash<String, String>>",
393
+ :attribute_for_distinct => :"String",
342
394
  :attributes_to_retrieve => :"Array<String>",
343
395
  :ranking => :"Array<String>",
344
- :custom_ranking => :"Array<String>",
345
396
  :relevancy_strictness => :"Integer",
346
397
  :attributes_to_highlight => :"Array<String>",
347
398
  :attributes_to_snippet => :"Array<String>",
@@ -349,7 +400,6 @@ module Algolia
349
400
  :highlight_post_tag => :"String",
350
401
  :snippet_ellipsis_text => :"String",
351
402
  :restrict_highlight_and_snippet_arrays => :"Boolean",
352
- :hits_per_page => :"Integer",
353
403
  :min_word_sizefor1_typo => :"Integer",
354
404
  :min_word_sizefor2_typos => :"Integer",
355
405
  :typo_tolerance => :"TypoTolerance",
@@ -357,15 +407,12 @@ module Algolia
357
407
  :disable_typo_tolerance_on_attributes => :"Array<String>",
358
408
  :ignore_plurals => :"IgnorePlurals",
359
409
  :remove_stop_words => :"RemoveStopWords",
360
- :keep_diacritics_on_characters => :"String",
361
410
  :query_languages => :"Array<SupportedLanguage>",
362
411
  :decompound_query => :"Boolean",
363
412
  :enable_rules => :"Boolean",
364
413
  :enable_personalization => :"Boolean",
365
414
  :query_type => :"QueryType",
366
415
  :remove_words_if_no_results => :"RemoveWordsIfNoResults",
367
- :mode => :"Mode",
368
- :semantic_search => :"SemanticSearch",
369
416
  :advanced_syntax => :"Boolean",
370
417
  :optional_words => :"Array<String>",
371
418
  :disable_exact_on_attributes => :"Array<String>",
@@ -396,7 +443,7 @@ module Algolia
396
443
  # List of class defined in allOf (OpenAPI v3)
397
444
  def self.openapi_all_of
398
445
  [
399
- :"SearchParamsObject"
446
+ :"RecommendSearchParams"
400
447
  ]
401
448
  end
402
449
 
@@ -423,10 +470,6 @@ module Algolia
423
470
  h[k.to_sym] = v
424
471
  }
425
472
 
426
- if attributes.key?(:query)
427
- self.query = attributes[:query]
428
- end
429
-
430
473
  if attributes.key?(:similar_query)
431
474
  self.similar_query = attributes[:similar_query]
432
475
  end
@@ -471,18 +514,6 @@ module Algolia
471
514
  self.faceting_after_distinct = attributes[:faceting_after_distinct]
472
515
  end
473
516
 
474
- if attributes.key?(:page)
475
- self.page = attributes[:page]
476
- end
477
-
478
- if attributes.key?(:offset)
479
- self.offset = attributes[:offset]
480
- end
481
-
482
- if attributes.key?(:length)
483
- self.length = attributes[:length]
484
- end
485
-
486
517
  if attributes.key?(:around_lat_lng)
487
518
  self.around_lat_lng = attributes[:around_lat_lng]
488
519
  end
@@ -565,6 +596,100 @@ module Algolia
565
596
  self.enable_ab_test = attributes[:enable_ab_test]
566
597
  end
567
598
 
599
+ if attributes.key?(:query)
600
+ self.query = attributes[:query]
601
+ end
602
+
603
+ if attributes.key?(:attributes_for_faceting)
604
+ if (value = attributes[:attributes_for_faceting]).is_a?(Array)
605
+ self.attributes_for_faceting = value
606
+ end
607
+ end
608
+
609
+ if attributes.key?(:replicas)
610
+ if (value = attributes[:replicas]).is_a?(Array)
611
+ self.replicas = value
612
+ end
613
+ end
614
+
615
+ if attributes.key?(:pagination_limited_to)
616
+ self.pagination_limited_to = attributes[:pagination_limited_to]
617
+ end
618
+
619
+ if attributes.key?(:unretrievable_attributes)
620
+ if (value = attributes[:unretrievable_attributes]).is_a?(Array)
621
+ self.unretrievable_attributes = value
622
+ end
623
+ end
624
+
625
+ if attributes.key?(:disable_typo_tolerance_on_words)
626
+ if (value = attributes[:disable_typo_tolerance_on_words]).is_a?(Array)
627
+ self.disable_typo_tolerance_on_words = value
628
+ end
629
+ end
630
+
631
+ if attributes.key?(:attributes_to_transliterate)
632
+ if (value = attributes[:attributes_to_transliterate]).is_a?(Array)
633
+ self.attributes_to_transliterate = value
634
+ end
635
+ end
636
+
637
+ if attributes.key?(:camel_case_attributes)
638
+ if (value = attributes[:camel_case_attributes]).is_a?(Array)
639
+ self.camel_case_attributes = value
640
+ end
641
+ end
642
+
643
+ if attributes.key?(:decompounded_attributes)
644
+ self.decompounded_attributes = attributes[:decompounded_attributes]
645
+ end
646
+
647
+ if attributes.key?(:index_languages)
648
+ if (value = attributes[:index_languages]).is_a?(Array)
649
+ self.index_languages = value
650
+ end
651
+ end
652
+
653
+ if attributes.key?(:disable_prefix_on_attributes)
654
+ if (value = attributes[:disable_prefix_on_attributes]).is_a?(Array)
655
+ self.disable_prefix_on_attributes = value
656
+ end
657
+ end
658
+
659
+ if attributes.key?(:allow_compression_of_integer_array)
660
+ self.allow_compression_of_integer_array = attributes[:allow_compression_of_integer_array]
661
+ end
662
+
663
+ if attributes.key?(:numeric_attributes_for_filtering)
664
+ if (value = attributes[:numeric_attributes_for_filtering]).is_a?(Array)
665
+ self.numeric_attributes_for_filtering = value
666
+ end
667
+ end
668
+
669
+ if attributes.key?(:separators_to_index)
670
+ self.separators_to_index = attributes[:separators_to_index]
671
+ end
672
+
673
+ if attributes.key?(:searchable_attributes)
674
+ if (value = attributes[:searchable_attributes]).is_a?(Array)
675
+ self.searchable_attributes = value
676
+ end
677
+ end
678
+
679
+ if attributes.key?(:user_data)
680
+ self.user_data = attributes[:user_data]
681
+ end
682
+
683
+ if attributes.key?(:custom_normalization)
684
+ if (value = attributes[:custom_normalization]).is_a?(Hash)
685
+ self.custom_normalization = value
686
+ end
687
+ end
688
+
689
+ if attributes.key?(:attribute_for_distinct)
690
+ self.attribute_for_distinct = attributes[:attribute_for_distinct]
691
+ end
692
+
568
693
  if attributes.key?(:attributes_to_retrieve)
569
694
  if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
570
695
  self.attributes_to_retrieve = value
@@ -577,12 +702,6 @@ module Algolia
577
702
  end
578
703
  end
579
704
 
580
- if attributes.key?(:custom_ranking)
581
- if (value = attributes[:custom_ranking]).is_a?(Array)
582
- self.custom_ranking = value
583
- end
584
- end
585
-
586
705
  if attributes.key?(:relevancy_strictness)
587
706
  self.relevancy_strictness = attributes[:relevancy_strictness]
588
707
  end
@@ -615,10 +734,6 @@ module Algolia
615
734
  self.restrict_highlight_and_snippet_arrays = attributes[:restrict_highlight_and_snippet_arrays]
616
735
  end
617
736
 
618
- if attributes.key?(:hits_per_page)
619
- self.hits_per_page = attributes[:hits_per_page]
620
- end
621
-
622
737
  if attributes.key?(:min_word_sizefor1_typo)
623
738
  self.min_word_sizefor1_typo = attributes[:min_word_sizefor1_typo]
624
739
  end
@@ -649,10 +764,6 @@ module Algolia
649
764
  self.remove_stop_words = attributes[:remove_stop_words]
650
765
  end
651
766
 
652
- if attributes.key?(:keep_diacritics_on_characters)
653
- self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters]
654
- end
655
-
656
767
  if attributes.key?(:query_languages)
657
768
  if (value = attributes[:query_languages]).is_a?(Array)
658
769
  self.query_languages = value
@@ -679,14 +790,6 @@ module Algolia
679
790
  self.remove_words_if_no_results = attributes[:remove_words_if_no_results]
680
791
  end
681
792
 
682
- if attributes.key?(:mode)
683
- self.mode = attributes[:mode]
684
- end
685
-
686
- if attributes.key?(:semantic_search)
687
- self.semantic_search = attributes[:semantic_search]
688
- end
689
-
690
793
  if attributes.key?(:advanced_syntax)
691
794
  self.advanced_syntax = attributes[:advanced_syntax]
692
795
  end
@@ -766,38 +869,6 @@ module Algolia
766
869
  end
767
870
  end
768
871
 
769
- # Custom attribute writer method with validation
770
- # @param [Object] page Value to be assigned
771
- def page=(page)
772
- if page.nil?
773
- raise ArgumentError, "page cannot be nil"
774
- end
775
-
776
- if page < 0
777
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
778
- end
779
-
780
- @page = page
781
- end
782
-
783
- # Custom attribute writer method with validation
784
- # @param [Object] length Value to be assigned
785
- def length=(length)
786
- if length.nil?
787
- raise ArgumentError, "length cannot be nil"
788
- end
789
-
790
- if length > 1000
791
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
792
- end
793
-
794
- if length < 0
795
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
796
- end
797
-
798
- @length = length
799
- end
800
-
801
872
  # Custom attribute writer method with validation
802
873
  # @param [Object] minimum_around_radius Value to be assigned
803
874
  def minimum_around_radius=(minimum_around_radius)
@@ -831,21 +902,17 @@ module Algolia
831
902
  end
832
903
 
833
904
  # Custom attribute writer method with validation
834
- # @param [Object] hits_per_page Value to be assigned
835
- def hits_per_page=(hits_per_page)
836
- if hits_per_page.nil?
837
- raise ArgumentError, "hits_per_page cannot be nil"
838
- end
839
-
840
- if hits_per_page > 1000
841
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
905
+ # @param [Object] pagination_limited_to Value to be assigned
906
+ def pagination_limited_to=(pagination_limited_to)
907
+ if pagination_limited_to.nil?
908
+ raise ArgumentError, "pagination_limited_to cannot be nil"
842
909
  end
843
910
 
844
- if hits_per_page < 1
845
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
911
+ if pagination_limited_to > 20000
912
+ raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
846
913
  end
847
914
 
848
- @hits_per_page = hits_per_page
915
+ @pagination_limited_to = pagination_limited_to
849
916
  end
850
917
 
851
918
  # Custom attribute writer method with validation
@@ -899,7 +966,6 @@ module Algolia
899
966
  def ==(other)
900
967
  return true if self.equal?(other)
901
968
  self.class == other.class &&
902
- query == other.query &&
903
969
  similar_query == other.similar_query &&
904
970
  filters == other.filters &&
905
971
  facet_filters == other.facet_filters &&
@@ -910,9 +976,6 @@ module Algolia
910
976
  restrict_searchable_attributes == other.restrict_searchable_attributes &&
911
977
  facets == other.facets &&
912
978
  faceting_after_distinct == other.faceting_after_distinct &&
913
- page == other.page &&
914
- offset == other.offset &&
915
- length == other.length &&
916
979
  around_lat_lng == other.around_lat_lng &&
917
980
  around_lat_lng_via_ip == other.around_lat_lng_via_ip &&
918
981
  around_radius == other.around_radius &&
@@ -931,9 +994,26 @@ module Algolia
931
994
  analytics_tags == other.analytics_tags &&
932
995
  percentile_computation == other.percentile_computation &&
933
996
  enable_ab_test == other.enable_ab_test &&
997
+ query == other.query &&
998
+ attributes_for_faceting == other.attributes_for_faceting &&
999
+ replicas == other.replicas &&
1000
+ pagination_limited_to == other.pagination_limited_to &&
1001
+ unretrievable_attributes == other.unretrievable_attributes &&
1002
+ disable_typo_tolerance_on_words == other.disable_typo_tolerance_on_words &&
1003
+ attributes_to_transliterate == other.attributes_to_transliterate &&
1004
+ camel_case_attributes == other.camel_case_attributes &&
1005
+ decompounded_attributes == other.decompounded_attributes &&
1006
+ index_languages == other.index_languages &&
1007
+ disable_prefix_on_attributes == other.disable_prefix_on_attributes &&
1008
+ allow_compression_of_integer_array == other.allow_compression_of_integer_array &&
1009
+ numeric_attributes_for_filtering == other.numeric_attributes_for_filtering &&
1010
+ separators_to_index == other.separators_to_index &&
1011
+ searchable_attributes == other.searchable_attributes &&
1012
+ user_data == other.user_data &&
1013
+ custom_normalization == other.custom_normalization &&
1014
+ attribute_for_distinct == other.attribute_for_distinct &&
934
1015
  attributes_to_retrieve == other.attributes_to_retrieve &&
935
1016
  ranking == other.ranking &&
936
- custom_ranking == other.custom_ranking &&
937
1017
  relevancy_strictness == other.relevancy_strictness &&
938
1018
  attributes_to_highlight == other.attributes_to_highlight &&
939
1019
  attributes_to_snippet == other.attributes_to_snippet &&
@@ -941,7 +1021,6 @@ module Algolia
941
1021
  highlight_post_tag == other.highlight_post_tag &&
942
1022
  snippet_ellipsis_text == other.snippet_ellipsis_text &&
943
1023
  restrict_highlight_and_snippet_arrays == other.restrict_highlight_and_snippet_arrays &&
944
- hits_per_page == other.hits_per_page &&
945
1024
  min_word_sizefor1_typo == other.min_word_sizefor1_typo &&
946
1025
  min_word_sizefor2_typos == other.min_word_sizefor2_typos &&
947
1026
  typo_tolerance == other.typo_tolerance &&
@@ -949,15 +1028,12 @@ module Algolia
949
1028
  disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes &&
950
1029
  ignore_plurals == other.ignore_plurals &&
951
1030
  remove_stop_words == other.remove_stop_words &&
952
- keep_diacritics_on_characters == other.keep_diacritics_on_characters &&
953
1031
  query_languages == other.query_languages &&
954
1032
  decompound_query == other.decompound_query &&
955
1033
  enable_rules == other.enable_rules &&
956
1034
  enable_personalization == other.enable_personalization &&
957
1035
  query_type == other.query_type &&
958
1036
  remove_words_if_no_results == other.remove_words_if_no_results &&
959
- mode == other.mode &&
960
- semantic_search == other.semantic_search &&
961
1037
  advanced_syntax == other.advanced_syntax &&
962
1038
  optional_words == other.optional_words &&
963
1039
  disable_exact_on_attributes == other.disable_exact_on_attributes &&
@@ -987,7 +1063,6 @@ module Algolia
987
1063
  # @return [Integer] Hash code
988
1064
  def hash
989
1065
  [
990
- query,
991
1066
  similar_query,
992
1067
  filters,
993
1068
  facet_filters,
@@ -998,9 +1073,6 @@ module Algolia
998
1073
  restrict_searchable_attributes,
999
1074
  facets,
1000
1075
  faceting_after_distinct,
1001
- page,
1002
- offset,
1003
- length,
1004
1076
  around_lat_lng,
1005
1077
  around_lat_lng_via_ip,
1006
1078
  around_radius,
@@ -1019,9 +1091,26 @@ module Algolia
1019
1091
  analytics_tags,
1020
1092
  percentile_computation,
1021
1093
  enable_ab_test,
1094
+ query,
1095
+ attributes_for_faceting,
1096
+ replicas,
1097
+ pagination_limited_to,
1098
+ unretrievable_attributes,
1099
+ disable_typo_tolerance_on_words,
1100
+ attributes_to_transliterate,
1101
+ camel_case_attributes,
1102
+ decompounded_attributes,
1103
+ index_languages,
1104
+ disable_prefix_on_attributes,
1105
+ allow_compression_of_integer_array,
1106
+ numeric_attributes_for_filtering,
1107
+ separators_to_index,
1108
+ searchable_attributes,
1109
+ user_data,
1110
+ custom_normalization,
1111
+ attribute_for_distinct,
1022
1112
  attributes_to_retrieve,
1023
1113
  ranking,
1024
- custom_ranking,
1025
1114
  relevancy_strictness,
1026
1115
  attributes_to_highlight,
1027
1116
  attributes_to_snippet,
@@ -1029,7 +1118,6 @@ module Algolia
1029
1118
  highlight_post_tag,
1030
1119
  snippet_ellipsis_text,
1031
1120
  restrict_highlight_and_snippet_arrays,
1032
- hits_per_page,
1033
1121
  min_word_sizefor1_typo,
1034
1122
  min_word_sizefor2_typos,
1035
1123
  typo_tolerance,
@@ -1037,15 +1125,12 @@ module Algolia
1037
1125
  disable_typo_tolerance_on_attributes,
1038
1126
  ignore_plurals,
1039
1127
  remove_stop_words,
1040
- keep_diacritics_on_characters,
1041
1128
  query_languages,
1042
1129
  decompound_query,
1043
1130
  enable_rules,
1044
1131
  enable_personalization,
1045
1132
  query_type,
1046
1133
  remove_words_if_no_results,
1047
- mode,
1048
- semantic_search,
1049
1134
  advanced_syntax,
1050
1135
  optional_words,
1051
1136
  disable_exact_on_attributes,