algolia 3.32.0 → 3.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c255d57319b4a89c7f379c1dd4d6184e24bc0322065bc1acfb1bf230a99ce4b
4
- data.tar.gz: 2a8e2644a06777f0b489175007eec0a6df91bdaf5f5d2def88f3d7d5eab7321b
3
+ metadata.gz: 72b95250946c2ec0549f3ccb45bc8d6a19798fb718823f6785070670ab9dcb77
4
+ data.tar.gz: de2118558f108ca16cd821f7e22c616454bbb0fef657ef8768cc529891109b5b
5
5
  SHA512:
6
- metadata.gz: 0fee27aa2d004cb4ea2aefe6c963acf90f23a57cfcb1c804e02676f6183154f61b86d0e3ffb8526bc05f624237db6cdc1a7121d3349f852afe605ca2aa3bf86f
7
- data.tar.gz: 337c9aeafac084f6a76deb8546d5754b4ac3bec073a873adc6e69f95231ffeae8652610d422fc9ae28bd7e7da3e3e550e04ca8357be1dabf50839a5b97c1cc5b
6
+ metadata.gz: f1c66a50bd34bd38336057f4d320f93e66502c4cfb0b108b524c6bb4dc0650fb5d33bcaa3cdf15c302d428b2242135c2e28b6a7a5ee6375404b3dcbd987e62a0
7
+ data.tar.gz: ab55900d51d0ed5e50236023a71d4b76db9a723584d62fc06eb76ac8f587134857b5bf07d39877a843538e460ce75393c835ef4368a9e75d9d49d1ae9b95c77c
@@ -36,16 +36,11 @@ jobs:
36
36
  id: '10001'
37
37
  },
38
38
  parent: {
39
- key: 'DI-3523'
39
+ key: 'API-1'
40
40
  },
41
41
  project: {
42
- id: '10118'
42
+ id: '11316'
43
43
  },
44
- components: [
45
- {
46
- id: '10872'
47
- }
48
- ],
49
44
  summary: `[GH-ISSUE] ${title}`
50
45
  },
51
46
  update: {}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [3.34.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.33.0...3.34.0)
