algolia 3.5.0 → 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +17 -16
  5. data/lib/algolia/api/analytics_client.rb +173 -333
  6. data/lib/algolia/api/ingestion_client.rb +40 -200
  7. data/lib/algolia/api/insights_client.rb +18 -32
  8. data/lib/algolia/api/monitoring_client.rb +33 -25
  9. data/lib/algolia/api/personalization_client.rb +16 -8
  10. data/lib/algolia/api/query_suggestions_client.rb +17 -9
  11. data/lib/algolia/api/recommend_client.rb +17 -9
  12. data/lib/algolia/api/search_client.rb +63 -110
  13. data/lib/algolia/configuration.rb +16 -1
  14. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
  15. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  16. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  17. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  18. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  19. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  20. data/lib/algolia/models/abtesting/variant.rb +0 -20
  21. data/lib/algolia/models/analytics/click_position.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  23. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  24. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  25. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  26. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  27. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  28. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  29. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  30. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  31. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  32. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  33. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  34. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  35. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  36. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  37. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  38. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  39. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  40. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  41. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  42. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  43. data/lib/algolia/models/ingestion/event.rb +1 -25
  44. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  45. data/lib/algolia/models/ingestion/run.rb +0 -18
  46. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  47. data/lib/algolia/models/ingestion/task.rb +0 -18
  48. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  49. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  50. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  51. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  52. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  53. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  54. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  55. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  56. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  57. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  58. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  59. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  60. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  61. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  62. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  63. data/lib/algolia/models/insights/insights_events.rb +0 -18
  64. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  65. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  66. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  67. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  68. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  69. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  70. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  71. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  72. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  73. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  74. data/lib/algolia/models/recommend/banner_image.rb +4 -2
  75. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  76. data/lib/algolia/models/recommend/condition.rb +0 -15
  77. data/lib/algolia/models/recommend/consequence.rb +0 -28
  78. data/lib/algolia/models/recommend/fallback_params.rb +3 -95
  79. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  80. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  81. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  82. data/lib/algolia/models/recommend/recommend_hit.rb +0 -20
  83. data/lib/algolia/models/recommend/recommend_search_params.rb +3 -95
  84. data/lib/algolia/models/recommend/recommendations_results.rb +13 -61
  85. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  86. data/lib/algolia/models/recommend/related_query.rb +0 -36
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -52
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -20
  90. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  91. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  92. data/lib/algolia/models/recommend/widgets.rb +5 -2
  93. data/lib/algolia/models/search/banner_image.rb +4 -2
  94. data/lib/algolia/models/search/browse_params_object.rb +1 -129
  95. data/lib/algolia/models/search/browse_response.rb +13 -61
  96. data/lib/algolia/models/search/condition.rb +0 -15
  97. data/lib/algolia/models/search/consequence.rb +0 -28
  98. data/lib/algolia/models/search/consequence_params.rb +1 -129
  99. data/lib/algolia/models/search/get_api_key_response.rb +2 -0
  100. data/lib/algolia/models/search/get_objects_response.rb +0 -2
  101. data/lib/algolia/models/search/index_settings.rb +3 -81
  102. data/lib/algolia/models/search/log.rb +0 -34
  103. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  104. data/lib/algolia/models/search/ranking_info.rb +0 -112
  105. data/lib/algolia/models/search/rule.rb +0 -18
  106. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  107. data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -15
  108. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  109. data/lib/algolia/models/search/search_for_facets.rb +1 -129
  110. data/lib/algolia/models/search/search_for_hits.rb +1 -129
  111. data/lib/algolia/models/search/search_params_object.rb +1 -129
  112. data/lib/algolia/models/search/search_response.rb +13 -61
  113. data/lib/algolia/models/search/search_rules_params.rb +2 -34
  114. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  115. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  116. data/lib/algolia/models/search/search_user_ids_response.rb +1 -33
  117. data/lib/algolia/models/search/settings_response.rb +3 -81
  118. data/lib/algolia/models/search/user_hit.rb +0 -15
  119. data/lib/algolia/models/search/user_id.rb +0 -15
  120. data/lib/algolia/models/search/widgets.rb +5 -2
  121. data/lib/algolia/user_agent.rb +8 -2
  122. data/lib/algolia/version.rb +1 -1
  123. metadata +2 -11
  124. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
  125. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
  126. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
  127. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
  128. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  129. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  130. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
  131. data/lib/algolia/models/recommend/banners.rb +0 -209
  132. data/lib/algolia/models/search/banners.rb +0 -209
