algolia 3.45.0 → 3.46.1
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 +4 -4
- data/.github/workflows/release.yml +2 -2
- data/AGENTS.md +0 -24
- data/CHANGELOG.md +30 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_v3_client.rb +196 -7
- data/lib/algolia/api/agent_studio_client.rb +244 -6
- data/lib/algolia/api/recommend_client.rb +2 -2
- data/lib/algolia/api/search_client.rb +17 -3
- data/lib/algolia/configuration.rb +8 -0
- data/lib/algolia/defaults.rb +8 -0
- data/lib/algolia/models/abtesting-v3/ab_test.rb +25 -1
- data/lib/algolia/models/abtesting-v3/ab_test_configuration.rb +22 -4
- data/lib/algolia/models/abtesting-v3/ab_test_settings_response.rb +224 -0
- data/lib/algolia/models/abtesting-v3/add_ab_tests_request.rb +11 -1
- data/lib/algolia/models/abtesting-v3/analysis_method.rb +34 -0
- data/lib/algolia/models/abtesting-v3/bayesian_metric_result.rb +237 -0
- data/lib/algolia/models/abtesting-v3/evidence_status.rb +37 -0
- data/lib/algolia/models/abtesting-v3/feature_settings.rb +224 -0
- data/lib/algolia/models/abtesting-v3/metric_evidence.rb +209 -0
- data/lib/algolia/models/abtesting-v3/metric_metadata.rb +1 -1
- data/lib/algolia/models/abtesting-v3/metric_name.rb +7 -1
- data/lib/algolia/models/abtesting-v3/metric_result.rb +18 -8
- data/lib/algolia/models/abtesting-v3/minimum_detectable_effect.rb +1 -1
- data/lib/algolia/models/abtesting-v3/primary_metric.rb +37 -0
- data/lib/algolia/models/abtesting-v3/save_settings_request.rb +208 -0
- data/lib/algolia/models/abtesting-v3/variant_settings.rb +293 -0
- data/lib/algolia/models/agent-studio/agent_completion_algolia_params.rb +16 -4
- data/lib/algolia/models/agent-studio/agent_completion_request.rb +1 -3
- data/lib/algolia/models/agent-studio/agent_completion_request_union.rb +108 -0
- data/lib/algolia/models/agent-studio/agent_test_configuration.rb +1 -1
- data/lib/algolia/models/agent-studio/agent_with_version_response.rb +1 -1
- data/lib/algolia/models/agent-studio/agui_completion_request.rb +265 -0
- data/lib/algolia/models/agent-studio/agui_resume.rb +231 -0
- data/lib/algolia/models/agent-studio/algolia_grouped_results_compat_tool_config.rb +268 -0
- data/lib/algolia/models/agent-studio/{algolia_display_results_tool_config.rb → algolia_grouped_results_tool_config.rb} +30 -16
- data/lib/algolia/models/agent-studio/{algolia_recommend_tool_config_input.rb → algolia_recommend_tool_config.rb} +3 -3
- data/lib/algolia/models/agent-studio/algolia_search_tool_config.rb +22 -4
- data/lib/algolia/models/agent-studio/assistant_message_agui.rb +280 -0
- data/lib/algolia/models/agent-studio/assistant_message_v4.rb +1 -0
- data/lib/algolia/models/agent-studio/assistant_message_v5.rb +3 -1
- data/lib/algolia/models/agent-studio/assistant_part_v5.rb +2 -0
- data/lib/algolia/models/agent-studio/azure_open_ai_provider_input.rb +1 -1
- data/lib/algolia/models/agent-studio/boolean_param.rb +220 -0
- data/lib/algolia/models/agent-studio/client_side_tool_config.rb +14 -4
- data/lib/algolia/models/agent-studio/compaction_stats.rb +271 -0
- data/lib/algolia/models/agent-studio/compatibility_mode.rb +2 -1
- data/lib/algolia/models/agent-studio/context_compact_request.rb +263 -0
- data/lib/algolia/models/agent-studio/context_response.rb +231 -0
- data/lib/algolia/models/agent-studio/context_stats.rb +258 -0
- data/lib/algolia/models/agent-studio/context_trim_request.rb +239 -0
- data/lib/algolia/models/agent-studio/conversation_base_response.rb +16 -5
- data/lib/algolia/models/agent-studio/conversation_full_response.rb +26 -5
- data/lib/algolia/models/agent-studio/data_guardrail_violation_part_v5.rb +218 -0
- data/lib/algolia/models/agent-studio/data_part_v5.rb +220 -0
- data/lib/algolia/models/agent-studio/facet_filters_union_search_parameters_overrides.rb +108 -0
- data/lib/algolia/models/agent-studio/feedback_update_request.rb +253 -0
- data/lib/algolia/models/agent-studio/forwarded_props.rb +226 -0
- data/lib/algolia/models/agent-studio/function_call_agui.rb +219 -0
- data/lib/algolia/models/agent-studio/guardrail_outcome.rb +231 -0
- data/lib/algolia/models/agent-studio/guardrail_violation_data_v5.rb +230 -0
- data/lib/algolia/models/agent-studio/impact_analytics.rb +242 -0
- data/lib/algolia/models/agent-studio/index_search_parameters.rb +11 -1
- data/lib/algolia/models/agent-studio/input_union.rb +113 -0
- data/lib/algolia/models/agent-studio/items_union.rb +132 -0
- data/lib/algolia/models/agent-studio/items_union_agui_completion_request.rb +123 -0
- data/lib/algolia/models/agent-studio/managed_provider_response_input.rb +209 -0
- data/lib/algolia/models/agent-studio/mcp_server_tool_config.rb +1 -1
- data/lib/algolia/models/agent-studio/memory_record.rb +4 -4
- data/lib/algolia/models/agent-studio/message_event.rb +231 -0
- data/lib/algolia/models/agent-studio/message_part_assistant_message_agui.rb +123 -0
- data/lib/algolia/models/agent-studio/message_response.rb +87 -5
- data/lib/algolia/models/agent-studio/mode_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/one_of_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/open_ai_compatible_provider_input.rb +1 -1
- data/lib/algolia/models/agent-studio/paginated_conversations_response.rb +13 -4
- data/lib/algolia/models/agent-studio/provider_authentication_response.rb +14 -5
- data/lib/algolia/models/agent-studio/provider_input.rb +2 -1
- data/lib/algolia/models/agent-studio/provider_input_nullable.rb +2 -1
- data/lib/algolia/models/agent-studio/provider_name.rb +2 -1
- data/lib/algolia/models/agent-studio/reasoning_message_agui.rb +239 -0
- data/lib/algolia/models/agent-studio/reasoning_part_agui.rb +228 -0
- data/lib/algolia/models/agent-studio/search_parameters.rb +1 -1
- data/lib/algolia/models/agent-studio/search_parameters_overrides.rb +80 -5
- data/lib/algolia/models/agent-studio/status_enum.rb +34 -0
- data/lib/algolia/models/agent-studio/task_kind.rb +33 -0
- data/lib/algolia/models/agent-studio/task_request.rb +240 -0
- data/lib/algolia/models/agent-studio/task_response.rb +211 -0
- data/lib/algolia/models/agent-studio/text_part_agui.rb +219 -0
- data/lib/algolia/models/agent-studio/tool_approval_agui.rb +228 -0
- data/lib/algolia/models/agent-studio/tool_approval_request_part.rb +15 -5
- data/lib/algolia/models/agent-studio/tool_call_agui.rb +237 -0
- data/lib/algolia/models/agent-studio/tool_call_part.rb +13 -1
- data/lib/algolia/models/agent-studio/tool_call_part_agui.rb +272 -0
- data/lib/algolia/models/agent-studio/tool_call_result_part_agui.rb +250 -0
- data/lib/algolia/models/agent-studio/tool_config_input.rb +2 -5
- data/lib/algolia/models/agent-studio/{tool_config.rb → tool_config_or_boolean_union.rb} +1 -1
- data/lib/algolia/models/agent-studio/tool_config_output.rb +126 -0
- data/lib/algolia/models/agent-studio/tool_invocation_v4.rb +10 -2
- data/lib/algolia/models/agent-studio/tool_message_agui.rb +259 -0
- data/lib/algolia/models/agent-studio/tool_part_v5.rb +47 -2
- data/lib/algolia/models/agent-studio/tool_result_part.rb +57 -5
- data/lib/algolia/models/agent-studio/unknown_tool_config.rb +1 -1
- data/lib/algolia/models/agent-studio/user_message_agui.rb +261 -0
- data/lib/algolia/models/agent-studio/user_message_metadata_agui.rb +208 -0
- data/lib/algolia/models/agent-studio/user_message_metadata_v5.rb +4 -2
- data/lib/algolia/models/agent-studio/user_message_v4.rb +4 -1
- data/lib/algolia/models/agent-studio/user_message_v5.rb +4 -1
- data/lib/algolia/models/agent-studio/validation_error.rb +5 -25
- data/lib/algolia/models/agent-studio/xai_provider_input.rb +220 -0
- data/lib/algolia/models/analytics/catalog_entry.rb +1 -1
- data/lib/algolia/models/composition/base_injection_query_parameters.rb +18 -18
- data/lib/algolia/models/composition/distinct.rb +1 -1
- data/lib/algolia/models/composition/external_provider.rb +209 -0
- data/lib/algolia/models/composition/external_provider_ordering.rb +34 -0
- data/lib/algolia/models/composition/hit_metadata.rb +2 -2
- data/lib/algolia/models/composition/injected_item_external.rb +21 -14
- data/lib/algolia/models/composition/injected_item_external_provider.rb +258 -0
- data/lib/algolia/models/composition/injected_item_external_provider_source.rb +216 -0
- data/lib/algolia/models/composition/injected_item_hits_metadata.rb +1 -1
- data/lib/algolia/models/composition/{recommend.rb → injected_item_recommend.rb} +10 -3
- data/lib/algolia/models/composition/injected_item_recommend_source.rb +1 -1
- data/lib/algolia/models/composition/injected_item_search.rb +8 -1
- data/lib/algolia/models/composition/injected_item_source.rb +1 -0
- data/lib/algolia/models/composition/injection_main_external_provider.rb +258 -0
- data/lib/algolia/models/composition/injection_main_external_provider_source.rb +216 -0
- data/lib/algolia/models/composition/{main_recommend.rb → injection_main_recommend.rb} +10 -3
- data/lib/algolia/models/composition/injection_main_recommend_source.rb +1 -1
- data/lib/algolia/models/composition/{main_search.rb → injection_main_search.rb} +11 -4
- data/lib/algolia/models/composition/injection_main_search_source.rb +1 -1
- data/lib/algolia/models/composition/injection_main_source.rb +1 -0
- data/lib/algolia/models/composition/main_injection_query_parameters.rb +22 -22
- data/lib/algolia/models/composition/optional_words.rb +1 -1
- data/lib/algolia/models/composition/params.rb +6 -6
- data/lib/algolia/models/composition/processing_error.rb +209 -0
- data/lib/algolia/models/composition/request_body.rb +13 -4
- data/lib/algolia/models/composition/result_card.rb +208 -0
- data/lib/algolia/models/composition/search_response.rb +16 -4
- data/lib/algolia/models/composition/widgets.rb +13 -4
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +11 -0
- data/lib/algolia/models/recommend/distinct.rb +1 -1
- data/lib/algolia/models/recommend/fallback_params.rb +26 -26
- data/lib/algolia/models/recommend/optional_words.rb +1 -1
- data/lib/algolia/models/recommend/recommend_search_params.rb +26 -26
- data/lib/algolia/models/recommend/result_card.rb +208 -0
- data/lib/algolia/models/recommend/widgets.rb +13 -4
- data/lib/algolia/models/search/api_key.rb +2 -2
- data/lib/algolia/models/search/attribute_criteria_computed_by.rb +35 -0
- data/lib/algolia/models/search/browse_params_object.rb +35 -25
- data/lib/algolia/models/search/consequence_params.rb +35 -25
- data/lib/algolia/models/search/distinct.rb +1 -1
- data/lib/algolia/models/search/get_api_key_response.rb +2 -2
- data/lib/algolia/models/search/index_settings.rb +28 -18
- data/lib/algolia/models/search/optional_words.rb +1 -1
- data/lib/algolia/models/search/result_card.rb +208 -0
- data/lib/algolia/models/search/search_for_facets.rb +35 -25
- data/lib/algolia/models/search/search_for_hits.rb +35 -25
- data/lib/algolia/models/search/search_params_object.rb +35 -25
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
- data/lib/algolia/models/search/settings_response.rb +28 -18
- data/lib/algolia/models/search/widgets.rb +13 -4
- data/lib/algolia/transport/transport.rb +82 -10
- data/lib/algolia/version.rb +1 -1
- metadata +72 -8
|
@@ -0,0 +1,208 @@
|
|
|
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 Composition
|
|
10
|
+
# Agent Studio Result Card to display for a given search.
|
|
11
|
+
class ResultCard
|
|
12
|
+
# Whether to show the Result Card for the current search.
|
|
13
|
+
attr_accessor :enabled
|
|
14
|
+
|
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
16
|
+
def self.attribute_map
|
|
17
|
+
{
|
|
18
|
+
:enabled => :enabled
|
|
19
|
+
}
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Attribute type mapping.
|
|
23
|
+
def self.types_mapping
|
|
24
|
+
{
|
|
25
|
+
:enabled => :"Boolean"
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# List of attributes with nullable: true
|
|
30
|
+
def self.openapi_nullable
|
|
31
|
+
Set.new(
|
|
32
|
+
[]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Initializes the object
|
|
37
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
38
|
+
def initialize(attributes = {})
|
|
39
|
+
if (!attributes.is_a?(Hash))
|
|
40
|
+
raise(
|
|
41
|
+
ArgumentError,
|
|
42
|
+
"The input argument (attributes) must be a hash in `Algolia::ResultCard` initialize method"
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
49
|
+
raise(
|
|
50
|
+
ArgumentError,
|
|
51
|
+
"`#{k}` is not a valid attribute in `Algolia::ResultCard`. Please check the name to make sure it's valid. List of attributes: " +
|
|
52
|
+
self.class.attribute_map.keys.inspect
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
h[k.to_sym] = v
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if attributes.key?(:enabled)
|
|
60
|
+
self.enabled = attributes[:enabled]
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Checks equality by comparing each attribute.
|
|
65
|
+
# @param [Object] Object to be compared
|
|
66
|
+
def ==(other)
|
|
67
|
+
return true if self.equal?(other)
|
|
68
|
+
self.class == other.class &&
|
|
69
|
+
enabled == other.enabled
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @see the `==` method
|
|
73
|
+
# @param [Object] Object to be compared
|
|
74
|
+
def eql?(other)
|
|
75
|
+
self == other
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Calculates hash code according to all attributes.
|
|
79
|
+
# @return [Integer] Hash code
|
|
80
|
+
def hash
|
|
81
|
+
[enabled].hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Builds the object from hash
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
# @return [Object] Returns the model itself
|
|
87
|
+
def self.build_from_hash(attributes)
|
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
|
89
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
90
|
+
transformed_hash = {}
|
|
91
|
+
types_mapping.each_pair do |key, type|
|
|
92
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
93
|
+
transformed_hash[key.to_sym] = nil
|
|
94
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
95
|
+
# check to ensure the input is an array given that the attribute
|
|
96
|
+
# is documented as an array but the input is not
|
|
97
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
98
|
+
transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v|
|
|
99
|
+
_deserialize(::Regexp.last_match(1), v)
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
103
|
+
transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]])
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
new(transformed_hash)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Deserializes the data based on type
|
|
111
|
+
# @param string type Data type
|
|
112
|
+
# @param string value Value to be deserialized
|
|
113
|
+
# @return [Object] Deserialized data
|
|
114
|
+
def self._deserialize(type, value)
|
|
115
|
+
case type.to_sym
|
|
116
|
+
when :Time
|
|
117
|
+
Time.parse(value)
|
|
118
|
+
when :Date
|
|
119
|
+
Date.parse(value)
|
|
120
|
+
when :String
|
|
121
|
+
value.to_s
|
|
122
|
+
when :Integer
|
|
123
|
+
value.to_i
|
|
124
|
+
when :Float
|
|
125
|
+
value.to_f
|
|
126
|
+
when :Boolean
|
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
128
|
+
true
|
|
129
|
+
else
|
|
130
|
+
false
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
when :Object
|
|
134
|
+
# generic object (usually a Hash), return directly
|
|
135
|
+
value
|
|
136
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
137
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
138
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
139
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
140
|
+
k_type = Regexp.last_match[:k_type]
|
|
141
|
+
v_type = Regexp.last_match[:v_type]
|
|
142
|
+
{}.tap do |hash|
|
|
143
|
+
value.each do |k, v|
|
|
144
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
# model
|
|
148
|
+
else
|
|
149
|
+
# models (e.g. Pet) or oneOf
|
|
150
|
+
klass = Algolia::Composition.const_get(type)
|
|
151
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass
|
|
152
|
+
.build_from_hash(value)
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Returns the string representation of the object
|
|
157
|
+
# @return [String] String presentation of the object
|
|
158
|
+
def to_s
|
|
159
|
+
to_hash.to_s
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_body
|
|
165
|
+
to_hash
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def to_json(*_args)
|
|
169
|
+
to_hash.to_json
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Outputs non-array value in the form of hash
|
|
190
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
191
|
+
# @param [Object] value Any valid value
|
|
192
|
+
# @return [Hash] Returns the value in the form of hash
|
|
193
|
+
def _to_hash(value)
|
|
194
|
+
if value.is_a?(Array)
|
|
195
|
+
value.map { |v| _to_hash(v) }
|
|
196
|
+
elsif value.is_a?(Hash)
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
199
|
+
end
|
|
200
|
+
elsif value.respond_to?(:to_hash)
|
|
201
|
+
value.to_hash
|
|
202
|
+
else
|
|
203
|
+
value
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|
|
@@ -13,13 +13,17 @@ module Algolia
|
|
|
13
13
|
# Search results.
|
|
14
14
|
attr_accessor :results
|
|
15
15
|
|
|
16
|
+
# Non-critical errors encountered while processing the request that may have affected the returned results (for example, an external provider failure that fell back to another result set).
|
|
17
|
+
attr_accessor :errors
|
|
18
|
+
|
|
16
19
|
attr_accessor :additional_properties
|
|
17
20
|
|
|
18
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
19
22
|
def self.attribute_map
|
|
20
23
|
{
|
|
21
24
|
:compositions => :compositions,
|
|
22
|
-
:results => :results
|
|
25
|
+
:results => :results,
|
|
26
|
+
:errors => :errors
|
|
23
27
|
}
|
|
24
28
|
end
|
|
25
29
|
|
|
@@ -27,7 +31,8 @@ module Algolia
|
|
|
27
31
|
def self.types_mapping
|
|
28
32
|
{
|
|
29
33
|
:compositions => :"CompositionsSearchResponse",
|
|
30
|
-
:results => :"Array<SearchResultsItem>"
|
|
34
|
+
:results => :"Array<SearchResultsItem>",
|
|
35
|
+
:errors => :"Array<ProcessingError>"
|
|
31
36
|
}
|
|
32
37
|
end
|
|
33
38
|
|
|
@@ -68,6 +73,12 @@ module Algolia
|
|
|
68
73
|
self.results = nil
|
|
69
74
|
end
|
|
70
75
|
|
|
76
|
+
if attributes.key?(:errors)
|
|
77
|
+
if (value = attributes[:errors]).is_a?(Array)
|
|
78
|
+
self.errors = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
71
82
|
# add extra attribute to additional_properties
|
|
72
83
|
self.additional_properties ||= {}
|
|
73
84
|
self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
|
|
@@ -79,7 +90,8 @@ module Algolia
|
|
|
79
90
|
return true if self.equal?(other)
|
|
80
91
|
self.class == other.class &&
|
|
81
92
|
compositions == other.compositions &&
|
|
82
|
-
results == other.results
|
|
93
|
+
results == other.results &&
|
|
94
|
+
errors == other.errors
|
|
83
95
|
end
|
|
84
96
|
|
|
85
97
|
# @see the `==` method
|
|
@@ -91,7 +103,7 @@ module Algolia
|
|
|
91
103
|
# Calculates hash code according to all attributes.
|
|
92
104
|
# @return [Integer] Hash code
|
|
93
105
|
def hash
|
|
94
|
-
[compositions, results].hash
|
|
106
|
+
[compositions, results, errors].hash
|
|
95
107
|
end
|
|
96
108
|
|
|
97
109
|
# Builds the object from hash
|
|
@@ -12,17 +12,21 @@ module Algolia
|
|
|
12
12
|
# Banners defined in the Merchandising Studio for a given search.
|
|
13
13
|
attr_accessor :banners
|
|
14
14
|
|
|
15
|
+
attr_accessor :result_card
|
|
16
|
+
|
|
15
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
16
18
|
def self.attribute_map
|
|
17
19
|
{
|
|
18
|
-
:banners => :banners
|
|
20
|
+
:banners => :banners,
|
|
21
|
+
:result_card => :resultCard
|
|
19
22
|
}
|
|
20
23
|
end
|
|
21
24
|
|
|
22
25
|
# Attribute type mapping.
|
|
23
26
|
def self.types_mapping
|
|
24
27
|
{
|
|
25
|
-
:banners => :"Array<Banner>"
|
|
28
|
+
:banners => :"Array<Banner>",
|
|
29
|
+
:result_card => :"ResultCard"
|
|
26
30
|
}
|
|
27
31
|
end
|
|
28
32
|
|
|
@@ -58,6 +62,10 @@ module Algolia
|
|
|
58
62
|
self.banners = value
|
|
59
63
|
end
|
|
60
64
|
end
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:result_card)
|
|
67
|
+
self.result_card = attributes[:result_card]
|
|
68
|
+
end
|
|
61
69
|
end
|
|
62
70
|
|
|
63
71
|
# Checks equality by comparing each attribute.
|
|
@@ -65,7 +73,8 @@ module Algolia
|
|
|
65
73
|
def ==(other)
|
|
66
74
|
return true if self.equal?(other)
|
|
67
75
|
self.class == other.class &&
|
|
68
|
-
banners == other.banners
|
|
76
|
+
banners == other.banners &&
|
|
77
|
+
result_card == other.result_card
|
|
69
78
|
end
|
|
70
79
|
|
|
71
80
|
# @see the `==` method
|
|
@@ -77,7 +86,7 @@ module Algolia
|
|
|
77
86
|
# Calculates hash code according to all attributes.
|
|
78
87
|
# @return [Integer] Hash code
|
|
79
88
|
def hash
|
|
80
|
-
[banners].hash
|
|
89
|
+
[banners, result_card].hash
|
|
81
90
|
end
|
|
82
91
|
|
|
83
92
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Algolia
|
|
|
25
25
|
# When set to true, the connector indexes objects with all images attributes instead of only the URLs.
|
|
26
26
|
attr_accessor :use_images_objects
|
|
27
27
|
|
|
28
|
+
# When set to true, the connector uses the complete category path (e.g. \"Root > Level 1 > Category name\") in `categoriesCustomFields`.
|
|
29
|
+
attr_accessor :categories_custom_fields_full_path
|
|
30
|
+
|
|
28
31
|
attr_accessor :custom_fields
|
|
29
32
|
|
|
30
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -36,6 +39,7 @@ module Algolia
|
|
|
36
39
|
:fallback_is_in_stock_value => :fallbackIsInStockValue,
|
|
37
40
|
:product_query_predicate => :productQueryPredicate,
|
|
38
41
|
:use_images_objects => :useImagesObjects,
|
|
42
|
+
:categories_custom_fields_full_path => :categoriesCustomFieldsFullPath,
|
|
39
43
|
:custom_fields => :customFields
|
|
40
44
|
}
|
|
41
45
|
end
|
|
@@ -49,6 +53,7 @@ module Algolia
|
|
|
49
53
|
:fallback_is_in_stock_value => :"Boolean",
|
|
50
54
|
:product_query_predicate => :"String",
|
|
51
55
|
:use_images_objects => :"Boolean",
|
|
56
|
+
:categories_custom_fields_full_path => :"Boolean",
|
|
52
57
|
:custom_fields => :"CommercetoolsCustomFields"
|
|
53
58
|
}
|
|
54
59
|
end
|
|
@@ -111,6 +116,10 @@ module Algolia
|
|
|
111
116
|
self.use_images_objects = attributes[:use_images_objects]
|
|
112
117
|
end
|
|
113
118
|
|
|
119
|
+
if attributes.key?(:categories_custom_fields_full_path)
|
|
120
|
+
self.categories_custom_fields_full_path = attributes[:categories_custom_fields_full_path]
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
if attributes.key?(:custom_fields)
|
|
115
124
|
self.custom_fields = attributes[:custom_fields]
|
|
116
125
|
end
|
|
@@ -127,6 +136,7 @@ module Algolia
|
|
|
127
136
|
fallback_is_in_stock_value == other.fallback_is_in_stock_value &&
|
|
128
137
|
product_query_predicate == other.product_query_predicate &&
|
|
129
138
|
use_images_objects == other.use_images_objects &&
|
|
139
|
+
categories_custom_fields_full_path == other.categories_custom_fields_full_path &&
|
|
130
140
|
custom_fields == other.custom_fields
|
|
131
141
|
end
|
|
132
142
|
|
|
@@ -146,6 +156,7 @@ module Algolia
|
|
|
146
156
|
fallback_is_in_stock_value,
|
|
147
157
|
product_query_predicate,
|
|
148
158
|
use_images_objects,
|
|
159
|
+
categories_custom_fields_full_path,
|
|
149
160
|
custom_fields
|
|
150
161
|
].hash
|
|
151
162
|
end
|
|
@@ -7,7 +7,7 @@ require "time"
|
|
|
7
7
|
|
|
8
8
|
module Algolia
|
|
9
9
|
module Recommend
|
|
10
|
-
# Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#
|
|
10
|
+
# Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#deduplicate-results-with-distinct). The `distinct` setting is ignored if `attributeForDistinct` is not set.
|
|
11
11
|
module Distinct
|
|
12
12
|
class << self
|
|
13
13
|
# List of class defined in oneOf (OpenAPI v3)
|
|
@@ -9,7 +9,7 @@ module Algolia
|
|
|
9
9
|
module Recommend
|
|
10
10
|
# Search parameters to use for a fallback request if there aren't enough recommendations.
|
|
11
11
|
class FallbackParams
|
|
12
|
-
# Keywords to be used instead of the search query to conduct a more broader search Using the `similarQuery` parameter changes other settings - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords
|
|
12
|
+
# Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
|
|
13
13
|
attr_accessor :similar_query
|
|
14
14
|
|
|
15
15
|
# 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 if the facet attribute name or facet value contains 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).
|
|
@@ -21,16 +21,16 @@ module Algolia
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :tag_filters
|
|
23
23
|
|
|
24
|
-
# Whether to sum all filter scores If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#
|
|
24
|
+
# Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulate-scores-with-sumorfiltersscores).
|
|
25
25
|
attr_accessor :sum_or_filters_scores
|
|
26
26
|
|
|
27
27
|
# Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
|
|
28
28
|
attr_accessor :restrict_searchable_attributes
|
|
29
29
|
|
|
30
|
-
# 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 `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
|
|
30
|
+
# 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 `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
|
|
31
31
|
attr_accessor :facets
|
|
32
32
|
|
|
33
|
-
# Whether faceting should be applied after deduplication with `distinct
|
|
33
|
+
# 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`.
|
|
34
34
|
attr_accessor :faceting_after_distinct
|
|
35
35
|
|
|
36
36
|
# 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`.
|
|
@@ -51,13 +51,13 @@ module Algolia
|
|
|
51
51
|
# 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`.
|
|
52
52
|
attr_accessor :inside_polygon
|
|
53
53
|
|
|
54
|
-
# 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`.
|
|
54
|
+
# 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`.
|
|
55
55
|
attr_accessor :natural_languages
|
|
56
56
|
|
|
57
|
-
# Assigns a rule context to the search query [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#
|
|
57
|
+
# Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#assign-context) are strings that you can use to trigger matching rules.
|
|
58
58
|
attr_accessor :rule_contexts
|
|
59
59
|
|
|
60
|
-
# Impact that Personalization should have on this search The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
60
|
+
# Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
61
61
|
attr_accessor :personalization_impact
|
|
62
62
|
|
|
63
63
|
# 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,7 +69,7 @@ module Algolia
|
|
|
69
69
|
# Whether to take into account an index's synonyms for this search.
|
|
70
70
|
attr_accessor :synonyms
|
|
71
71
|
|
|
72
|
-
# 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
|
+
# 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).
|
|
73
73
|
attr_accessor :click_analytics
|
|
74
74
|
|
|
75
75
|
# Whether this search will be included in Analytics.
|
|
@@ -111,7 +111,7 @@ module Algolia
|
|
|
111
111
|
# Languages for language-specific processing steps, such as word detection and dictionary settings. **Always specify an indexing language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
112
112
|
attr_accessor :index_languages
|
|
113
113
|
|
|
114
|
-
# Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#
|
|
114
|
+
# Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjust-prefix-search). Attribute names are case-sensitive.
|
|
115
115
|
attr_accessor :disable_prefix_on_attributes
|
|
116
116
|
|
|
117
117
|
# Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
|
@@ -144,13 +144,13 @@ module Algolia
|
|
|
144
144
|
# Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision) of your first attributes, or the other attributes will never be applied.
|
|
145
145
|
attr_accessor :custom_ranking
|
|
146
146
|
|
|
147
|
-
# Attributes to include in the API response To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
147
|
+
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
148
148
|
attr_accessor :attributes_to_retrieve
|
|
149
149
|
|
|
150
|
-
# 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/#
|
|
150
|
+
# 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/#standard-and-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
151
151
|
attr_accessor :relevancy_strictness
|
|
152
152
|
|
|
153
|
-
# Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
153
|
+
# Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
154
154
|
attr_accessor :attributes_to_highlight
|
|
155
155
|
|
|
156
156
|
# Attributes for which to enable snippets. Attribute names are case-sensitive Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
|
|
@@ -168,18 +168,18 @@ module Algolia
|
|
|
168
168
|
# Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
|
|
169
169
|
attr_accessor :restrict_highlight_and_snippet_arrays
|
|
170
170
|
|
|
171
|
-
# Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#
|
|
171
|
+
# Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configure-word-size-threshold-for-typos).
|
|
172
172
|
attr_accessor :min_word_sizefor1_typo
|
|
173
173
|
|
|
174
|
-
# Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#
|
|
174
|
+
# Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configure-word-size-threshold-for-typos).
|
|
175
175
|
attr_accessor :min_word_sizefor2_typos
|
|
176
176
|
|
|
177
177
|
attr_accessor :typo_tolerance
|
|
178
178
|
|
|
179
|
-
# Whether to allow typos on numbers in the search query Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
|
|
179
|
+
# Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
|
|
180
180
|
attr_accessor :allow_typos_on_numeric_tokens
|
|
181
181
|
|
|
182
|
-
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
182
|
+
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
183
183
|
attr_accessor :disable_typo_tolerance_on_attributes
|
|
184
184
|
|
|
185
185
|
attr_accessor :ignore_plurals
|
|
@@ -189,7 +189,7 @@ module Algolia
|
|
|
189
189
|
# 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, place the CJK language **first**. **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).
|
|
190
190
|
attr_accessor :query_languages
|
|
191
191
|
|
|
192
|
-
# Whether to split compound words in the query into their building blocks For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#
|
|
192
|
+
# Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#split-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
193
193
|
attr_accessor :decompound_query
|
|
194
194
|
|
|
195
195
|
# Whether to enable Personalization.
|
|
@@ -199,7 +199,7 @@ module Algolia
|
|
|
199
199
|
|
|
200
200
|
attr_accessor :remove_words_if_no_results
|
|
201
201
|
|
|
202
|
-
# Whether to support phrase matching and excluding words from search queries Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
|
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
205
|
attr_accessor :optional_words
|
|
@@ -209,35 +209,35 @@ module Algolia
|
|
|
209
209
|
|
|
210
210
|
attr_accessor :exact_on_single_word_query
|
|
211
211
|
|
|
212
|
-
# Determine which plurals and synonyms should be considered an exact matches By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)) - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
|
|
212
|
+
# Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same. - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
|
|
213
213
|
attr_accessor :alternatives_as_exact
|
|
214
214
|
|
|
215
|
-
# Advanced search syntax features you want to support - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\" - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\" This setting only has an effect if `advancedSyntax` is true.
|
|
215
|
+
# Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
|
|
216
216
|
attr_accessor :advanced_syntax_features
|
|
217
217
|
|
|
218
218
|
attr_accessor :distinct
|
|
219
219
|
|
|
220
|
-
# 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.
|
|
220
|
+
# 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.
|
|
221
221
|
attr_accessor :replace_synonyms_in_highlight
|
|
222
222
|
|
|
223
|
-
# 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.
|
|
223
|
+
# 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.
|
|
224
224
|
attr_accessor :min_proximity
|
|
225
225
|
|
|
226
|
-
# Properties to include in the API response of search and browse requests By default, all response properties are included. To reduce the response size, you can select which properties should be included An empty list may lead to an empty API response (except properties you can't exclude) You can't exclude these properties: `message`, `warning`, `cursor`, `abTestVariantID`, or any property added by setting `getRankingInfo` to true Your search depends on the `hits` field. If you omit this field, searches won't return any results. Your UI might also depend on other properties, for example, for pagination. Before restricting the response size, check the impact on your search experience.
|
|
226
|
+
# Properties to include in the API response of search and browse requests. By default, all response properties are included. To reduce the response size, you can select which properties should be included An empty list may lead to an empty API response (except properties you can't exclude) You can't exclude these properties: `message`, `warning`, `cursor`, `abTestVariantID`, or any property added by setting `getRankingInfo` to true Your search depends on the `hits` field. If you omit this field, searches won't return any results. Your UI might also depend on other properties, for example, for pagination. Before restricting the response size, check the impact on your search experience.
|
|
227
227
|
attr_accessor :response_fields
|
|
228
228
|
|
|
229
229
|
# Maximum number of facet values to return for each facet.
|
|
230
230
|
attr_accessor :max_values_per_facet
|
|
231
231
|
|
|
232
|
-
# Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
|
|
232
|
+
# Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
|
|
233
233
|
attr_accessor :sort_facet_values_by
|
|
234
234
|
|
|
235
|
-
# Whether the best matching attribute should be determined by minimum proximity This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
|
|
235
|
+
# Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting. Prefer `attributeCriteriaComputedBy`, which expresses the same two behaviors and adds the `sum` strategy. If you set both, `attributeCriteriaComputedBy` takes precedence.
|
|
236
236
|
attr_accessor :attribute_criteria_computed_by_min_proximity
|
|
237
237
|
|
|
238
238
|
attr_accessor :rendering_content
|
|
239
239
|
|
|
240
|
-
# 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.
|
|
240
|
+
# 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.
|
|
241
241
|
attr_accessor :enable_re_ranking
|
|
242
242
|
|
|
243
243
|
attr_accessor :re_ranking_apply_filter
|
|
@@ -7,7 +7,7 @@ require "time"
|
|
|
7
7
|
|
|
8
8
|
module Algolia
|
|
9
9
|
module Recommend
|
|
10
|
-
# 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 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 optional, 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 fewer 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 2,000 need 2 matched words. - If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down). Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 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/#
|
|
10
|
+
# 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 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 optional, 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 fewer 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 2,000 need 2 matched words. - If `optionalWords` has 10 or more words, the required number of matched words increases by the number of optional words divided by 5 (rounded down). Example: with 18 optional words, results 1 to 1,000 require 1 matched word; results 1,001 to 2,000 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/#create-a-list-of-optional-words).
|
|
11
11
|
module OptionalWords
|
|
12
12
|
class << self
|
|
13
13
|
# List of class defined in oneOf (OpenAPI v3)
|