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
@@ -119,42 +119,6 @@ module Algolia
119
119
  end
120
120
  end
121
121
 
122
- # Custom attribute writer method with validation
123
- # @param [Object] threshold Value to be assigned
124
- def threshold=(threshold)
125
- if threshold.nil?
126
- raise ArgumentError, "threshold cannot be nil"
127
- end
128
-
129
- if threshold > 100
130
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
131
- end
132
-
133
- if threshold < 0
134
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
135
- end
136
-
137
- @threshold = threshold
138
- end
139
-
140
- # Custom attribute writer method with validation
141
- # @param [Object] max_recommendations Value to be assigned
142
- def max_recommendations=(max_recommendations)
143
- if max_recommendations.nil?
144
- raise ArgumentError, "max_recommendations cannot be nil"
145
- end
146
-
147
- if max_recommendations > 1000
148
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
149
- end
150
-
151
- if max_recommendations < 1
152
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
153
- end
154
-
155
- @max_recommendations = max_recommendations
156
- end
157
-
158
122
  # Checks equality by comparing each attribute.
159
123
  # @param [Object] Object to be compared
160
124
  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)
@@ -13,10 +13,10 @@ module Algolia
13
13
  # Only search for rules with matching context.
14
14
  attr_accessor :context
15
15
 
16
- # Requested page of the API response.
16
+ # Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
17
17
  attr_accessor :page
18
18
 
19
- # Maximum number of hits per page.
19
+ # Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
20
20
  attr_accessor :hits_per_page
21
21
 
22
22
  # Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
@@ -129,56 +129,6 @@ module Algolia
129
129
  end
130
130
  end
131
131
 
132
- # Custom attribute writer method with validation
133
- # @param [Object] page Value to be assigned
134
- def page=(page)
135
- if page.nil?
136
- raise ArgumentError, "page cannot be nil"
137
- end
138
-
139
- if page < 0
140
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
141
- end
142
-
143
- @page = page
144
- end
145
-
146
- # Custom attribute writer method with validation
147
- # @param [Object] hits_per_page Value to be assigned
148
- def hits_per_page=(hits_per_page)
149
- if hits_per_page.nil?
150
- raise ArgumentError, "hits_per_page cannot be nil"
151
- end
152
-
153
- if hits_per_page > 1000
154
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
155
- end
156
-
157
- if hits_per_page < 1
158
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
159
- end
160
-
161
- @hits_per_page = hits_per_page
162
- end
163
-
164
- # Custom attribute writer method with validation
165
- # @param [Object] max_values_per_facet Value to be assigned
166
- def max_values_per_facet=(max_values_per_facet)
167
- if max_values_per_facet.nil?
168
- raise ArgumentError, "max_values_per_facet cannot be nil"
169
- end
170
-
171
- if max_values_per_facet > 1000
172
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
173
- end
174
-
175
- if max_values_per_facet < 1
176
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be greater than or equal to 1."
177
- end
178
-
179
- @max_values_per_facet = max_values_per_facet
180
- end
181
-
182
132
  # Checks equality by comparing each attribute.
183
133
  # @param [Object] Object to be compared
184
134
  def ==(other)
@@ -100,20 +100,6 @@ module Algolia
100
100
  end
101
101
  end
102
102
 
103
- # Custom attribute writer method with validation
104
- # @param [Object] page Value to be assigned
105
- def page=(page)
106
- if page.nil?
107
- raise ArgumentError, "page cannot be nil"
108
- end
109
-
110
- if page < 0
111
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
112
- end
113
-
114
- @page = page
115
- end
116
-
117
103
  # Checks equality by comparing each attribute.
118
104
  # @param [Object] Object to be compared
119
105
  def ==(other)
@@ -71,8 +71,6 @@ module Algolia
71
71
 
72
72
  if attributes.key?(:_score)
73
73
  self._score = attributes[:_score]
74
- else
75
- self._score = nil
76
74
  end
77
75
 
78
76
  if attributes.key?(:facet_name)
@@ -88,24 +86,6 @@ module Algolia
88
86
  end
89
87
  end
90
88
 
91
- # Custom attribute writer method with validation
92
- # @param [Object] _score Value to be assigned
93
- def _score=(_score)
94
- if _score.nil?
95
- raise ArgumentError, "_score cannot be nil"
96
- end
97
-
98
- if _score > 100
99
- raise ArgumentError, "invalid value for \"_score\", must be smaller than or equal to 100."
100
- end
101
-
102
- if _score < 0
103
- raise ArgumentError, "invalid value for \"_score\", must be greater than or equal to 0."
104
- end
105
-
106
- @_score = _score
107
- end
108
-
109
89
  # Checks equality by comparing each attribute.