@@ -73,21 +73,6 @@ module Algolia
73
73
  end
74
74
  end
75
75
 
76
- # Custom attribute writer method with validation
77
- # @param [Object] context Value to be assigned
78
- def context=(context)
79
- if context.nil?
80
- raise ArgumentError, "context cannot be nil"
81
- end
82
-
83
- pattern = /[A-Za-z0-9_-]+/
84
- if context !~ pattern
85
- raise ArgumentError, "invalid value for \"context\", must conform to the pattern #{pattern}."
86
- end
87
-
88
- @context = context
89
- end
90
-
91
76
  # Checks equality by comparing each attribute.
92
77
  # @param [Object] Object to be compared
93
78
  def ==(other)
@@ -85,34 +85,6 @@ module Algolia
85
85
  end
86
86
  end
87
87
 
88
- # Custom attribute writer method with validation
89
- # @param [Object] hide Value to be assigned
90
- def hide=(hide)
91
- if hide.nil?
92
- raise ArgumentError, "hide cannot be nil"
93
- end
94
-
95
- if hide.length < 1
96
- raise ArgumentError, "invalid value for \"hide\", number of items must be greater than or equal to 1."
97
- end
98
-
99
- @hide = hide
100
- end
101
-
102
- # Custom attribute writer method with validation
103
- # @param [Object] promote Value to be assigned
104
- def promote=(promote)
105
- if promote.nil?
106
- raise ArgumentError, "promote cannot be nil"
107
- end
108
-
109
- if promote.length < 1
110
- raise ArgumentError, "invalid value for \"promote\", number of items must be greater than or equal to 1."
111
- end
112
-
113
- @promote = promote
114
- end
115
-
116
88
  # Checks equality by comparing each attribute.
117
89
  # @param [Object] Object to be compared
118
90
  def ==(other)
@@ -99,7 +99,7 @@ module Algolia
99
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
100
  attr_accessor :unretrievable_attributes
101
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.
102
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). 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
103
  attr_accessor :disable_typo_tolerance_on_words
104
104
 
105
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.
@@ -123,7 +123,7 @@ module Algolia
123
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. To turn off filtering for all numeric attributes, specify 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
124
  attr_accessor :numeric_attributes_for_filtering
125
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.
126
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
127
127
  attr_accessor :separators_to_index
128
128
 
129
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 a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -210,7 +210,7 @@ module Algolia
210
210
 
211
211
  attr_accessor :exact_on_single_word_query
212
212
 
213
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
213
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
214
214
  attr_accessor :alternatives_as_exact
215
215
 
216
216
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -869,98 +869,6 @@ module Algolia
869
869
  end
870
870
  end
871
871
 