2
+
3
+ - [5335918a5](https://github.com/algolia/api-clients-automation/commit/5335918a5) chore(scripts): update the jira action ([#5678](https://github.com/algolia/api-clients-automation/pull/5678)) by [@millotp](https://github.com/millotp/)
4
+ - [d6bde0f0c](https://github.com/algolia/api-clients-automation/commit/d6bde0f0c) chore(scripts): remove component from jira ticket ([#5680](https://github.com/algolia/api-clients-automation/pull/5680)) by [@millotp](https://github.com/millotp/)
5
+ - [fe6e82c11](https://github.com/algolia/api-clients-automation/commit/fe6e82c11) feat(specs): add sortBy query param and sortingStrategy ([#5686](https://github.com/algolia/api-clients-automation/pull/5686)) by [@ben-kalmus](https://github.com/ben-kalmus/)
6
+ - [cccfa9c86](https://github.com/algolia/api-clients-automation/commit/cccfa9c86) feat(specs): add `sortBy` trigger on Composition Rules ([#5707](https://github.com/algolia/api-clients-automation/pull/5707)) by [@ClaraMuller](https://github.com/ClaraMuller/)
7
+ - [260d8102c](https://github.com/algolia/api-clients-automation/commit/260d8102c) docs(abtests): Added documentation for featureFilters configuration i… ([#5688](https://github.com/algolia/api-clients-automation/pull/5688)) by [@samykettani](https://github.com/samykettani/)
8
+
9
+ ## [3.33.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.32.0...3.33.0)
10
+
11
+ - [6a48ef151a](https://github.com/algolia/api-clients-automation/commit/6a48ef151a) feat(specs): allow `enablePersonalization` query parameter at run time for Composition API ([#5651](https://github.com/algolia/api-clients-automation/pull/5651)) by [@ClaraMuller](https://github.com/ClaraMuller/)
12
+
1
13
  ## [3.32.0](https://github.com/algolia/algoliasearch-client-ruby/compare/3.31.0...3.32.0)
2
14
 
3
15
  - [7d189e024](https://github.com/algolia/api-clients-automation/commit/7d189e024) feat(specs): add useImagesObjects property in commercetools source input ([#5586](https://github.com/algolia/api-clients-automation/pull/5586)) by [@sbellone](https://github.com/sbellone/)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- algolia (3.32.0)
4
+ algolia (3.34.0)
5
5
  base64 (>= 0.2.0, < 1)
6
6
  faraday (>= 1.0.1, < 3.0)
7
7
  faraday-net_http_persistent (>= 0.15, < 3)
@@ -947,5 +947,61 @@ module Algolia
947
947
  )
948
948
  end
949
949
 
950
+ # Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to create a new sorting strategy mapping or replace the currently configured one. The provided sorting indices MUST be associated indices or replicas of the main targeted index. WARNING: This endpoint cannot validate if the sort index is related to the composition's main index. Validation will fail at runtime if the index you updated is not related! The update is applied to the specified composition within the current Algolia application and returns a taskID that can be used to track the operation’s completion.
951
+ #
952
+ # Required API Key ACLs:
953
+ # - editSettings
954
+ # @param composition_id [String] Unique Composition ObjectID. (required)
955
+ # @param request_body [Hash<String, String>] (required)
956
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
957
+ # @return [Http::Response] the response
958
+ def update_sorting_strategy_composition_with_http_info(composition_id, request_body, request_options = {})
959
+ # verify the required parameter 'composition_id' is set
960
+ if @api_client.config.client_side_validation && composition_id.nil?
961
+ raise(
962
+ ArgumentError,
963
+ "Parameter `composition_id` is required when calling `update_sorting_strategy_composition`."
964
+ )
965
+ end
966
+ # verify the required parameter 'request_body' is set
967
+ if @api_client.config.client_side_validation && request_body.nil?
968
+ raise ArgumentError, "Parameter `request_body` is required when calling `update_sorting_strategy_composition`."
969
+ end
970
+
971
+ path = "/1/compositions/{compositionID}/sortingStrategy".sub(
972
+ "{" + "compositionID" + "}",
973
+ Transport.encode_uri(composition_id.to_s)
974
+ )
975
+ query_params = {}
976
+ query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
977
+ header_params = {}
978
+ header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?
979
+
980
+ post_body = request_options[:debug_body] || @api_client.object_to_http_body(request_body)
981
+
982
+ new_options = request_options.merge(
983
+ :operation => :"CompositionClient.update_sorting_strategy_composition",
984
+ :header_params => header_params,
985
+ :query_params => query_params,
986
+ :body => post_body,
987
+ :use_read_transporter => false
988
+ )
989
+
990
+ @api_client.call_api(:POST, path, new_options)
991
+ end
992
+
993
+ # Updates the \"sortingStrategy\" field of an existing composition. This endpoint allows you to create a new sorting strategy mapping or replace the currently configured one. The provided sorting indices MUST be associated indices or replicas of the main targeted index. WARNING: This endpoint cannot validate if the sort index is related to the composition's main index. Validation will fail at runtime if the index you updated is not related! The update is applied to the specified composition within the current Algolia application and returns a taskID that can be used to track the operation’s completion.
994
+ #
995
+ # Required API Key ACLs:
996
+ # - editSettings
997
+ # @param composition_id [String] Unique Composition ObjectID. (required)
998
+ # @param request_body [Hash<String, String>] (required)
999
+ # @param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
1000
+ # @return [TaskIDResponse]
1001
+ def update_sorting_strategy_composition(composition_id, request_body, request_options = {})
1002
+ response = update_sorting_strategy_composition_with_http_info(composition_id, request_body, request_options)
1003
+ @api_client.deserialize(response.body, request_options[:debug_return_type] || "Composition::TaskIDResponse")
1004
+ end
1005
+
950
1006
  end
951
1007
  end
@@ -9,6 +9,8 @@ module Algolia
9
9
  module Abtesting
10
10
  # A/B test configuration.
11
11
  class ABTestConfiguration
12
+ attr_accessor :feature_filters
13
+
12
14
  attr_accessor :outliers
13
15
 
14
16
  attr_accessor :empty_search
@@ -18,6 +20,7 @@ module Algolia
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :feature_filters => :featureFilters,
21
24
  :outliers => :outliers,
22
25
  :empty_search => :emptySearch,
23
26
  :minimum_detectable_effect => :minimumDetectableEffect
@@ -27,6 +30,7 @@ module Algolia
27
30
  # Attribute type mapping.
28
31
  def self.types_mapping
29
32
  {
33
+ :feature_filters => :"FeatureFilters",
30
34
  :outliers => :"Outliers",
31
35
  :empty_search => :"EmptySearch",
32
36
  :minimum_detectable_effect => :"MinimumDetectableEffect"
@@ -63,6 +67,10 @@ module Algolia
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
70
+ if attributes.key?(:feature_filters)
71
+ self.feature_filters = attributes[:feature_filters]
72
+ end
73
+
66
74
  if attributes.key?(:outliers)
67
75
  self.outliers = attributes[:outliers]
68
76
  end
@@ -81,6 +89,7 @@ module Algolia
81
89
  def ==(other)
82
90
  return true if self.equal?(other)
83
91
  self.class == other.class &&
92
+ feature_filters == other.feature_filters &&
84
93
  outliers == other.outliers &&
85
94
  empty_search == other.empty_search &&
86
95
  minimum_detectable_effect == other.minimum_detectable_effect
@@ -95,7 +104,7 @@ module Algolia
95
104
  # Calculates hash code according to all attributes.
96
105
  # @return [Integer] Hash code
97
106
  def hash
98
- [outliers, empty_search, minimum_detectable_effect].hash
107
+ [feature_filters, outliers, empty_search, minimum_detectable_effect].hash
99
108
  end
100
109
 
101
110
  # Builds the object from hash
@@ -9,6 +9,8 @@ module Algolia
9
9
  module Abtesting
10
10
  # A/B test configuration for estimating the sample size and duration using minimum detectable effect.
11
11
  class EstimateConfiguration
12
+ attr_accessor :feature_filters
13
+
12
14
  attr_accessor :outliers
13
15
 
14
16
  attr_accessor :empty_search
@@ -18,6 +20,7 @@ module Algolia
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
23
+ :feature_filters => :featureFilters,
21
24
  :outliers => :outliers,
22
25
  :empty_search => :emptySearch,
23
26
  :minimum_detectable_effect => :minimumDetectableEffect
@@ -27,6 +30,7 @@ module Algolia
27
30
  # Attribute type mapping.
28
31
  def self.types_mapping
29
32
  {
33
+ :feature_filters => :"FeatureFilters",
30
34
  :outliers => :"Outliers",
31
35
  :empty_search => :"EmptySearch",
32
36
  :minimum_detectable_effect => :"MinimumDetectableEffect"
@@ -63,6 +67,10 @@ module Algolia
63
67
  h[k.to_sym] = v
64
68
  }
65
69
 
70
+ if attributes.key?(:feature_filters)
71
+ self.feature_filters = attributes[:feature_filters]
72
+ end
73
+
66
74
  if attributes.key?(:outliers)
67
75
  self.outliers = attributes[:outliers]
68
76
  end
@@ -83,6 +91,7 @@ module Algolia
83
91
  def ==(other)
84
92
  return true if self.equal?(other)
85
93
  self.class == other.class &&
94
+ feature_filters == other.feature_filters &&
86
95
  outliers == other.outliers &&
87
96
  empty_search == other.empty_search &&
88
97
  minimum_detectable_effect == other.minimum_detectable_effect
@@ -97,7 +106,7 @@ module Algolia
97
106
  # Calculates hash code according to all attributes.
98
107
  # @return [Integer] Hash code
99
108
  def hash
100
- [outliers, empty_search, minimum_detectable_effect].hash
109
+ [feature_filters, outliers, empty_search, minimum_detectable_effect].hash
101
110
  end
102
111
 
103
112
  # Builds the object from hash
@@ -0,0 +1,228 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
4
+
5
+ require "date"
6
+ require "time"
7
+
8
+ module Algolia
9
+ module Abtesting
10
+ # Configuration of feature-based filters applied to the A/B test population.
11
+ class FeatureFilters
12
+ # Whether to apply Dynamic Re-Ranking feature filters.
13
+ attr_accessor :dynamic_re_ranking
14
+
15
+ # Whether to apply AI Personalization feature filters.
16
+ attr_accessor :ai_perso
17
+
18
+ # Whether to apply Multi-Signal Re-Ranking feature filters.
19
+ attr_accessor :multi_signal_ranking
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :dynamic_re_ranking => :dynamicReRanking,
25
+ :ai_perso => :aiPerso,
26
+ :multi_signal_ranking => :multiSignalRanking
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.types_mapping
32
+ {
33
+ :dynamic_re_ranking => :"Boolean",
34
+ :ai_perso => :"Boolean",
35
+ :multi_signal_ranking => :"Boolean"
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new(
42
+ []
43
+ )
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ raise(
51
+ ArgumentError,
52
+ "The input argument (attributes) must be a hash in `Algolia::FeatureFilters` initialize method"
53
+ )
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ raise(
60
+ ArgumentError,
61
+ "`#{k}` is not a valid attribute in `Algolia::FeatureFilters`. Please check the name to make sure it's valid. List of attributes: " +
62
+ self.class.attribute_map.keys.inspect
63
+ )
64
+ end
65
+
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:dynamic_re_ranking)
70
+ self.dynamic_re_ranking = attributes[:dynamic_re_ranking]
71
+ end
72
+
73
+ if attributes.key?(:ai_perso)
74
+ self.ai_perso = attributes[:ai_perso]
75
+ end
76
+
77
+ if attributes.key?(:multi_signal_ranking)
78
+ self.multi_signal_ranking = attributes[:multi_signal_ranking]
79
+ end
80
+ end
81
+
82
+ # Checks equality by comparing each attribute.
83
+ # @param [Object] Object to be compared
84
+ def ==(other)
85
+ return true if self.equal?(other)
86
+ self.class == other.class &&
87
+ dynamic_re_ranking == other.dynamic_re_ranking &&
88
+ ai_perso == other.ai_perso &&
89
+ multi_signal_ranking == other.multi_signal_ranking
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(other)
95
+ self == other
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Integer] Hash code
100
+ def hash
101
+ [dynamic_re_ranking, ai_perso, multi_signal_ranking].hash
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def self.build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ attributes = attributes.transform_keys(&:to_sym)
110
+ transformed_hash = {}
111
+ types_mapping.each_pair do |key, type|
112
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
113
+ transformed_hash[key.to_sym] = nil
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[attribute_map[key]].is_a?(Array)
118
+ transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
119
+ _deserialize(::Regexp.last_match(1), v)
120
+ }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+
127
+ new(transformed_hash)
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def self._deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ # model
168
+ else
169
+ # models (e.g. Pet) or oneOf
170
+ klass = Algolia::Abtesting.const_get(type)
171
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
172
+ .build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ def to_json(*_args)
189
+ to_hash.to_json
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to?(:to_hash)
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+ end
227
+ end
228
+ end
@@ -19,13 +19,17 @@ module Algolia
19
19
 
20
20
  attr_accessor :behavior
21
21
 
22
+ # A mapping of sorting labels to the indices (or replicas) that implement those sorting rules. The sorting indices MUST be related to the associated main targeted index in the composition. Each key is the label your frontend sends at runtime (for example, \"Price (asc)\"), and each value is the name of the index that should be queried when that label is selected. When a request includes a \"sortBy\" parameter, the platform looks up the corresponding index in this mapping and uses it to execute the query. The main targeted index is replaced with the sorting strategy index it is mapped to. Up to 20 sorting strategies can be defined.
23
+ attr_accessor :sorting_strategy
24
+
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :algolia_object_id => :objectID,
26
29
  :name => :name,
27
30
  :description => :description,
28
- :behavior => :behavior
31
+ :behavior => :behavior,
32
+ :sorting_strategy => :sortingStrategy
29
33
  }
30
34
  end
31
35
 
@@ -35,7 +39,8 @@ module Algolia
35
39
  :algolia_object_id => :"String",
36
40
  :name => :"String",
37
41
  :description => :"String",
38
- :behavior => :"CompositionBehavior"
42
+ :behavior => :"CompositionBehavior",
43
+ :sorting_strategy => :"Hash<String, String>"
39
44
  }
40
45
  end
41
46
 
@@ -90,6 +95,12 @@ module Algolia
90
95
  else
91
96
  self.behavior = nil
92
97
  end
98
+
99
+ if attributes.key?(:sorting_strategy)
100
+ if (value = attributes[:sorting_strategy]).is_a?(Hash)
101
+ self.sorting_strategy = value
102
+ end
103
+ end
93
104
  end
94
105
 
95
106
  # Checks equality by comparing each attribute.
@@ -100,7 +111,8 @@ module Algolia
100
111
  algolia_object_id == other.algolia_object_id &&
101
112
  name == other.name &&
102
113
  description == other.description &&
103
- behavior == other.behavior
114
+ behavior == other.behavior &&
115
+ sorting_strategy == other.sorting_strategy
104
116
  end
105
117
 
106
118
  # @see the `==` method
@@ -112,7 +124,7 @@ module Algolia
112
124
  # Calculates hash code according to all attributes.
113
125
  # @return [Integer] Hash code
114
126
  def hash
115
- [algolia_object_id, name, description, behavior].hash
127
+ [algolia_object_id, name, description, behavior, sorting_strategy].hash
116
128
  end
117
129
 
118
130
  # Builds the object from hash
@@ -19,13 +19,17 @@ module Algolia
19
19
  # Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
20
20
  attr_accessor :filters
21
21
 
22
+ # Sort criteria that trigger the rule. You can trigger composition rules based on the selected sorting strategy set by the parameter `sortBy`. The rule will trigger if the value passed to `sortBy` matches the one defined in the condition.
23
+ attr_accessor :sort_by
24
+
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :pattern => :pattern,
26
29
  :anchoring => :anchoring,
27
30
  :context => :context,
28
- :filters => :filters
31
+ :filters => :filters,
32
+ :sort_by => :sortBy
29
33
  }
30
34
  end
31
35
 
@@ -35,7 +39,8 @@ module Algolia
35
39
  :pattern => :"String",
36
40
  :anchoring => :"Anchoring",
37
41
  :context => :"String",
38
- :filters => :"String"
42
+ :filters => :"String",
43
+ :sort_by => :"String"
39
44
  }
40
45
  end
41
46
 
@@ -84,6 +89,10 @@ module Algolia
84
89
  if attributes.key?(:filters)
85
90
  self.filters = attributes[:filters]
86
91
  end
92
+
93
+ if attributes.key?(:sort_by)
94
+ self.sort_by = attributes[:sort_by]
95
+ end
87
96
  end
88
97
 
89
98
  # Checks equality by comparing each attribute.
@@ -94,7 +103,8 @@ module Algolia
94
103
  pattern == other.pattern &&
95
104
  anchoring == other.anchoring &&
96
105
  context == other.context &&
97
- filters == other.filters
106
+ filters == other.filters &&
107
+ sort_by == other.sort_by
98
108
  end
99
109
 
100
110
  # @see the `==` method
@@ -106,7 +116,7 @@ module Algolia
106
116
  # Calculates hash code according to all attributes.
107
117
  # @return [Integer] Hash code
108
118
  def hash
109
- [pattern, anchoring, context, filters].hash
119
+ [pattern, anchoring, context, filters, sort_by].hash
110
120
  end
111
121
 
112
122
  # Builds the object from hash
@@ -8,149 +8,159 @@ require "time"
8
8
  module Algolia
9
9
  module Composition
10
10
  class Params
11
- # Search query.
12
- attr_accessor :query
11
+ # Whether this search will be included in Analytics.
12
+ attr_accessor :analytics
13
13
 
14
- # Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
15
- attr_accessor :filters
14
+ # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
15
+ attr_accessor :analytics_tags
16
16
 
17
- # Page of search results to retrieve.
18
- attr_accessor :page
17
+ # 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`.
18
+ attr_accessor :around_lat_lng
19
19
 
20
- # Whether the run response should include detailed ranking information.
21
- attr_accessor :get_ranking_info
20
+ # Whether to obtain the coordinates from the request's IP address.
21
+ attr_accessor :around_lat_lng_via_ip
22
22
 
23
- # Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
24
- attr_accessor :relevancy_strictness
23
+ attr_accessor :around_radius
24
+
25
+ attr_accessor :around_precision
26
+
27
+ # Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
28
+ attr_accessor :click_analytics
29
+
30
+ # Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
31
+ attr_accessor :enable_ab_test
32
+
33
+ # Whether to enable Personalization.
34
+ attr_accessor :enable_personalization
35
+
36
+ # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
37
+ attr_accessor :enable_re_ranking
38
+
39
+ # Whether to enable composition rules.
40
+ attr_accessor :enable_rules
25
41
 
26
42
  attr_accessor :facet_filters
27
43
 
28
44
  # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values To retrieve all facets, use the wildcard character `*`. To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](https://www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting).
29
45
  attr_accessor :facets
30
46
 
31
- attr_accessor :optional_filters
47
+ # Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
48
+ attr_accessor :filters
32
49
 
33
- attr_accessor :numeric_filters
50
+ # Whether the run response should include detailed ranking information.
51
+ attr_accessor :get_ranking_info
34
52
 
35
53
  # Number of hits per page.
36
54
  attr_accessor :hits_per_page
37
55
 
38
- # 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`.
39
- attr_accessor :around_lat_lng
40
-
41
- # Whether to obtain the coordinates from the request's IP address.
42
- attr_accessor :around_lat_lng_via_ip
43
-
44
- attr_accessor :around_radius
45
-
46
- attr_accessor :around_precision
47
-
48
- # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
49
- attr_accessor :minimum_around_radius
56
+ # A list of extenrally injected objectID groups into from an external source.
57
+ attr_accessor :injected_items
50
58
 
51
59
  attr_accessor :inside_bounding_box
52
60
 
53
61
  # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
54
62
  attr_accessor :inside_polygon
55
63
 
56
- # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
57
- attr_accessor :query_languages
64
+ # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
65
+ attr_accessor :minimum_around_radius
58
66
 
59
67
  # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches) - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
60
68
  attr_accessor :natural_languages
61
69
 
62
- # Whether to enable composition rules.
63
- attr_accessor :enable_rules
70
+ attr_accessor :numeric_filters
64
71
 
65
- # Assigns a rule context to the run query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
66
- attr_accessor :rule_contexts
72
+ attr_accessor :optional_filters
67
73
 
68
- # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
69
- attr_accessor :user_token
74
+ # Page of search results to retrieve.
75
+ attr_accessor :page
70
76
 
71
- # Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
72
- attr_accessor :click_analytics
77
+ # Search query.
78
+ attr_accessor :query
73
79
 
74
- # Whether this search will be included in Analytics.
75
- attr_accessor :analytics
80
+ # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
81
+ attr_accessor :query_languages
76
82
 
77
- # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
78
- attr_accessor :analytics_tags
83
+ # Relevancy threshold below which less relevant results aren't included in the results You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
84
+ attr_accessor :relevancy_strictness
79
85
 
80
- # Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
81
- attr_accessor :enable_ab_test
86
+ # Assigns a rule context to the run query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
87
+ attr_accessor :rule_contexts
82
88
 
83
- # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
84
- attr_accessor :enable_re_ranking
89
+ # Indicates which sorting strategy to apply for the request. The value must match one of the labels defined in the \"sortingStrategy\" mapping. For example, \"Price (asc)\", see Upsert Composition. At runtime, this label is used to look up the corresponding index or replica configured in \"sortingStrategy\", and the query is executed using that index instead of main's. In addition to \"sortingStrategy\", this parameter is also used to apply a matching Composition Rule that contains a condition defined to trigger on \"sortBy\", see Composition Rules. If no value is provided or an invalid value, no sorting strategy is applied.
90
+ attr_accessor :sort_by
85
91
 
86
- # A list of extenrally injected objectID groups into from an external source.
87
- attr_accessor :injected_items
92
+ # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
93
+ attr_accessor :user_token
88
94
 
89
95
  # Attribute mapping from ruby-style variable name to JSON key.
90
96
  def self.attribute_map
91
97
  {
92
- :query => :query,
93
- :filters => :filters,
94
- :page => :page,
95
- :get_ranking_info => :getRankingInfo,
96
- :relevancy_strictness => :relevancyStrictness,
97
- :facet_filters => :facetFilters,
98
- :facets => :facets,
99
- :optional_filters => :optionalFilters,
100
- :numeric_filters => :numericFilters,
101
- :hits_per_page => :hitsPerPage,
98
+ :analytics => :analytics,
99
+ :analytics_tags => :analyticsTags,
102
100
  :around_lat_lng => :aroundLatLng,
103
101
  :around_lat_lng_via_ip => :aroundLatLngViaIP,
104
102
  :around_radius => :aroundRadius,
105
103
  :around_precision => :aroundPrecision,
106
- :minimum_around_radius => :minimumAroundRadius,
104
+ :click_analytics => :clickAnalytics,
105
+ :enable_ab_test => :enableABTest,
106
+ :enable_personalization => :enablePersonalization,
107
+ :enable_re_ranking => :enableReRanking,
108
+ :enable_rules => :enableRules,
109
+ :facet_filters => :facetFilters,
110
+ :facets => :facets,
111
+ :filters => :filters,
112
+ :get_ranking_info => :getRankingInfo,
113
+ :hits_per_page => :hitsPerPage,
114
+ :injected_items => :injectedItems,
107
115
  :inside_bounding_box => :insideBoundingBox,
108
116
  :inside_polygon => :insidePolygon,
109
- :query_languages => :queryLanguages,
117
+ :minimum_around_radius => :minimumAroundRadius,
110
118
  :natural_languages => :naturalLanguages,
111
- :enable_rules => :enableRules,
119
+ :numeric_filters => :numericFilters,
120
+ :optional_filters => :optionalFilters,
121
+ :page => :page,
122
+ :query => :query,
123
+ :query_languages => :queryLanguages,
124
+ :relevancy_strictness => :relevancyStrictness,
112
125
  :rule_contexts => :ruleContexts,
113
- :user_token => :userToken,
114
- :click_analytics => :clickAnalytics,
115
- :analytics => :analytics,
116
- :analytics_tags => :analyticsTags,
117
- :enable_ab_test => :enableABTest,
118
- :enable_re_ranking => :enableReRanking,
119
- :injected_items => :injectedItems
126
+ :sort_by => :sortBy,
127
+ :user_token => :userToken
120
128
  }
121
129
  end
122
130
 
123
131
  # Attribute type mapping.
124
132
  def self.types_mapping
125
133
  {
126
- :query => :"String",
127
- :filters => :"String",
128
- :page => :"Integer",
129
- :get_ranking_info => :"Boolean",
130
- :relevancy_strictness => :"Integer",
131
- :facet_filters => :"FacetFilters",
132
- :facets => :"Array<String>",
133
- :optional_filters => :"OptionalFilters",
134
- :numeric_filters => :"NumericFilters",
135
- :hits_per_page => :"Integer",
134
+ :analytics => :"Boolean",
135
+ :analytics_tags => :"Array<String>",
136
136
  :around_lat_lng => :"String",
137
137
  :around_lat_lng_via_ip => :"Boolean",
138
138
  :around_radius => :"AroundRadius",
139
139
  :around_precision => :"AroundPrecision",
140
- :minimum_around_radius => :"Integer",
140
+ :click_analytics => :"Boolean",
141
+ :enable_ab_test => :"Boolean",
142
+ :enable_personalization => :"Boolean",
143
+ :enable_re_ranking => :"Boolean",
144
+ :enable_rules => :"Boolean",
145
+ :facet_filters => :"FacetFilters",
146
+ :facets => :"Array<String>",
147
+ :filters => :"String",
148
+ :get_ranking_info => :"Boolean",
149
+ :hits_per_page => :"Integer",
150
+ :injected_items => :"Hash<String, ExternalInjectedItem>",
141
151
  :inside_bounding_box => :"InsideBoundingBox",
142
152
  :inside_polygon => :"Array<Array<Float>>",
143
- :query_languages => :"Array<SupportedLanguage>",
153
+ :minimum_around_radius => :"Integer",
144
154
  :natural_languages => :"Array<SupportedLanguage>",
145
- :enable_rules => :"Boolean",
155
+ :numeric_filters => :"NumericFilters",
156
+ :optional_filters => :"OptionalFilters",
157
+ :page => :"Integer",
158
+ :query => :"String",
159
+ :query_languages => :"Array<SupportedLanguage>",
160
+ :relevancy_strictness => :"Integer",
146
161
  :rule_contexts => :"Array<String>",
147
- :user_token => :"String",
148
- :click_analytics => :"Boolean",
149
- :analytics => :"Boolean",
150
- :analytics_tags => :"Array<String>",
151
- :enable_ab_test => :"Boolean",
152
- :enable_re_ranking => :"Boolean",
153
- :injected_items => :"Hash<String, ExternalInjectedItem>"
162
+ :sort_by => :"String",
163
+ :user_token => :"String"
154
164
  }
155
165
  end
156
166
 
@@ -183,66 +193,78 @@ module Algolia
183
193
  h[k.to_sym] = v
184
194
  }
