algolia 3.4.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +0 -7
  5. data/lib/algolia/api/analytics_client.rb +32 -88
  6. data/lib/algolia/api/ingestion_client.rb +2 -170
  7. data/lib/algolia/api/insights_client.rb +0 -22
  8. data/lib/algolia/api/monitoring_client.rb +11 -11
  9. data/lib/algolia/api/search_client.rb +19 -74
  10. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  11. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  12. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  13. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  14. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  15. data/lib/algolia/models/abtesting/variant.rb +0 -18
  16. data/lib/algolia/models/analytics/click_position.rb +0 -32
  17. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  18. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  19. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  20. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  21. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  23. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  24. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  25. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  26. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  27. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  28. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  29. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  30. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  31. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  32. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  33. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  34. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  35. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  36. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  37. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  38. data/lib/algolia/models/ingestion/event.rb +0 -14
  39. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  40. data/lib/algolia/models/ingestion/run.rb +0 -18
  41. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  42. data/lib/algolia/models/ingestion/task.rb +0 -18
  43. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  44. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  45. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  46. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  47. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  48. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  49. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  50. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  51. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  52. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  53. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  54. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  55. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  56. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  57. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  58. data/lib/algolia/models/insights/insights_events.rb +0 -18
  59. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  60. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  61. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  62. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  63. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  64. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  65. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  66. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  67. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  68. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  69. data/lib/algolia/models/recommend/banner.rb +218 -0
  70. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_response.rb → recommend/banner_image.rb} +31 -38
  71. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_with_index.rb → recommend/banner_image_url.rb} +23 -23
  72. data/lib/algolia/models/{query-suggestions/get_config_status200_response.rb → recommend/banner_link.rb} +13 -53
  73. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  74. data/lib/algolia/models/recommend/condition.rb +0 -15
  75. data/lib/algolia/models/recommend/consequence.rb +0 -28
  76. data/lib/algolia/models/recommend/fallback_params.rb +8 -100
  77. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  78. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  79. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  80. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  81. data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
  82. data/lib/algolia/models/recommend/recommend_search_params.rb +8 -100
  83. data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
  84. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  85. data/lib/algolia/models/recommend/related_query.rb +0 -36
  86. data/lib/algolia/models/recommend/rendering_content.rb +14 -5
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
  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/typo_tolerance.rb +1 -1
  93. data/lib/algolia/models/recommend/widgets.rb +212 -0
  94. data/lib/algolia/models/search/api_key.rb +1 -1
  95. data/lib/algolia/models/search/banner.rb +218 -0
  96. data/lib/algolia/models/{query-suggestions/get_log_file200_response.rb → search/banner_image.rb} +21 -61
  97. data/lib/algolia/models/search/banner_image_url.rb +212 -0
  98. data/lib/algolia/models/search/banner_link.rb +212 -0
  99. data/lib/algolia/models/search/browse_params_object.rb +4 -132
  100. data/lib/algolia/models/search/browse_response.rb +0 -61
  101. data/lib/algolia/models/search/condition.rb +0 -15
  102. data/lib/algolia/models/search/consequence.rb +0 -28
  103. data/lib/algolia/models/search/consequence_params.rb +4 -132
  104. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  105. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  106. data/lib/algolia/models/search/index_settings.rb +7 -85
  107. data/lib/algolia/models/search/log.rb +0 -34
  108. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  109. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  110. data/lib/algolia/models/search/ranking_info.rb +0 -112
  111. data/lib/algolia/models/search/rendering_content.rb +14 -5
  112. data/lib/algolia/models/search/rule.rb +0 -18
  113. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  114. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
  115. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  116. data/lib/algolia/models/search/search_for_facets.rb +4 -132
  117. data/lib/algolia/models/search/search_for_hits.rb +4 -132
  118. data/lib/algolia/models/search/search_params_object.rb +4 -132
  119. data/lib/algolia/models/search/search_response.rb +0 -61
  120. data/lib/algolia/models/search/search_rules_params.rb +0 -32
  121. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  122. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  123. data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
  124. data/lib/algolia/models/search/settings_response.rb +7 -85
  125. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  126. data/lib/algolia/models/search/user_hit.rb +0 -15
  127. data/lib/algolia/models/search/user_id.rb +0 -15
  128. data/lib/algolia/models/search/widgets.rb +212 -0
  129. data/lib/algolia/version.rb +1 -1
  130. metadata +12 -9
  131. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  132. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  133. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