872
- # Custom attribute writer method with validation
873
- # @param [Object] minimum_around_radius Value to be assigned
874
- def minimum_around_radius=(minimum_around_radius)
875
- if minimum_around_radius.nil?
876
- raise ArgumentError, "minimum_around_radius cannot be nil"
877
- end
878
-
879
- if minimum_around_radius < 1
880
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
881
- end
882
-
883
- @minimum_around_radius = minimum_around_radius
884
- end
885
-
886
- # Custom attribute writer method with validation
887
- # @param [Object] personalization_impact Value to be assigned
888
- def personalization_impact=(personalization_impact)
889
- if personalization_impact.nil?
890
- raise ArgumentError, "personalization_impact cannot be nil"
891
- end
892
-
893
- if personalization_impact > 100
894
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
895
- end
896
-
897
- if personalization_impact < 0
898
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
899
- end
900
-
901
- @personalization_impact = personalization_impact
902
- end
903
-
904
- # Custom attribute writer method with validation
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"
909
- end
910
-
911
- if pagination_limited_to > 20000
912
- raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
913
- end
914
-
915
- @pagination_limited_to = pagination_limited_to
916
- end
917
-
918
- # Custom attribute writer method with validation
919
- # @param [Object] min_proximity Value to be assigned
920
- def min_proximity=(min_proximity)
921
- if min_proximity.nil?
922
- raise ArgumentError, "min_proximity cannot be nil"
923
- end
924
-
925
- if min_proximity > 7
926
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
927
- end
928
-
929
- if min_proximity < 1
930
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
931
- end
932
-
933
- @min_proximity = min_proximity
934
- end
935
-
936
- # Custom attribute writer method with validation
937
- # @param [Object] max_facet_hits Value to be assigned
938
- def max_facet_hits=(max_facet_hits)
939
- if max_facet_hits.nil?
940
- raise ArgumentError, "max_facet_hits cannot be nil"
941
- end
942
-
943
- if max_facet_hits > 100
944
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
945
- end
946
-
947
- @max_facet_hits = max_facet_hits
948
- end
949
-
950
- # Custom attribute writer method with validation
951
- # @param [Object] max_values_per_facet Value to be assigned
952
- def max_values_per_facet=(max_values_per_facet)
953
- if max_values_per_facet.nil?
954
- raise ArgumentError, "max_values_per_facet cannot be nil"
955
- end
956
-
957
- if max_values_per_facet > 1000
958
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
959
- end
960
-
961
- @max_values_per_facet = max_values_per_facet
962
- end
963
-
964
872
  # Checks equality by comparing each attribute.
965
873
  # @param [Object] Object to be compared
966
874
  def ==(other)
@@ -130,42 +130,6 @@ module Algolia
130
130
  end
131
131
  end
132
132
 
133
- # Custom attribute writer method with validation
134
- # @param [Object] threshold Value to be assigned
135
- def threshold=(threshold)
136
- if threshold.nil?
137
- raise ArgumentError, "threshold cannot be nil"
138
- end
139
-
140
- if threshold > 100
141
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
142
- end
143
-
144
- if threshold < 0
145
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
146
- end
147
-
148
- @threshold = threshold
149
- end
150
-
151
- # Custom attribute writer method with validation
152
- # @param [Object] max_recommendations Value to be assigned
153
- def max_recommendations=(max_recommendations)
154
- if max_recommendations.nil?
155
- raise ArgumentError, "max_recommendations cannot be nil"
156
- end
157
-
158
- if max_recommendations > 1000
159
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
160
- end
161
-
162
- if max_recommendations < 1
163
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
164
- end
165
-
166
- @max_recommendations = max_recommendations
167
- end
168
-
169
133
  # Checks equality by comparing each attribute.
170
134
  # @param [Object] Object to be compared
171
135
  def ==(other)
@@ -73,20 +73,6 @@ module Algolia
73
73
  end
74
74
  end
75
75
 
76
- # Custom attribute writer method with validation
77
- # @param [Object] position Value to be assigned
78
- def position=(position)
79
- if position.nil?
80
- raise ArgumentError, "position cannot be nil"
81
- end
82
-
83
- if position < 0
84
- raise ArgumentError, "invalid value for \"position\", must be greater than or equal to 0."
85
- end
86
-
87
- @position = position
88
- end
89
-
90
76
  # Checks equality by comparing each attribute.
91
77
  # @param [Object] Object to be compared
92
78
  def ==(other)
@@ -180,118 +180,6 @@ module Algolia
180
180
  end
181
181
  end
182
182
 