185
195
 
186
- if attributes.key?(:query)
187
- self.query = attributes[:query]
196
+ if attributes.key?(:analytics)
197
+ self.analytics = attributes[:analytics]
188
198
  end
189
199
 
190
- if attributes.key?(:filters)
191
- self.filters = attributes[:filters]
200
+ if attributes.key?(:analytics_tags)
201
+ if (value = attributes[:analytics_tags]).is_a?(Array)
202
+ self.analytics_tags = value
203
+ end
192
204
  end
193
205
 
194
- if attributes.key?(:page)
195
- self.page = attributes[:page]
206
+ if attributes.key?(:around_lat_lng)
207
+ self.around_lat_lng = attributes[:around_lat_lng]
196
208
  end
197
209
 
198
- if attributes.key?(:get_ranking_info)
199
- self.get_ranking_info = attributes[:get_ranking_info]
210
+ if attributes.key?(:around_lat_lng_via_ip)
211
+ self.around_lat_lng_via_ip = attributes[:around_lat_lng_via_ip]
200
212
  end
201
213
 
202
- if attributes.key?(:relevancy_strictness)
203
- self.relevancy_strictness = attributes[:relevancy_strictness]
214
+ if attributes.key?(:around_radius)
215
+ self.around_radius = attributes[:around_radius]
204
216
  end