@@ -4,15 +4,15 @@ require "date"
4
4
  require "time"
5
5
 
6
6
  module Algolia
7
- module QuerySuggestions
8
- class BaseQuerySuggestionsConfigurationWithIndex
9
- # Query Suggestions index name.
10
- attr_accessor :index_name
7
+ module Recommend
8
+ # url for a search banner image.
9
+ class BannerImageUrl
10
+ attr_accessor :url
11
11
 
12
12
  # Attribute mapping from ruby-style variable name to JSON key.
13
13
  def self.attribute_map
14
14
  {
15
- :index_name => :indexName
15
+ :url => :url
16
16
  }
17
17
  end
18
18
 
@@ -24,52 +24,51 @@ module Algolia
24
24
  # Attribute type mapping.
25
25
  def self.types_mapping
26
26
  {
27
- :index_name => :String
27
+ :url => :"String"
28
28
  }
29
29
  end
30
30
 
31
31
  # List of attributes with nullable: true
32
32
  def self.openapi_nullable
33
- Set.new([])
33
+ Set.new(
34
+ []
35
+ )
34
36
  end
35
37
 
36
38
  # Initializes the object
37
39
  # @param [Hash] attributes Model attributes in the form of hash
38
40
  def initialize(attributes = {})
39
- unless attributes.is_a?(Hash)
41
+ if (!attributes.is_a?(Hash))
40
42
  raise(
41
43
  ArgumentError,
42
- "The input argument (attributes) must be a hash in `Algolia::BaseQuerySuggestionsConfigurationWithIndex` initialize method"
44
+ "The input argument (attributes) must be a hash in `Algolia::BannerImageUrl` initialize method"
43
45
  )
44
46
  end
45
47
 
46
48
  # check to see if the attribute exists and convert string to symbol for hash key
47
- attributes = attributes.each_with_object({}) do |(k, v), h|
48
- unless self.class.attribute_map.key?(k.to_sym)
49
+ attributes = attributes.each_with_object({}) { |(k, v), h|
50
+ if (!self.class.attribute_map.key?(k.to_sym))
49
51
  raise(
50
52
  ArgumentError,
51
- "`#{k}` is not a valid attribute in `Algolia::BaseQuerySuggestionsConfigurationWithIndex`. Please check the name to make sure it's valid. List of attributes: " +
53
+ "`#{k}` is not a valid attribute in `Algolia::BannerImageUrl`. Please check the name to make sure it's valid. List of attributes: " +
52
54
  self.class.attribute_map.keys.inspect
53
55
  )
54
56
  end
55
57
 
56
58
  h[k.to_sym] = v
57
- end
59
+ }
58
60
 
59
- if attributes.key?(:index_name)
60
- self.index_name = attributes[:index_name]
61
- else
62
- self.index_name = nil
61
+ if attributes.key?(:url)
62
+ self.url = attributes[:url]
63
63
  end
64
64
  end
65
65
 
66
66
  # Checks equality by comparing each attribute.
67
67
  # @param [Object] Object to be compared
68
68
  def ==(other)
69
- return true if equal?(other)
70
-
69
+ return true if self.equal?(other)
71
70
  self.class == other.class &&
72
- index_name == other.index_name
71
+ url == other.url
73
72
  end
74
73
 
75
74
  # @see the `==` method
@@ -81,7 +80,7 @@ module Algolia
81
80
  # Calculates hash code according to all attributes.
82
81
  # @return [Integer] Hash code
83
82
  def hash
84
- [index_name].hash
83
+ [url].hash
85
84
  end
86
85
 
87
86
  # Builds the object from hash
@@ -89,7 +88,6 @@ module Algolia
89
88
  # @return [Object] Returns the model itself
90
89
  def self.build_from_hash(attributes)
91
90
  return nil unless attributes.is_a?(Hash)
92
-
93
91
  attributes = attributes.transform_keys(&:to_sym)
94
92
  transformed_hash = {}
95
93
  types_mapping.each_pair do |key, type|
@@ -151,7 +149,7 @@ module Algolia
151
149
  # model
152
150
  else
153
151
  # models (e.g. Pet) or oneOf
154
- klass = Algolia::QuerySuggestions.const_get(type)
152
+ klass = Algolia::Recommend.const_get(type)
155
153
  klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