183
- # Custom attribute writer method with validation
184
- # @param [Object] filters Value to be assigned
185
- def filters=(filters)
186
- if filters.nil?
187
- raise ArgumentError, "filters cannot be nil"
188
- end
189
-
190
- if filters < 0
191
- raise ArgumentError, "invalid value for \"filters\", must be greater than or equal to 0."
192
- end
193
-
194
- @filters = filters
195
- end
196
-
197
- # Custom attribute writer method with validation
198
- # @param [Object] first_matched_word Value to be assigned
199
- def first_matched_word=(first_matched_word)
200
- if first_matched_word.nil?
201
- raise ArgumentError, "first_matched_word cannot be nil"
202
- end
203
-
204
- if first_matched_word < 0
205
- raise ArgumentError, "invalid value for \"first_matched_word\", must be greater than or equal to 0."
206
- end
207
-
208
- @first_matched_word = first_matched_word
209
- end
210
-
211
- # Custom attribute writer method with validation
212
- # @param [Object] geo_distance Value to be assigned
213
- def geo_distance=(geo_distance)
214
- if geo_distance.nil?
215
- raise ArgumentError, "geo_distance cannot be nil"
216
- end
217
-
218
- if geo_distance < 0
219
- raise ArgumentError, "invalid value for \"geo_distance\", must be greater than or equal to 0."
220
- end
221
-
222
- @geo_distance = geo_distance
223
- end
224
-
225
- # Custom attribute writer method with validation
226
- # @param [Object] geo_precision Value to be assigned
227
- def geo_precision=(geo_precision)
228
- if geo_precision.nil?
229
- raise ArgumentError, "geo_precision cannot be nil"
230
- end
231
-
232
- if geo_precision < 1
233
- raise ArgumentError, "invalid value for \"geo_precision\", must be greater than or equal to 1."
234
- end
235
-
236
- @geo_precision = geo_precision
237
- end
238
-
239
- # Custom attribute writer method with validation
240
- # @param [Object] nb_exact_words Value to be assigned
241
- def nb_exact_words=(nb_exact_words)
242
- if nb_exact_words.nil?
243
- raise ArgumentError, "nb_exact_words cannot be nil"
244
- end
245
-
246
- if nb_exact_words < 0
247
- raise ArgumentError, "invalid value for \"nb_exact_words\", must be greater than or equal to 0."
248
- end
249
-
250
- @nb_exact_words = nb_exact_words
251
- end
252
-
253
- # Custom attribute writer method with validation
254
- # @param [Object] nb_typos Value to be assigned
255
- def nb_typos=(nb_typos)
256
- if nb_typos.nil?
257
- raise ArgumentError, "nb_typos cannot be nil"
258
- end
259
-
260
- if nb_typos < 0
261
- raise ArgumentError, "invalid value for \"nb_typos\", must be greater than or equal to 0."
262
- end
263
-
264
- @nb_typos = nb_typos
265
- end
266
-
267
- # Custom attribute writer method with validation
268
- # @param [Object] proximity_distance Value to be assigned
269
- def proximity_distance=(proximity_distance)
270
- if proximity_distance.nil?
271
- raise ArgumentError, "proximity_distance cannot be nil"
272
- end
273
-
274
- if proximity_distance < 0
275
- raise ArgumentError, "invalid value for \"proximity_distance\", must be greater than or equal to 0."
276
- end
277
-
278
- @proximity_distance = proximity_distance
279
- end
280
-
281
- # Custom attribute writer method with validation
282
- # @param [Object] words Value to be assigned
283
- def words=(words)
284
- if words.nil?
285
- raise ArgumentError, "words cannot be nil"
286
- end
287
-
288
- if words < 1
289
- raise ArgumentError, "invalid value for \"words\", must be greater than or equal to 1."
290
- end
291
-
292
- @words = words
293
- end
294
-
295
183
  # Checks equality by comparing each attribute.
296
184
  # @param [Object] Object to be compared
297
185
  def ==(other)
@@ -99,8 +99,6 @@ module Algolia
99
99
 
100
100
  if attributes.key?(:_score)
101
101
  self._score = attributes[:_score]
102
- else
103
- self._score = nil
104
102
  end
105
103
 
106
104
  # add extra attribute to additional_properties
@@ -108,24 +106,6 @@ module Algolia
108
106
  self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
109
107
  end
110
108
 
111
- # Custom attribute writer method with validation
112
- # @param [Object] _score Value to be assigned
113
- def _score=(_score)
114
- if _score.nil?
115
- raise ArgumentError, "_score cannot be nil"
116
- end
117
-
118
- if _score > 100
119
- raise ArgumentError, "invalid value for \"_score\", must be smaller than or equal to 100."
120
- end
121
-
122
- if _score < 0
123
- raise ArgumentError, "invalid value for \"_score\", must be greater than or equal to 0."
124
- end
125
-
126
- @_score = _score
127
- end
128
-
129
109
  # Checks equality by comparing each attribute.
130
110
  # @param [Object] Object to be compared
131
111
  def ==(other)
@@ -100,7 +100,7 @@ module Algolia
100
100
  # 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.
101
101
  attr_accessor :unretrievable_attributes