205
217
 
206
- if attributes.key?(:facet_filters)
207
- self.facet_filters = attributes[:facet_filters]
218
+ if attributes.key?(:around_precision)
219
+ self.around_precision = attributes[:around_precision]
208
220
  end
209
221
 
210
- if attributes.key?(:facets)
211
- if (value = attributes[:facets]).is_a?(Array)
212
- self.facets = value
213
- end
222
+ if attributes.key?(:click_analytics)
223
+ self.click_analytics = attributes[:click_analytics]
214
224
  end
215
225
 
216
- if attributes.key?(:optional_filters)
217
- self.optional_filters = attributes[:optional_filters]
226
+ if attributes.key?(:enable_ab_test)
227
+ self.enable_ab_test = attributes[:enable_ab_test]
218
228
  end
219
229
 
220
- if attributes.key?(:numeric_filters)
221
- self.numeric_filters = attributes[:numeric_filters]
230
+ if attributes.key?(:enable_personalization)
231
+ self.enable_personalization = attributes[:enable_personalization]
222
232
  end
223
233
 
224
- if attributes.key?(:hits_per_page)
225
- self.hits_per_page = attributes[:hits_per_page]
234
+ if attributes.key?(:enable_re_ranking)
235
+ self.enable_re_ranking = attributes[:enable_re_ranking]
226
236
  end