156
154
  .build_from_hash(value)
157
155
  end
@@ -207,6 +205,8 @@ module Algolia
207
205
  value
208
206
  end
209
207
  end
208
+
210
209
  end
210
+
211
211
  end
212
212
  end
@@ -4,31 +4,15 @@ require "date"
4
4
  require "time"
5
5
 
6
6
  module Algolia
7
- module QuerySuggestions
8
- class GetConfigStatus200Response
9
- # Name of the Query Suggestions index (case-sensitive).
10
- attr_accessor :index_name
11
-
12
- # Whether the creation or update of the Query Suggestions index is in progress.
13
- attr_accessor :is_running
14
-
15
- # Date and time when the Query Suggestions index was last built, in RFC 3339 format.
16
- attr_accessor :last_built_at
17
-
18
- # Date and time when the Query Suggestions index was last updated successfully.
19
- attr_accessor :last_successful_built_at
20
-
21
- # Duration of the last successful build in seconds.
22
- attr_accessor :last_successful_build_duration
7
+ module Recommend
8
+ # link for a banner defined in merchandising studio.
9
+ class BannerLink
10
+ attr_accessor :url
23
11
 
24
12
  # Attribute mapping from ruby-style variable name to JSON key.
25
13
  def self.attribute_map
26
14
  {
27
- :index_name => :indexName,
28
- :is_running => :isRunning,
29
- :last_built_at => :lastBuiltAt,
30
- :last_successful_built_at => :lastSuccessfulBuiltAt,
31
- :last_successful_build_duration => :lastSuccessfulBuildDuration
15
+ :url => :url
32
16
  }
33
17
  end
34
18
 
@@ -40,11 +24,7 @@ module Algolia
40
24
  # Attribute type mapping.
41
25
  def self.types_mapping
42
26
  {
43
- :index_name => :"String",
44
- :is_running => :"Boolean",
45
- :last_built_at => :"String",
46
- :last_successful_built_at => :"String",
47
- :last_successful_build_duration => :"String"
27
+ :url => :"String"
48
28
  }
49
29
  end
50
30
 
@@ -61,7 +41,7 @@ module Algolia
61
41
  if (!attributes.is_a?(Hash))
62
42
  raise(
63
43
  ArgumentError,
64
- "The input argument (attributes) must be a hash in `Algolia::GetConfigStatus200Response` initialize method"
44
+ "The input argument (attributes) must be a hash in `Algolia::BannerLink` initialize method"
65
45
  )
66
46
  end
67
47
 
@@ -70,7 +50,7 @@ module Algolia
70
50
  if (!self.class.attribute_map.key?(k.to_sym))
71
51
  raise(
72
52
  ArgumentError,
73
- "`#{k}` is not a valid attribute in `Algolia::GetConfigStatus200Response`. Please check the name to make sure it's valid. List of attributes: " +
53
+ "`#{k}` is not a valid attribute in `Algolia::BannerLink`. Please check the name to make sure it's valid. List of attributes: " +
74
54
  self.class.attribute_map.keys.inspect
75
55
  )
76
56
  end
@@ -78,24 +58,8 @@ module Algolia
78
58
  h[k.to_sym] = v
79
59
  }
80
60
 
81
- if attributes.key?(:index_name)
82
- self.index_name = attributes[:index_name]
83
- end
84
-
85
- if attributes.key?(:is_running)
86
- self.is_running = attributes[:is_running]
87
- end
88
-
89
- if attributes.key?(:last_built_at)
90
- self.last_built_at = attributes[:last_built_at]
91
- end
92
-
93
- if attributes.key?(:last_successful_built_at)
94
- self.last_successful_built_at = attributes[:last_successful_built_at]
95
- end
96
-
97
- if attributes.key?(:last_successful_build_duration)
98
- self.last_successful_build_duration = attributes[:last_successful_build_duration]
61
+ if attributes.key?(:url)
62
+ self.url = attributes[:url]
99
63
  end
100
64
  end
101
65
 
@@ -104,11 +68,7 @@ module Algolia
104
68
  def ==(other)
105
69
  return true if self.equal?(other)
106
70
  self.class == other.class &&
107
- index_name == other.index_name &&
108
- is_running == other.is_running &&
109
- last_built_at == other.last_built_at &&
110
- last_successful_built_at == other.last_successful_built_at &&
111
- last_successful_build_duration == other.last_successful_build_duration
71
+ url == other.url
112
72
  end