110
90
  # @param [Object] Object to be compared
111
91
  def ==(other)
@@ -132,42 +132,6 @@ module Algolia
132
132
  end
133
133
  end
134
134
 
135
- # Custom attribute writer method with validation
136
- # @param [Object] threshold Value to be assigned
137
- def threshold=(threshold)
138
- if threshold.nil?
139
- raise ArgumentError, "threshold cannot be nil"
140
- end
141
-
142
- if threshold > 100
143
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
144
- end
145
-
146
- if threshold < 0
147
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
148
- end
149
-
150
- @threshold = threshold
151
- end
152
-
153
- # Custom attribute writer method with validation
154
- # @param [Object] max_recommendations Value to be assigned
155
- def max_recommendations=(max_recommendations)
156
- if max_recommendations.nil?
157
- raise ArgumentError, "max_recommendations cannot be nil"
158
- end
159
-
160
- if max_recommendations > 1000
161
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
162
- end
163
-
164
- if max_recommendations < 1
165
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
166
- end
167
-
168
- @max_recommendations = max_recommendations
169
- end
170
-
171
135
  # Checks equality by comparing each attribute.
172
136
  # @param [Object] Object to be compared
173
137
  def ==(other)
@@ -137,42 +137,6 @@ module Algolia
137
137
  end
138
138
  end
139
139
 
140
- # Custom attribute writer method with validation
141
- # @param [Object] threshold Value to be assigned
142
- def threshold=(threshold)
143
- if threshold.nil?
144
- raise ArgumentError, "threshold cannot be nil"
145
- end
146
-
147
- if threshold > 100
148
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
149
- end
150
-
151
- if threshold < 0
152
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
153
- end
154
-
155
- @threshold = threshold
156
- end
157
-
158
- # Custom attribute writer method with validation
159
- # @param [Object] max_recommendations Value to be assigned
160
- def max_recommendations=(max_recommendations)
161
- if max_recommendations.nil?
162
- raise ArgumentError, "max_recommendations cannot be nil"
163
- end
164
-
165
- if max_recommendations > 1000
166
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
167
- end
168
-
169
- if max_recommendations < 1
170
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
171
- end
172
-
173
- @max_recommendations = max_recommendations
174
- end
175
-
176
140
  # Checks equality by comparing each attribute.
177
141
  # @param [Object] Object to be compared
178
142
  def ==(other)
@@ -7,6 +7,7 @@ module Algolia
7
7
  module Recommend
8
8
  # widgets returned from any rules that are applied to the current search.
9
9
  class Widgets
10
+ # banners defined in the merchandising studio for the given search.
10
11
  attr_accessor :banners
11
12
 
12
13
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -24,7 +25,7 @@ module Algolia
24
25
  # Attribute type mapping.
25
26
  def self.types_mapping
26
27
  {
27
- :banners => :"Banners"
28
+ :banners => :"Array<Banner>"
28
29
  }
29
30
  end
30
31
 
@@ -56,7 +57,9 @@ module Algolia
56
57
  }
57
58
 
58
59
  if attributes.key?(:banners)
59
- self.banners = attributes[:banners]
60
+ if (value = attributes[:banners]).is_a?(Array)
61
+ self.banners = value
62
+ end
60
63
  end
61
64
  end
62
65
 
@@ -27,7 +27,7 @@ module Algolia
27
27
  # Attribute type mapping.
28
28
  def self.types_mapping
29
29
  {
30
- :urls => :"BannerImageUrl",
30
+ :urls => :"Array<BannerImageUrl>",
31
31
  :title => :"String"
32
32
  }
33
33
  end
@@ -63,7 +63,9 @@ module Algolia
63
63
  }
64
64
 
65
65
  if attributes.key?(:urls)
66
- self.urls = attributes[:urls]
66
+ if (value = attributes[:urls]).is_a?(Array)
67
+ self.urls = value
68
+ end
67
69
  end
68
70
 
69
71
  if attributes.key?(:title)
@@ -181,7 +181,7 @@ module Algolia
181
181
 
182
182
  attr_accessor :exact_on_single_word_query
183
183
 
184
- # 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.
184
+ # 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.
185
185
  attr_accessor :alternatives_as_exact
186
186
 
187
187
  # 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.
@@ -776,134 +776,6 @@ module Algolia
776
776
  end
777
777
  end
778
778
 