227
237
 
228
- if attributes.key?(:around_lat_lng)
229
- self.around_lat_lng = attributes[:around_lat_lng]
238
+ if attributes.key?(:enable_rules)
239
+ self.enable_rules = attributes[:enable_rules]
230
240
  end
231
241
 
232
- if attributes.key?(:around_lat_lng_via_ip)
233
- self.around_lat_lng_via_ip = attributes[:around_lat_lng_via_ip]
242
+ if attributes.key?(:facet_filters)
243
+ self.facet_filters = attributes[:facet_filters]
234
244
  end
235
245
 
236
- if attributes.key?(:around_radius)
237
- self.around_radius = attributes[:around_radius]
246
+ if attributes.key?(:facets)
247
+ if (value = attributes[:facets]).is_a?(Array)
248
+ self.facets = value
249
+ end
238
250
  end
239
251
 
240
- if attributes.key?(:around_precision)
241
- self.around_precision = attributes[:around_precision]
252
+ if attributes.key?(:filters)
253
+ self.filters = attributes[:filters]
242
254
  end
243
255
 
244
- if attributes.key?(:minimum_around_radius)
245
- self.minimum_around_radius = attributes[:minimum_around_radius]
256
+ if attributes.key?(:get_ranking_info)
257
+ self.get_ranking_info = attributes[:get_ranking_info]
258
+ end
259
+
260
+ if attributes.key?(:hits_per_page)
261
+ self.hits_per_page = attributes[:hits_per_page]
262
+ end
263
+
264
+ if attributes.key?(:injected_items)
265
+ if (value = attributes[:injected_items]).is_a?(Hash)
266
+ self.injected_items = value
267
+ end
246
268
  end