102
102
 
103
- # 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
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). 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.
104
104
  attr_accessor :disable_typo_tolerance_on_words
105
105
 
106
106
  # 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.
@@ -124,7 +124,7 @@ module Algolia
124
124
  # 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. To turn off filtering for all numeric attributes, specify 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 `!=`.
125
125
  attr_accessor :numeric_attributes_for_filtering
126
126
 
127
- # 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
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
128
128
  attr_accessor :separators_to_index
129
129
 
130
130
  # 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 a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -211,7 +211,7 @@ module Algolia
211
211
 
212
212
  attr_accessor :exact_on_single_word_query
213
213
 
214
- # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
214
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
215
215
  attr_accessor :alternatives_as_exact
216
216
 
217
217
  # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
@@ -872,98 +872,6 @@ module Algolia
872
872
  end
873
873
  end
874
874
 
875
- # Custom attribute writer method with validation
876
- # @param [Object] minimum_around_radius Value to be assigned
877
- def minimum_around_radius=(minimum_around_radius)
878
- if minimum_around_radius.nil?
879
- raise ArgumentError, "minimum_around_radius cannot be nil"
880
- end
881
-
882
- if minimum_around_radius < 1
883
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
884
- end
885
-
886
- @minimum_around_radius = minimum_around_radius
887
- end
888
-
889
- # Custom attribute writer method with validation
890
- # @param [Object] personalization_impact Value to be assigned
891
- def personalization_impact=(personalization_impact)
892
- if personalization_impact.nil?
893
- raise ArgumentError, "personalization_impact cannot be nil"
894
- end
895
-
896
- if personalization_impact > 100
897
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
898
- end
899
-
900
- if personalization_impact < 0
901
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
902
- end
903
-
904
- @personalization_impact = personalization_impact
905
- end
906
-
907
- # Custom attribute writer method with validation
908
- # @param [Object] pagination_limited_to Value to be assigned
909
- def pagination_limited_to=(pagination_limited_to)
910
- if pagination_limited_to.nil?
911
- raise ArgumentError, "pagination_limited_to cannot be nil"
912
- end
913
-
914
- if pagination_limited_to > 20000
915
- raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
916
- end
917
-
918
- @pagination_limited_to = pagination_limited_to
919
- end
920
-
921
- # Custom attribute writer method with validation
922
- # @param [Object] min_proximity Value to be assigned
923
- def min_proximity=(min_proximity)
924
- if min_proximity.nil?
925
- raise ArgumentError, "min_proximity cannot be nil"
926
- end
927
-
928
- if min_proximity > 7
929
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
930
- end
931
-
932
- if min_proximity < 1
933
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
934
- end
935
-
936
- @min_proximity = min_proximity
937
- end
938
-
939
- # Custom attribute writer method with validation
940
- # @param [Object] max_facet_hits Value to be assigned
941
- def max_facet_hits=(max_facet_hits)
942
- if max_facet_hits.nil?
943
- raise ArgumentError, "max_facet_hits cannot be nil"
944
- end
945
-
946
- if max_facet_hits > 100
947
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
948
- end
949
-
950
- @max_facet_hits = max_facet_hits
951
- end
952
-
953
- # Custom attribute writer method with validation
954
- # @param [Object] max_values_per_facet Value to be assigned
955
- def max_values_per_facet=(max_values_per_facet)
956
- if max_values_per_facet.nil?
957
- raise ArgumentError, "max_values_per_facet cannot be nil"
958
- end
959
-
960
- if max_values_per_facet > 1000
961
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
962
- end
963
-
964
- @max_values_per_facet = max_values_per_facet
965
- end
966
-
967
875
  # Checks equality by comparing each attribute.
968
876
  # @param [Object] Object to be compared
969
877
  def ==(other)
@@ -20,6 +20,9 @@ module Algolia
20
20
 
21
21
  attr_accessor :exhaustive
22
22
 
23
+ # Rules applied to the query.
24
+ attr_accessor :applied_rules
25
+
23
26
  # See the `facetsCount` field of the `exhaustive` object in the response.
24
27
  attr_accessor :exhaustive_facets_count
25
28
 
@@ -100,6 +103,7 @@ module Algolia
100
103
  :around_lat_lng => :aroundLatLng,