779
- # Custom attribute writer method with validation
780
- # @param [Object] page Value to be assigned
781
- def page=(page)
782
- if page.nil?
783
- raise ArgumentError, "page cannot be nil"
784
- end
785
-
786
- if page < 0
787
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
788
- end
789
-
790
- @page = page
791
- end
792
-
793
- # Custom attribute writer method with validation
794
- # @param [Object] length Value to be assigned
795
- def length=(length)
796
- if length.nil?
797
- raise ArgumentError, "length cannot be nil"
798
- end
799
-
800
- if length > 1000
801
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
802
- end
803
-
804
- if length < 0
805
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
806
- end
807
-
808
- @length = length
809
- end
810
-
811
- # Custom attribute writer method with validation
812
- # @param [Object] minimum_around_radius Value to be assigned
813
- def minimum_around_radius=(minimum_around_radius)
814
- if minimum_around_radius.nil?
815
- raise ArgumentError, "minimum_around_radius cannot be nil"
816
- end
817
-
818
- if minimum_around_radius < 1
819
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
820
- end
821
-
822
- @minimum_around_radius = minimum_around_radius
823
- end
824
-
825
- # Custom attribute writer method with validation
826
- # @param [Object] personalization_impact Value to be assigned
827
- def personalization_impact=(personalization_impact)
828
- if personalization_impact.nil?
829
- raise ArgumentError, "personalization_impact cannot be nil"
830
- end
831
-
832
- if personalization_impact > 100
833
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
834
- end
835
-
836
- if personalization_impact < 0
837
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
838
- end
839
-
840
- @personalization_impact = personalization_impact
841
- end
842
-
843
- # Custom attribute writer method with validation
844
- # @param [Object] hits_per_page Value to be assigned
845
- def hits_per_page=(hits_per_page)
846
- if hits_per_page.nil?
847
- raise ArgumentError, "hits_per_page cannot be nil"
848
- end
849
-
850
- if hits_per_page > 1000
851
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
852
- end
853
-
854
- if hits_per_page < 1
855
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
856
- end
857
-
858
- @hits_per_page = hits_per_page
859
- end
860
-
861
- # Custom attribute writer method with validation
862
- # @param [Object] min_proximity Value to be assigned
863
- def min_proximity=(min_proximity)
864
- if min_proximity.nil?
865
- raise ArgumentError, "min_proximity cannot be nil"
866
- end
867
-
868
- if min_proximity > 7
869
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
870
- end
871
-
872
- if min_proximity < 1
873
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
874
- end
875
-
876
- @min_proximity = min_proximity
877
- end
878
-
879
- # Custom attribute writer method with validation
880
- # @param [Object] max_facet_hits Value to be assigned
881
- def max_facet_hits=(max_facet_hits)
882
- if max_facet_hits.nil?
883
- raise ArgumentError, "max_facet_hits cannot be nil"
884
- end
885
-
886
- if max_facet_hits > 100
887
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
888
- end
889
-
890
- @max_facet_hits = max_facet_hits
891
- end
892
-
893
- # Custom attribute writer method with validation
894
- # @param [Object] max_values_per_facet Value to be assigned
895
- def max_values_per_facet=(max_values_per_facet)
896
- if max_values_per_facet.nil?
897
- raise ArgumentError, "max_values_per_facet cannot be nil"
898
- end
899
-
900
- if max_values_per_facet > 1000
901
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
902
- end
903
-
904
- @max_values_per_facet = max_values_per_facet
905
- end
906
-
907
779
  # Checks equality by comparing each attribute.
908
780
  # @param [Object] Object to be compared
909
781
  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
 
@@ -110,6 +113,7 @@ module Algolia
110
113
  :around_lat_lng => :aroundLatLng,
111
114
  :automatic_radius => :automaticRadius,
112
115
  :exhaustive => :exhaustive,
116
+ :applied_rules => :appliedRules,
113
117
  :exhaustive_facets_count => :exhaustiveFacetsCount,
114
118
  :exhaustive_nb_hits => :exhaustiveNbHits,
115
119
  :exhaustive_typo => :exhaustiveTypo,
@@ -154,6 +158,7 @@ module Algolia
154
158
  :around_lat_lng => :"String",
155
159
  :automatic_radius => :"String",
156
160
  :exhaustive => :"Exhaustive",
161
+ :applied_rules => :"Array<Object>",
157
162
  :exhaustive_facets_count => :"Boolean",
158
163
  :exhaustive_nb_hits => :"Boolean",
159
164
  :exhaustive_typo => :"Boolean",
@@ -245,6 +250,12 @@ module Algolia
245
250
  self.exhaustive = attributes[:exhaustive]
246
251
  end
247
252
 
253
+ if attributes.key?(:applied_rules)
254
+ if (value = attributes[:applied_rules]).is_a?(Array)
255
+ self.applied_rules = value
256
+ end
257
+ end
258
+
248
259
  if attributes.key?(:exhaustive_facets_count)
249
260
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
250
261
  end
@@ -372,67 +383,6 @@ module Algolia
372
383
  end