247
269
 
248
270
  if attributes.key?(:inside_bounding_box)
@@ -255,10 +277,8 @@ module Algolia
255
277
  end
256
278
  end
257
279
 
258
- if attributes.key?(:query_languages)
259
- if (value = attributes[:query_languages]).is_a?(Array)
260
- self.query_languages = value
261
- end
280
+ if attributes.key?(:minimum_around_radius)
281
+ self.minimum_around_radius = attributes[:minimum_around_radius]
262
282
  end
263
283
 
264
284
  if attributes.key?(:natural_languages)
@@ -267,46 +287,44 @@ module Algolia
267
287
  end
268
288
  end
269
289
 
270
- if attributes.key?(:enable_rules)
271
- self.enable_rules = attributes[:enable_rules]
290
+ if attributes.key?(:numeric_filters)
291
+ self.numeric_filters = attributes[:numeric_filters]
272
292
  end
273
293
 
274
- if attributes.key?(:rule_contexts)
275
- if (value = attributes[:rule_contexts]).is_a?(Array)
276
- self.rule_contexts = value
277
- end
294
+ if attributes.key?(:optional_filters)
295
+ self.optional_filters = attributes[:optional_filters]
278
296
  end
279
297
 
280
- if attributes.key?(:user_token)
281
- self.user_token = attributes[:user_token]
298
+ if attributes.key?(:page)
299
+ self.page = attributes[:page]
282
300
  end