101
104
  :automatic_radius => :automaticRadius,
102
105
  :exhaustive => :exhaustive,
106
+ :applied_rules => :appliedRules,
103
107
  :exhaustive_facets_count => :exhaustiveFacetsCount,
104
108
  :exhaustive_nb_hits => :exhaustiveNbHits,
105
109
  :exhaustive_typo => :exhaustiveTypo,
@@ -141,6 +145,7 @@ module Algolia
141
145
  :around_lat_lng => :"String",
142
146
  :automatic_radius => :"String",
143
147
  :exhaustive => :"Exhaustive",
148
+ :applied_rules => :"Array<Object>",
144
149
  :exhaustive_facets_count => :"Boolean",
145
150
  :exhaustive_nb_hits => :"Boolean",
146
151
  :exhaustive_typo => :"Boolean",
@@ -228,6 +233,12 @@ module Algolia
228
233
  self.exhaustive = attributes[:exhaustive]
229
234
  end
230
235
 
236
+ if attributes.key?(:applied_rules)
237
+ if (value = attributes[:applied_rules]).is_a?(Array)
238
+ self.applied_rules = value
239
+ end
240
+ end
241
+
231
242
  if attributes.key?(:exhaustive_facets_count)
232
243
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
233
244
  end
@@ -339,67 +350,6 @@ module Algolia
339
350
  end
340
351
  end
341
352
 
342
- # Custom attribute writer method with validation
343
- # @param [Object] ab_test_variant_id Value to be assigned
344
- def ab_test_variant_id=(ab_test_variant_id)
345
- if ab_test_variant_id.nil?
346
- raise ArgumentError, "ab_test_variant_id cannot be nil"
347
- end
348
-
349
- if ab_test_variant_id < 1
350
- raise ArgumentError, "invalid value for \"ab_test_variant_id\", must be greater than or equal to 1."
351
- end
352
-
353
- @ab_test_variant_id = ab_test_variant_id
354
- end
355
-
356
- # Custom attribute writer method with validation
357
- # @param [Object] around_lat_lng Value to be assigned
358
- def around_lat_lng=(around_lat_lng)
359
- if around_lat_lng.nil?
360
- raise ArgumentError, "around_lat_lng cannot be nil"
361
- end
362
-
363
- pattern = /^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$/
364
- if around_lat_lng !~ pattern
365
- raise ArgumentError, "invalid value for \"around_lat_lng\", must conform to the pattern #{pattern}."
366
- end
367
-
368
- @around_lat_lng = around_lat_lng
369
- end
370
-
371
- # Custom attribute writer method with validation
372
- # @param [Object] page Value to be assigned
373
- def page=(page)
374
- if page.nil?
375
- raise ArgumentError, "page cannot be nil"
376
- end
377
-
378
- if page < 0
379
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
380
- end
381
-
382
- @page = page
383
- end
384
-
385
- # Custom attribute writer method with validation
386
- # @param [Object] hits_per_page Value to be assigned
387
- def hits_per_page=(hits_per_page)
388
- if hits_per_page.nil?
389
- raise ArgumentError, "hits_per_page cannot be nil"
390
- end
391
-
392
- if hits_per_page > 1000
393
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
394
- end
395
-
396
- if hits_per_page < 1
397
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
398
- end
399
-
400
- @hits_per_page = hits_per_page
401
- end
402
-
403
353
  # Checks equality by comparing each attribute.
404
354
  # @param [Object] Object to be compared
405
355
  def ==(other)
@@ -410,6 +360,7 @@ module Algolia
410
360
  around_lat_lng == other.around_lat_lng &&
411
361
  automatic_radius == other.automatic_radius &&
412
362
  exhaustive == other.exhaustive &&
363
+ applied_rules == other.applied_rules &&
413
364
  exhaustive_facets_count == other.exhaustive_facets_count &&
414
365
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
415
366
  exhaustive_typo == other.exhaustive_typo &&
@@ -452,6 +403,7 @@ module Algolia
452
403
  around_lat_lng,
453
404
  automatic_radius,
454
405
  exhaustive,
406
+ applied_rules,
455
407
  exhaustive_facets_count,
456
408
  exhaustive_nb_hits,
457
409
  exhaustive_typo,