373
384
  end
374
385
 
375
- # Custom attribute writer method with validation
376
- # @param [Object] ab_test_variant_id Value to be assigned
377
- def ab_test_variant_id=(ab_test_variant_id)
378
- if ab_test_variant_id.nil?
379
- raise ArgumentError, "ab_test_variant_id cannot be nil"
380
- end
381
-
382
- if ab_test_variant_id < 1
383
- raise ArgumentError, "invalid value for \"ab_test_variant_id\", must be greater than or equal to 1."
384
- end
385
-
386
- @ab_test_variant_id = ab_test_variant_id
387
- end
388
-
389
- # Custom attribute writer method with validation
390
- # @param [Object] around_lat_lng Value to be assigned
391
- def around_lat_lng=(around_lat_lng)
392
- if around_lat_lng.nil?
393
- raise ArgumentError, "around_lat_lng cannot be nil"
394
- end
395
-
396
- pattern = /^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$/
397
- if around_lat_lng !~ pattern
398
- raise ArgumentError, "invalid value for \"around_lat_lng\", must conform to the pattern #{pattern}."
399
- end
400
-
401
- @around_lat_lng = around_lat_lng
402
- end
403
-
404
- # Custom attribute writer method with validation
405
- # @param [Object] page Value to be assigned
406
- def page=(page)
407
- if page.nil?
408
- raise ArgumentError, "page cannot be nil"
409
- end
410
-
411
- if page < 0
412
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
413
- end
414
-
415
- @page = page
416
- end
417
-
418
- # Custom attribute writer method with validation
419
- # @param [Object] hits_per_page Value to be assigned
420
- def hits_per_page=(hits_per_page)
421
- if hits_per_page.nil?
422
- raise ArgumentError, "hits_per_page cannot be nil"
423
- end
424
-
425
- if hits_per_page > 1000
426
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
427
- end
428
-
429
- if hits_per_page < 1
430
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
431
- end
432
-
433
- @hits_per_page = hits_per_page
434
- end
435
-
436
386
  # Checks equality by comparing each attribute.
437
387
  # @param [Object] Object to be compared
438
388
  def ==(other)
@@ -443,6 +393,7 @@ module Algolia
443
393
  around_lat_lng == other.around_lat_lng &&
444
394
  automatic_radius == other.automatic_radius &&
445
395
  exhaustive == other.exhaustive &&
396
+ applied_rules == other.applied_rules &&
446
397
  exhaustive_facets_count == other.exhaustive_facets_count &&
447
398
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
448
399
  exhaustive_typo == other.exhaustive_typo &&
@@ -488,6 +439,7 @@ module Algolia
488
439
  around_lat_lng,
489
440
  automatic_radius,
490
441
  exhaustive,
442
+ applied_rules,
491
443
  exhaustive_facets_count,
492
444
  exhaustive_nb_hits,
493
445
  exhaustive_typo,
@@ -98,21 +98,6 @@ module Algolia
98
98
  end
99
99
  end
100
100
 
101
- # Custom attribute writer method with validation
102
- # @param [Object] context Value to be assigned
103
- def context=(context)
104
- if context.nil?
105
- raise ArgumentError, "context cannot be nil"
106
- end
107
-
108
- pattern = /[A-Za-z0-9_-]+/
109
- if context !~ pattern
110
- raise ArgumentError, "invalid value for \"context\", must conform to the pattern #{pattern}."
111
- end
112
-
113
- @context = context
114
- end
115
-
116
101
  # Checks equality by comparing each attribute.
117
102
  # @param [Object] Object to be compared
118
103
  def ==(other)
@@ -105,34 +105,6 @@ module Algolia
105
105
  end
106
106
  end
107
107
 
108
- # Custom attribute writer method with validation
109
- # @param [Object] promote Value to be assigned
110
- def promote=(promote)
111
- if promote.nil?
112
- raise ArgumentError, "promote cannot be nil"
113
- end
114
-
115
- if promote.length > 300
116
- raise ArgumentError, "invalid value for \"promote\", number of items must be less than or equal to 300."
117
- end
118
-
119
- @promote = promote
120
- end
121
-
122
- # Custom attribute writer method with validation
123
- # @param [Object] hide Value to be assigned
124
- def hide=(hide)
125
- if hide.nil?
126
- raise ArgumentError, "hide cannot be nil"
127
- end
128
-
129
- if hide.length > 50
130
- raise ArgumentError, "invalid value for \"hide\", number of items must be less than or equal to 50."
131
- end
132
-
133
- @hide = hide
134
- end
135
-
136
108
  # Checks equality by comparing each attribute.
137
109
  # @param [Object] Object to be compared
138
110
  def ==(other)