283
301
 
284
- if attributes.key?(:click_analytics)
285
- self.click_analytics = attributes[:click_analytics]
302
+ if attributes.key?(:query)
303
+ self.query = attributes[:query]
286
304
  end
287
305
 
288
- if attributes.key?(:analytics)
289
- self.analytics = attributes[:analytics]
306
+ if attributes.key?(:query_languages)
307
+ if (value = attributes[:query_languages]).is_a?(Array)
308
+ self.query_languages = value
309
+ end
290
310
  end
291
311
 
292
- if attributes.key?(:analytics_tags)
293
- if (value = attributes[:analytics_tags]).is_a?(Array)
294
- self.analytics_tags = value
295
- end
312
+ if attributes.key?(:relevancy_strictness)
313
+ self.relevancy_strictness = attributes[:relevancy_strictness]
296
314
  end
297
315
 
298
- if attributes.key?(:enable_ab_test)
299
- self.enable_ab_test = attributes[:enable_ab_test]
316
+ if attributes.key?(:rule_contexts)
317
+ if (value = attributes[:rule_contexts]).is_a?(Array)
318
+ self.rule_contexts = value
319
+ end
300
320
  end
301
321
 
302
- if attributes.key?(:enable_re_ranking)
303
- self.enable_re_ranking = attributes[:enable_re_ranking]
322
+ if attributes.key?(:sort_by)
323
+ self.sort_by = attributes[:sort_by]
304
324
  end
305
325
 