113
73
 
114
74
  # @see the `==` method
@@ -120,7 +80,7 @@ module Algolia
120
80
  # Calculates hash code according to all attributes.
121
81
  # @return [Integer] Hash code
122
82
  def hash
123
- [index_name, is_running, last_built_at, last_successful_built_at, last_successful_build_duration].hash
83
+ [url].hash
124
84
  end
125
85
 
126
86
  # Builds the object from hash
@@ -189,7 +149,7 @@ module Algolia
189
149
  # model
190
150
  else
191
151
  # models (e.g. Pet) or oneOf
192
- klass = Algolia::QuerySuggestions.const_get(type)
152
+ klass = Algolia::Recommend.const_get(type)
193
153
  klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
194
154
  .build_from_hash(value)
195
155
  end
@@ -122,42 +122,6 @@ module Algolia
122
122
  end
123
123
  end
124
124
 
125
- # Custom attribute writer method with validation
126
- # @param [Object] threshold Value to be assigned
127
- def threshold=(threshold)
128
- if threshold.nil?
129
- raise ArgumentError, "threshold cannot be nil"
130
- end
131
-
132
- if threshold > 100
133
- raise ArgumentError, "invalid value for \"threshold\", must be smaller than or equal to 100."
134
- end
135
-
136
- if threshold < 0
137
- raise ArgumentError, "invalid value for \"threshold\", must be greater than or equal to 0."
138
- end
139
-
140
- @threshold = threshold
141
- end
142
-
143
- # Custom attribute writer method with validation
144
- # @param [Object] max_recommendations Value to be assigned
145
- def max_recommendations=(max_recommendations)
146
- if max_recommendations.nil?
147
- raise ArgumentError, "max_recommendations cannot be nil"
148
- end
149
-
150
- if max_recommendations > 1000
151
- raise ArgumentError, "invalid value for \"max_recommendations\", must be smaller than or equal to 1000."
152
- end
153
-
154
- if max_recommendations < 1
155
- raise ArgumentError, "invalid value for \"max_recommendations\", must be greater than or equal to 1."
156
- end
157
-
158
- @max_recommendations = max_recommendations
159
- end
160
-
161
125
  # Checks equality by comparing each attribute.
162
126
  # @param [Object] Object to be compared
163
127
  def ==(other)
@@ -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)
@@ -32,7 +32,7 @@ module Algolia
32
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`.
33
33
  attr_accessor :faceting_after_distinct
34
34
 
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`.
35
+ # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a 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`.
36
36
  attr_accessor :around_lat_lng
37
37
 
38
38
  # Whether to obtain the coordinates from the request's IP address.
@@ -87,10 +87,10 @@ module Algolia
87
87
  # Search query.
88
88
  attr_accessor :query
89
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))`.
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 the attribute to be used as a filter but doesn't evaluate 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
91
  attr_accessor :attributes_for_faceting
92
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/).
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 be 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
94
  attr_accessor :replicas
95
95
 
96
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.
@@ -120,13 +120,13 @@ module Algolia
120
120
  # Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
121
121
  attr_accessor :allow_compression_of_integer_array
122
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 `!=`.
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
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
127
  attr_accessor :separators_to_index
128
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.
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.
130
130
  attr_accessor :searchable_attributes
131
131
 
132
132
  # An object with custom data. You can store up to 32kB as custom data.
@@ -202,10 +202,10 @@ module Algolia
202
202
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
203
203
  attr_accessor :advanced_syntax
204
204
 
205
- # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
205
+ # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
206
206
  attr_accessor :optional_words
207
207
 
208
- # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
208
+ # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
209
209
  attr_accessor :disable_exact_on_attributes
210
210
 
211
211
  attr_accessor :exact_on_single_word_query
@@ -218,7 +218,7 @@ module Algolia
218
218
 
219
219
  attr_accessor :distinct
220
220
 
221
- # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
221
+ # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response.
222
222
  attr_accessor :replace_synonyms_in_highlight
223
223
 
224
224
  # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
@@ -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)
@@ -5,7 +5,7 @@ require "time"
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- # Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
8
+ # Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
9
9
  module NumericFilters
10
10
  class << self
11
11
  # List of class defined in oneOf (OpenAPI v3)
@@ -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)