306
- if attributes.key?(:injected_items)
307
- if (value = attributes[:injected_items]).is_a?(Hash)
308
- self.injected_items = value
309
- end
326
+ if attributes.key?(:user_token)
327
+ self.user_token = attributes[:user_token]
310
328
  end
311
329
  end
312
330
 
@@ -315,34 +333,36 @@ module Algolia
315
333
  def ==(other)
316
334
  return true if self.equal?(other)
317
335
  self.class == other.class &&
318
- query == other.query &&
319
- filters == other.filters &&
320
- page == other.page &&
321
- get_ranking_info == other.get_ranking_info &&
322
- relevancy_strictness == other.relevancy_strictness &&
323
- facet_filters == other.facet_filters &&
324
- facets == other.facets &&
325
- optional_filters == other.optional_filters &&
326
- numeric_filters == other.numeric_filters &&
327
- hits_per_page == other.hits_per_page &&
336
+ analytics == other.analytics &&
337
+ analytics_tags == other.analytics_tags &&
328
338
  around_lat_lng == other.around_lat_lng &&
329
339
  around_lat_lng_via_ip == other.around_lat_lng_via_ip &&
330
340
  around_radius == other.around_radius &&
331
341
  around_precision == other.around_precision &&
332
- minimum_around_radius == other.minimum_around_radius &&
342
+ click_analytics == other.click_analytics &&
343
+ enable_ab_test == other.enable_ab_test &&
344
+ enable_personalization == other.enable_personalization &&
345
+ enable_re_ranking == other.enable_re_ranking &&
346
+ enable_rules == other.enable_rules &&
347
+ facet_filters == other.facet_filters &&
348
+ facets == other.facets &&
349
+ filters == other.filters &&
350
+ get_ranking_info == other.get_ranking_info &&
351
+ hits_per_page == other.hits_per_page &&
352
+ injected_items == other.injected_items &&
333
353
  inside_bounding_box == other.inside_bounding_box &&
334
354
  inside_polygon == other.inside_polygon &&
335
- query_languages == other.query_languages &&
355
+ minimum_around_radius == other.minimum_around_radius &&
336
356
  natural_languages == other.natural_languages &&
337
- enable_rules == other.enable_rules &&
357
+ numeric_filters == other.numeric_filters &&
358
+ optional_filters == other.optional_filters &&
359
+ page == other.page &&
360
+ query == other.query &&
361
+ query_languages == other.query_languages &&
362
+ relevancy_strictness == other.relevancy_strictness &&
338
363
  rule_contexts == other.rule_contexts &&
339
- user_token == other.user_token &&
340
- click_analytics == other.click_analytics &&
341
- analytics == other.analytics &&
342
- analytics_tags == other.analytics_tags &&
343
- enable_ab_test == other.enable_ab_test &&
344
- enable_re_ranking == other.enable_re_ranking &&
345
- injected_items == other.injected_items
364
+ sort_by == other.sort_by &&
365
+ user_token == other.user_token
346
366
  end
347
367
 
348
368
  # @see the `==` method
@@ -355,34 +375,36 @@ module Algolia
355
375
  # @return [Integer] Hash code
356
376
  def hash
357
377
  [
358
- query,
359
- filters,
360
- page,
361
- get_ranking_info,
362
- relevancy_strictness,
363
- facet_filters,
364
- facets,
365
- optional_filters,
366
- numeric_filters,
367
- hits_per_page,
378
+ analytics,
379
+ analytics_tags,
368
380
  around_lat_lng,
369
381
  around_lat_lng_via_ip,
370
382
  around_radius,
371
383
  around_precision,
372
- minimum_around_radius,
384
+ click_analytics,
385
+ enable_ab_test,
386
+ enable_personalization,
387
+ enable_re_ranking,
388
+ enable_rules,
389
+ facet_filters,
390
+ facets,
391
+ filters,
392
+ get_ranking_info,
393
+ hits_per_page,
394
+ injected_items,
373
395
  inside_bounding_box,
374
396
  inside_polygon,
375
- query_languages,
397
+ minimum_around_radius,
376
398
  natural_languages,
377
- enable_rules,
399
+ numeric_filters,
400
+ optional_filters,
401
+ page,
402
+ query,
403
+ query_languages,
404
+ relevancy_strictness,
378
405
  rule_contexts,
379
- user_token,
380
- click_analytics,
381
- analytics,
382
- analytics_tags,
383
- enable_ab_test,
384
- enable_re_ranking,
385
- injected_items
406
+ sort_by,
407
+ user_token
386
408
  ].hash
387
409
  end
388
410
 
@@ -3,5 +3,5 @@
3
3
  # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
4
4
 
5
5
  module Algolia
6
- VERSION = "3.32.0"
6
+ VERSION = "3.34.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.32.0
4
+ version: 3.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - https://alg.li/support
@@ -191,6 +191,7 @@ files:
191
191
  - lib/algolia/models/abtesting/estimate_ab_test_request.rb
192
192
  - lib/algolia/models/abtesting/estimate_ab_test_response.rb
193
193
  - lib/algolia/models/abtesting/estimate_configuration.rb
194
+ - lib/algolia/models/abtesting/feature_filters.rb
194
195
  - lib/algolia/models/abtesting/filter_effects.rb
195
196
  - lib/algolia/models/abtesting/list_ab_tests_response.rb
196
197
  - lib/algolia/models/abtesting/minimum_detectable_effect.rb