algolia 3.0.0.alpha.15 → 3.0.0.alpha.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +10 -167
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/analytics_client.rb +76 -76
- data/lib/algolia/api/ingestion_client.rb +267 -196
- data/lib/algolia/api/monitoring_client.rb +49 -49
- data/lib/algolia/api/query_suggestions_client.rb +14 -14
- data/lib/algolia/api/recommend_client.rb +22 -22
- data/lib/algolia/api/search_client.rb +8 -8
- data/lib/algolia/api/usage_client.rb +329 -0
- data/lib/algolia/models/analytics/get_status_response.rb +1 -1
- data/lib/algolia/models/ingestion/auth_algolia.rb +3 -2
- data/lib/algolia/models/ingestion/auth_algolia_insights.rb +212 -0
- data/lib/algolia/models/{recommend/consequence_query_object.rb → ingestion/auth_algolia_insights_partial.rb} +21 -24
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +3 -2
- data/lib/algolia/models/ingestion/auth_api_key.rb +2 -1
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +2 -1
- data/lib/algolia/models/ingestion/auth_basic.rb +3 -1
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +3 -1
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +3 -3
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +3 -3
- data/lib/algolia/models/ingestion/auth_input.rb +1 -0
- data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -0
- data/lib/algolia/models/ingestion/auth_o_auth.rb +18 -8
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +18 -8
- data/lib/algolia/models/ingestion/authentication.rb +5 -5
- data/lib/algolia/models/ingestion/authentication_create.rb +2 -2
- data/lib/algolia/models/ingestion/authentication_create_response.rb +4 -4
- data/lib/algolia/models/ingestion/authentication_search.rb +1 -1
- data/lib/algolia/models/ingestion/authentication_type.rb +2 -1
- data/lib/algolia/models/ingestion/authentication_update.rb +2 -2
- data/lib/algolia/models/ingestion/authentication_update_response.rb +4 -4
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +2 -2
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +2 -2
- data/lib/algolia/models/ingestion/commercetools_custom_fields.rb +1 -1
- data/lib/algolia/models/ingestion/delete_response.rb +1 -1
- data/lib/algolia/models/ingestion/destination.rb +6 -6
- data/lib/algolia/models/ingestion/destination_create.rb +3 -3
- data/lib/algolia/models/ingestion/destination_create_response.rb +4 -4
- data/lib/algolia/models/ingestion/destination_index_name.rb +2 -2
- data/lib/algolia/models/ingestion/destination_index_prefix.rb +1 -1
- data/lib/algolia/models/ingestion/destination_search.rb +1 -1
- data/lib/algolia/models/ingestion/destination_type.rb +1 -2
- data/lib/algolia/models/ingestion/destination_update.rb +3 -3
- data/lib/algolia/models/ingestion/destination_update_response.rb +4 -4
- data/lib/algolia/models/ingestion/docker_source_discover.rb +2 -2
- data/lib/algolia/models/ingestion/event.rb +3 -3
- data/lib/algolia/models/ingestion/list_tasks_response.rb +1 -1
- data/lib/algolia/models/ingestion/mapping_format_schema.rb +32 -0
- data/lib/algolia/models/ingestion/mapping_input.rb +24 -3
- data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +3 -3
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +2 -2
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +1 -1
- data/lib/algolia/models/ingestion/pagination.rb +65 -0
- data/lib/algolia/models/ingestion/platform.rb +2 -1
- data/lib/algolia/models/ingestion/run.rb +7 -7
- data/lib/algolia/models/ingestion/run_response.rb +3 -3
- data/lib/algolia/models/ingestion/schedule_date_utils_input.rb +2 -2
- data/lib/algolia/models/ingestion/schedule_trigger.rb +4 -4
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +2 -2
- data/lib/algolia/models/ingestion/source.rb +4 -4
- data/lib/algolia/models/ingestion/source_big_commerce.rb +1 -1
- data/lib/algolia/models/ingestion/source_big_query.rb +5 -5
- data/lib/algolia/models/ingestion/source_commercetools.rb +2 -2
- data/lib/algolia/models/ingestion/source_create.rb +2 -1
- data/lib/algolia/models/ingestion/source_create_response.rb +3 -2
- data/lib/algolia/models/ingestion/source_csv.rb +3 -3
- data/lib/algolia/models/ingestion/source_docker.rb +3 -3
- data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +3 -3
- data/lib/algolia/models/ingestion/source_json.rb +2 -2
- data/lib/algolia/models/ingestion/source_type.rb +5 -3
- data/lib/algolia/models/ingestion/source_update.rb +2 -1
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +2 -3
- data/lib/algolia/models/ingestion/source_update_docker.rb +3 -3
- data/lib/algolia/models/ingestion/source_update_response.rb +3 -2
- data/lib/algolia/models/ingestion/streaming_trigger.rb +1 -1
- data/lib/algolia/models/ingestion/streaming_utils_input.rb +1 -1
- data/lib/algolia/models/ingestion/subscription_trigger.rb +1 -1
- data/lib/algolia/models/ingestion/task.rb +7 -7
- data/lib/algolia/models/ingestion/task_create.rb +5 -5
- data/lib/algolia/models/ingestion/task_create_response.rb +3 -3
- data/lib/algolia/models/ingestion/task_input.rb +1 -0
- data/lib/algolia/models/ingestion/task_update.rb +4 -4
- data/lib/algolia/models/ingestion/task_update_response.rb +3 -3
- data/lib/algolia/models/ingestion/trigger.rb +1 -0
- data/lib/algolia/models/ingestion/trigger_update_input.rb +2 -2
- data/lib/algolia/models/ingestion/window.rb +3 -3
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +1 -1
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +1 -1
- data/lib/algolia/models/insights/clicked_filters.rb +1 -1
- data/lib/algolia/models/insights/clicked_object_ids.rb +1 -1
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +1 -1
- data/lib/algolia/models/insights/converted_filters.rb +1 -1
- data/lib/algolia/models/insights/converted_object_ids.rb +1 -1
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +1 -1
- data/lib/algolia/models/insights/purchased_object_ids.rb +1 -1
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +3 -1
- data/lib/algolia/models/insights/viewed_filters.rb +1 -1
- data/lib/algolia/models/insights/viewed_object_ids.rb +1 -1
- data/lib/algolia/models/monitoring/{get_inventory403_response.rb → get_servers403_response.rb} +3 -3
- data/lib/algolia/models/monitoring/incidents_inner.rb +1 -1
- data/lib/algolia/models/monitoring/probes_metric.rb +1 -1
- data/lib/algolia/models/monitoring/server.rb +2 -2
- data/lib/algolia/models/monitoring/time_inner.rb +1 -1
- data/lib/algolia/models/query-suggestions/app_id.rb +197 -0
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +4 -4
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +2 -2
- data/lib/algolia/models/query-suggestions/languages.rb +1 -1
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +2 -3
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +23 -34
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +18 -20
- data/lib/algolia/models/query-suggestions/source_index.rb +3 -5
- data/lib/algolia/models/recommend/auto_facet_filter.rb +208 -0
- data/lib/algolia/models/recommend/base_recommend_request.rb +36 -7
- data/lib/algolia/models/recommend/base_search_params.rb +1 -1
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +1 -1
- data/lib/algolia/models/recommend/bought_together_query.rb +319 -0
- data/lib/algolia/models/recommend/condition.rb +12 -62
- data/lib/algolia/models/recommend/consequence.rb +32 -54
- data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
- data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb} +9 -12
- data/lib/algolia/models/recommend/{edit_type.rb → fbt_model.rb} +5 -6
- data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb} +20 -18
- data/lib/algolia/models/recommend/get_recommendations_params.rb +2 -2
- data/lib/algolia/models/recommend/{consequence_hide.rb → hide_consequence_object.rb} +4 -6
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +5 -5
- data/lib/algolia/models/recommend/{base_recommendations_query.rb → looking_similar.rb} +6 -15
- data/lib/algolia/models/recommend/{anchoring.rb → looking_similar_model.rb} +5 -8
- data/lib/algolia/models/recommend/looking_similar_query.rb +328 -0
- data/lib/algolia/models/recommend/{params.rb → params_consequence.rb} +26 -28
- data/lib/algolia/models/recommend/{promote_object_id.rb → promote_consequence_object.rb} +19 -9
- data/lib/algolia/models/recommend/{rule_response.rb → recommend_rule.rb} +13 -18
- data/lib/algolia/models/recommend/{rule_response_metadata.rb → recommend_rule_metadata.rb} +5 -4
- data/lib/algolia/models/recommend/recommendations_hits.rb +4 -24
- data/lib/algolia/models/recommend/recommendations_request.rb +3 -1
- data/lib/algolia/models/recommend/recommendations_results.rb +4 -24
- data/lib/algolia/models/recommend/{base_recommended_for_you_query.rb → recommended_for_you.rb} +5 -14
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +35 -15
- data/lib/algolia/models/recommend/{recommendation_models.rb → related_model.rb} +4 -5
- data/lib/algolia/models/recommend/{edit.rb → related_products.rb} +27 -24
- data/lib/algolia/models/recommend/{recommendations_query.rb → related_query.rb} +39 -19
- data/lib/algolia/models/recommend/{consequence_params.rb → search_params.rb} +25 -44
- data/lib/algolia/models/recommend/search_params_object.rb +6 -6
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +58 -10
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +2 -2
- data/lib/algolia/models/recommend/trending_facet_hit.rb +2 -2
- data/lib/algolia/models/recommend/trending_facets.rb +243 -0
- data/lib/algolia/models/recommend/trending_facets_query.rb +50 -10
- data/lib/algolia/models/recommend/{base_trending_items_query.rb → trending_items.rb} +12 -15
- data/lib/algolia/models/recommend/trending_items_query.rb +42 -16
- data/lib/algolia/models/search/add_api_key_response.rb +1 -1
- data/lib/algolia/models/search/base_get_api_key_response.rb +1 -1
- data/lib/algolia/models/search/base_index_settings.rb +4 -4
- data/lib/algolia/models/search/base_search_params.rb +1 -1
- data/lib/algolia/models/search/base_search_params_without_query.rb +1 -1
- data/lib/algolia/models/search/browse_params_object.rb +6 -6
- data/lib/algolia/models/search/consequence_params.rb +6 -6
- data/lib/algolia/models/search/created_at_response.rb +1 -1
- data/lib/algolia/models/search/delete_api_key_response.rb +1 -1
- data/lib/algolia/models/search/delete_by_params.rb +1 -1
- data/lib/algolia/models/search/delete_source_response.rb +1 -1
- data/lib/algolia/models/search/deleted_at_response.rb +1 -1
- data/lib/algolia/models/search/fetched_index.rb +1 -1
- data/lib/algolia/models/search/get_api_key_response.rb +1 -1
- data/lib/algolia/models/search/index_settings.rb +9 -9
- data/lib/algolia/models/search/index_settings_as_search_params.rb +5 -5
- data/lib/algolia/models/search/log.rb +1 -1
- data/lib/algolia/models/search/remove_user_id_response.rb +1 -1
- data/lib/algolia/models/search/replace_source_response.rb +1 -1
- data/lib/algolia/models/search/save_object_response.rb +1 -1
- data/lib/algolia/models/search/save_synonym_response.rb +1 -1
- data/lib/algolia/models/search/search_for_facets.rb +6 -6
- data/lib/algolia/models/search/search_for_hits.rb +6 -6
- data/lib/algolia/models/search/search_params_object.rb +6 -6
- data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
- data/lib/algolia/models/search/update_api_key_response.rb +1 -1
- data/lib/algolia/models/search/updated_at_response.rb +1 -1
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +1 -1
- data/lib/algolia/models/search/updated_rule_response.rb +1 -1
- data/lib/algolia/models/search/user_hit.rb +1 -1
- data/lib/algolia/models/search/user_id.rb +1 -1
- data/lib/algolia/models/usage/error_base.rb +205 -0
- data/lib/algolia/models/usage/get_usage200_response.rb +198 -0
- data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +206 -0
- data/lib/algolia/models/{recommend/base_recommended_for_you_query_parameters.rb → usage/get_usage400_response.rb} +13 -14
- data/lib/algolia/models/usage/get_usage400_response_error.rb +216 -0
- data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +225 -0
- data/lib/algolia/models/usage/granularity.rb +33 -0
- data/lib/algolia/models/usage/statistic.rb +116 -0
- data/lib/algolia/models/{recommend/promote.rb → usage/statistic_value.rb} +5 -5
- data/lib/algolia/version.rb +1 -1
- metadata +37 -26
- data/lib/algolia/models/recommend/automatic_facet_filter.rb +0 -220
- data/lib/algolia/models/recommend/automatic_facet_filters.rb +0 -97
- data/lib/algolia/models/recommend/consequence_query.rb +0 -97
- data/lib/algolia/models/recommend/promote_object_ids.rb +0 -228
@@ -5,51 +5,19 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
+
# Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
|
8
9
|
class Condition
|
9
|
-
#
|
10
|
-
attr_accessor :
|
11
|
-
|
12
|
-
attr_accessor :anchoring
|
13
|
-
|
14
|
-
# Whether the pattern should match plurals, synonyms, and typos.
|
15
|
-
attr_accessor :alternatives
|
10
|
+
# 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/).
|
11
|
+
attr_accessor :filters
|
16
12
|
|
17
13
|
# An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
|
18
14
|
attr_accessor :context
|
19
15
|
|
20
|
-
# 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.
|
21
|
-
attr_accessor :filters
|
22
|
-
|
23
|
-
class EnumAttributeValidator
|
24
|
-
attr_reader :datatype
|
25
|
-
attr_reader :allowable_values
|
26
|
-
|
27
|
-
def initialize(datatype, allowable_values)
|
28
|
-
@allowable_values = allowable_values.map do |value|
|
29
|
-
case datatype.to_s
|
30
|
-
when /Integer/i
|
31
|
-
value.to_i
|
32
|
-
when /Float/i
|
33
|
-
value.to_f
|
34
|
-
else
|
35
|
-
value
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def valid?(value)
|
41
|
-
!value || allowable_values.include?(value)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
17
|
def self.attribute_map
|
47
18
|
{
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:alternatives => :alternatives,
|
51
|
-
:context => :context,
|
52
|
-
:filters => :filters
|
19
|
+
:filters => :filters,
|
20
|
+
:context => :context
|
53
21
|
}
|
54
22
|
end
|
55
23
|
|
@@ -61,11 +29,8 @@ module Algolia
|
|
61
29
|
# Attribute type mapping.
|
62
30
|
def self.types_mapping
|
63
31
|
{
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:alternatives => :Boolean,
|
67
|
-
:context => :String,
|
68
|
-
:filters => :String
|
32
|
+
:filters => :String,
|
33
|
+
:context => :String
|
69
34
|
}
|
70
35
|
end
|
71
36
|
|
@@ -91,25 +56,13 @@ module Algolia
|
|
91
56
|
h[k.to_sym] = v
|
92
57
|
end
|
93
58
|
|
94
|
-
if attributes.key?(:
|
95
|
-
self.
|
96
|
-
end
|
97
|
-
|
98
|
-
if attributes.key?(:anchoring)
|
99
|
-
self.anchoring = attributes[:anchoring]
|
100
|
-
end
|
101
|
-
|
102
|
-
if attributes.key?(:alternatives)
|
103
|
-
self.alternatives = attributes[:alternatives]
|
59
|
+
if attributes.key?(:filters)
|
60
|
+
self.filters = attributes[:filters]
|
104
61
|
end
|
105
62
|
|
106
63
|
if attributes.key?(:context)
|
107
64
|
self.context = attributes[:context]
|
108
65
|
end
|
109
|
-
|
110
|
-
if attributes.key?(:filters)
|
111
|
-
self.filters = attributes[:filters]
|
112
|
-
end
|
113
66
|
end
|
114
67
|
|
115
68
|
# Custom attribute writer method with validation
|
@@ -133,11 +86,8 @@ module Algolia
|
|
133
86
|
return true if equal?(other)
|
134
87
|
|
135
88
|
self.class == other.class &&
|
136
|
-
|
137
|
-
|
138
|
-
alternatives == other.alternatives &&
|
139
|
-
context == other.context &&
|
140
|
-
filters == other.filters
|
89
|
+
filters == other.filters &&
|
90
|
+
context == other.context
|
141
91
|
end
|
142
92
|
|
143
93
|
# @see the `==` method
|
@@ -149,7 +99,7 @@ module Algolia
|
|
149
99
|
# Calculates hash code according to all attributes.
|
150
100
|
# @return [Integer] Hash code
|
151
101
|
def hash
|
152
|
-
[
|
102
|
+
[filters, context].hash
|
153
103
|
end
|
154
104
|
|
155
105
|
# Builds the object from hash
|
@@ -5,30 +5,22 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
# Effect of the rule.
|
8
|
+
# Effect of the rule.
|
9
9
|
class Consequence
|
10
|
-
|
10
|
+
# Exclude items from recommendations.
|
11
|
+
attr_accessor :hide
|
11
12
|
|
12
|
-
#
|
13
|
+
# Place items at specific positions in the list of recommendations.
|
13
14
|
attr_accessor :promote
|
14
15
|
|
15
|
-
|
16
|
-
attr_accessor :filter_promotes
|
17
|
-
|
18
|
-
# Records you want to hide from the search results.
|
19
|
-
attr_accessor :hide
|
20
|
-
|
21
|
-
# A JSON object with custom data that will be appended to the `userData` array in the response. This object isn't interpreted by the API and is limited to 1 kB of minified JSON.
|
22
|
-
attr_accessor :user_data
|
16
|
+
attr_accessor :params
|
23
17
|
|
24
18
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
19
|
def self.attribute_map
|
26
20
|
{
|
27
|
-
:params => :params,
|
28
|
-
:promote => :promote,
|
29
|
-
:filter_promotes => :filterPromotes,
|
30
21
|
:hide => :hide,
|
31
|
-
:
|
22
|
+
:promote => :promote,
|
23
|
+
:params => :params
|
32
24
|
}
|
33
25
|
end
|
34
26
|
|
@@ -40,19 +32,15 @@ module Algolia
|
|
40
32
|
# Attribute type mapping.
|
41
33
|
def self.types_mapping
|
42
34
|
{
|
43
|
-
:
|
44
|
-
:promote => :'Array<
|
45
|
-
:
|
46
|
-
:hide => :'Array<ConsequenceHide>',
|
47
|
-
:user_data => :Object
|
35
|
+
:hide => :'Array<HideConsequenceObject>',
|
36
|
+
:promote => :'Array<PromoteConsequenceObject>',
|
37
|
+
:params => :ParamsConsequence
|
48
38
|
}
|
49
39
|
end
|
50
40
|
|
51
41
|
# List of attributes with nullable: true
|
52
42
|
def self.openapi_nullable
|
53
|
-
Set.new([
|
54
|
-
:user_data
|
55
|
-
])
|
43
|
+
Set.new([])
|
56
44
|
end
|
57
45
|
|
58
46
|
# Initializes the object
|
@@ -72,8 +60,10 @@ module Algolia
|
|
72
60
|
h[k.to_sym] = v
|
73
61
|
end
|
74
62
|
|
75
|
-
if attributes.key?(:
|
76
|
-
|
63
|
+
if attributes.key?(:hide)
|
64
|
+
if (value = attributes[:hide]).is_a?(Array)
|
65
|
+
self.hide = value
|
66
|
+
end
|
77
67
|
end
|
78
68
|
|
79
69
|
if attributes.key?(:promote)
|
@@ -82,19 +72,23 @@ module Algolia
|
|
82
72
|
end
|
83
73
|
end
|
84
74
|
|
85
|
-
if attributes.key?(:
|
86
|
-
self.
|
75
|
+
if attributes.key?(:params)
|
76
|
+
self.params = attributes[:params]
|
87
77
|
end
|
78
|
+
end
|
88
79
|
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
80
|
+
# Custom attribute writer method with validation
|
81
|
+
# @param [Object] hide Value to be assigned
|
82
|
+
def hide=(hide)
|
83
|
+
if hide.nil?
|
84
|
+
raise ArgumentError, 'hide cannot be nil'
|
93
85
|
end
|
94
86
|
|
95
|
-
if
|
96
|
-
|
87
|
+
if hide.length < 1
|
88
|
+
raise ArgumentError, 'invalid value for "hide", number of items must be greater than or equal to 1.'
|
97
89
|
end
|
90
|
+
|
91
|
+
@hide = hide
|
98
92
|
end
|
99
93
|
|
100
94
|
# Custom attribute writer method with validation
|
@@ -104,38 +98,22 @@ module Algolia
|
|
104
98
|
raise ArgumentError, 'promote cannot be nil'
|
105
99
|
end
|
106
100
|
|
107
|
-
if promote.length
|
108
|
-
raise ArgumentError, 'invalid value for "promote", number of items must be
|
101
|
+
if promote.length < 1
|
102
|
+
raise ArgumentError, 'invalid value for "promote", number of items must be greater than or equal to 1.'
|
109
103
|
end
|
110
104
|
|
111
105
|
@promote = promote
|
112
106
|
end
|
113
107
|
|
114
|
-
# Custom attribute writer method with validation
|
115
|
-
# @param [Object] hide Value to be assigned
|
116
|
-
def hide=(hide)
|
117
|
-
if hide.nil?
|
118
|
-
raise ArgumentError, 'hide cannot be nil'
|
119
|
-
end
|
120
|
-
|
121
|
-
if hide.length > 50
|
122
|
-
raise ArgumentError, 'invalid value for "hide", number of items must be less than or equal to 50.'
|
123
|
-
end
|
124
|
-
|
125
|
-
@hide = hide
|
126
|
-
end
|
127
|
-
|
128
108
|
# Checks equality by comparing each attribute.
|
129
109
|
# @param [Object] Object to be compared
|
130
110
|
def ==(other)
|
131
111
|
return true if equal?(other)
|
132
112
|
|
133
113
|
self.class == other.class &&
|
134
|
-
params == other.params &&
|
135
|
-
promote == other.promote &&
|
136
|
-
filter_promotes == other.filter_promotes &&
|
137
114
|
hide == other.hide &&
|
138
|
-
|
115
|
+
promote == other.promote &&
|
116
|
+
params == other.params
|
139
117
|
end
|
140
118
|
|
141
119
|
# @see the `==` method
|
@@ -147,7 +125,7 @@ module Algolia
|
|
147
125
|
# Calculates hash code according to all attributes.
|
148
126
|
# @return [Integer] Hash code
|
149
127
|
def hash
|
150
|
-
[
|
128
|
+
[hide, promote, params].hash
|
151
129
|
end
|
152
130
|
|
153
131
|
# Builds the object from hash
|
@@ -10,7 +10,7 @@ module Algolia
|
|
10
10
|
# Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
|
11
11
|
attr_accessor :task_id
|
12
12
|
|
13
|
-
#
|
13
|
+
# Date and time when the object was deleted, in RFC 3339 format.
|
14
14
|
attr_accessor :deleted_at
|
15
15
|
|
16
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb}
RENAMED
@@ -5,14 +5,14 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
class
|
8
|
+
class FallbackParams
|
9
9
|
# Search query.
|
10
10
|
attr_accessor :query
|
11
11
|
|
12
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
|
-
# Filter
|
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 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/).
|
16
16
|
attr_accessor :filters
|
17
17
|
|
18
18
|
attr_accessor :facet_filters
|
@@ -99,10 +99,10 @@ module Algolia
|
|
99
99
|
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` 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.
|
100
100
|
attr_accessor :attributes_to_retrieve
|
101
101
|
|
102
|
-
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
|
102
|
+
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **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. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
|
103
103
|
attr_accessor :ranking
|
104
104
|
|
105
|
-
# Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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**
|
105
|
+
# Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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.
|
106
106
|
attr_accessor :custom_ranking
|
107
107
|
|
108
108
|
# 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.
|
@@ -181,10 +181,10 @@ module Algolia
|
|
181
181
|
|
182
182
|
attr_accessor :exact_on_single_word_query
|
183
183
|
|
184
|
-
# Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
|
184
|
+
# Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
|
185
185
|
attr_accessor :alternatives_as_exact
|
186
186
|
|
187
|
-
# Advanced search syntax features you want to support.
|
187
|
+
# Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
|
188
188
|
attr_accessor :advanced_syntax_features
|
189
189
|
|
190
190
|
attr_accessor :distinct
|
@@ -204,7 +204,7 @@ module Algolia
|
|
204
204
|
# Maximum number of facet values to return for each facet.
|
205
205
|
attr_accessor :max_values_per_facet
|
206
206
|
|
207
|
-
# Order in which to retrieve facet values.
|
207
|
+
# 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/).
|
208
208
|
attr_accessor :sort_facet_values_by
|
209
209
|
|
210
210
|
# 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.
|
@@ -418,7 +418,6 @@ module Algolia
|
|
418
418
|
# List of class defined in allOf (OpenAPI v3)
|
419
419
|
def self.openapi_all_of
|
420
420
|
[
|
421
|
-
:BaseRecommendedForYouQueryParameters,
|
422
421
|
:SearchParamsObject
|
423
422
|
]
|
424
423
|
end
|
@@ -427,14 +426,14 @@ module Algolia
|
|
427
426
|
# @param [Hash] attributes Model attributes in the form of hash
|
428
427
|
def initialize(attributes = {})
|
429
428
|
unless attributes.is_a?(Hash)
|
430
|
-
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::
|
429
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::FallbackParams` initialize method"
|
431
430
|
end
|
432
431
|
|
433
432
|
# check to see if the attribute exists and convert string to symbol for hash key
|
434
433
|
attributes = attributes.each_with_object({}) do |(k, v), h|
|
435
434
|
unless self.class.attribute_map.key?(k.to_sym)
|
436
435
|
raise ArgumentError,
|
437
|
-
"`#{k}` is not a valid attribute in `Algolia::
|
436
|
+
"`#{k}` is not a valid attribute in `Algolia::FallbackParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
438
437
|
end
|
439
438
|
|
440
439
|
h[k.to_sym] = v
|
@@ -550,8 +549,6 @@ module Algolia
|
|
550
549
|
|
551
550
|
if attributes.key?(:user_token)
|
552
551
|
self.user_token = attributes[:user_token]
|
553
|
-
else
|
554
|
-
self.user_token = nil
|
555
552
|
end
|
556
553
|
|
557
554
|
if attributes.key?(:get_ranking_info)
|
@@ -5,12 +5,11 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
class
|
9
|
-
|
10
|
-
REPLACE = "replace".freeze
|
8
|
+
class FbtModel
|
9
|
+
BOUGHT_TOGETHER = "bought-together".freeze
|
11
10
|
|
12
11
|
def self.all_vars
|
13
|
-
@all_vars ||= [
|
12
|
+
@all_vars ||= [BOUGHT_TOGETHER].freeze
|
14
13
|
end
|
15
14
|
|
16
15
|
# Builds the enum from string
|
@@ -24,9 +23,9 @@ module Algolia
|
|
24
23
|
# @param [String] The enum value in the form of the string
|
25
24
|
# @return [String] The enum value
|
26
25
|
def build_from_hash(value)
|
27
|
-
return value if
|
26
|
+
return value if FbtModel.all_vars.include?(value)
|
28
27
|
|
29
|
-
raise "Invalid ENUM value #{value} for class #
|
28
|
+
raise "Invalid ENUM value #{value} for class #FbtModel"
|
30
29
|
end
|
31
30
|
end
|
32
31
|
end
|
data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb}
RENAMED
@@ -5,12 +5,12 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
class
|
9
|
-
# Facet name for trending models.
|
10
|
-
attr_accessor :facet_name
|
11
|
-
|
8
|
+
class FrequentlyBoughtTogether
|
12
9
|
attr_accessor :model
|
13
10
|
|
11
|
+
# Unique record identifier.
|
12
|
+
attr_accessor :object_id
|
13
|
+
|
14
14
|
class EnumAttributeValidator
|
15
15
|
attr_reader :datatype
|
16
16
|
attr_reader :allowable_values
|
@@ -36,8 +36,8 @@ module Algolia
|
|
36
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
37
|
def self.attribute_map
|
38
38
|
{
|
39
|
-
:
|
40
|
-
:
|
39
|
+
:model => :model,
|
40
|
+
:object_id => :objectID
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
@@ -49,8 +49,8 @@ module Algolia
|
|
49
49
|
# Attribute type mapping.
|
50
50
|
def self.types_mapping
|
51
51
|
{
|
52
|
-
:
|
53
|
-
:
|
52
|
+
:model => :FbtModel,
|
53
|
+
:object_id => :String
|
54
54
|
}
|
55
55
|
end
|
56
56
|
|
@@ -63,27 +63,29 @@ module Algolia
|
|
63
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
64
64
|
def initialize(attributes = {})
|
65
65
|
unless attributes.is_a?(Hash)
|
66
|
-
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::
|
66
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::FrequentlyBoughtTogether` initialize method"
|
67
67
|
end
|
68
68
|
|
69
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
70
70
|
attributes = attributes.each_with_object({}) do |(k, v), h|
|
71
71
|
unless self.class.attribute_map.key?(k.to_sym)
|
72
72
|
raise ArgumentError,
|
73
|
-
"`#{k}` is not a valid attribute in `Algolia::
|
73
|
+
"`#{k}` is not a valid attribute in `Algolia::FrequentlyBoughtTogether`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
74
|
end
|
75
75
|
|
76
76
|
h[k.to_sym] = v
|
77
77
|
end
|
78
78
|
|
79
|
-
if attributes.key?(:
|
80
|
-
self.
|
79
|
+
if attributes.key?(:model)
|
80
|
+
self.model = attributes[:model]
|
81
81
|
else
|
82
|
-
self.
|
82
|
+
self.model = nil
|
83
83
|
end
|
84
84
|
|
85
|
-
if attributes.key?(:
|
86
|
-
self.
|
85
|
+
if attributes.key?(:object_id)
|
86
|
+
self.object_id = attributes[:object_id]
|
87
|
+
else
|
88
|
+
self.object_id = nil
|
87
89
|
end
|
88
90
|
end
|
89
91
|
|
@@ -93,8 +95,8 @@ module Algolia
|
|
93
95
|
return true if equal?(other)
|
94
96
|
|
95
97
|
self.class == other.class &&
|
96
|
-
|
97
|
-
|
98
|
+
model == other.model &&
|
99
|
+
object_id == other.object_id
|
98
100
|
end
|
99
101
|
|
100
102
|
# @see the `==` method
|
@@ -106,7 +108,7 @@ module Algolia
|
|
106
108
|
# Calculates hash code according to all attributes.
|
107
109
|
# @return [Integer] Hash code
|
108
110
|
def hash
|
109
|
-
[
|
111
|
+
[model, object_id].hash
|
110
112
|
end
|
111
113
|
|
112
114
|
# Builds the object from hash
|
@@ -5,9 +5,9 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
# Recommend
|
8
|
+
# Recommend request body.
|
9
9
|
class GetRecommendationsParams
|
10
|
-
#
|
10
|
+
# Recommendation request with parameters depending on the requested model.
|
11
11
|
attr_accessor :requests
|
12
12
|
|
13
13
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -5,8 +5,8 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Recommend
|
8
|
-
# Object ID of the
|
9
|
-
class
|
8
|
+
# Object ID of the recommendation you want to exclude.
|
9
|
+
class HideConsequenceObject
|
10
10
|
# Unique record identifier.
|
11
11
|
attr_accessor :object_id
|
12
12
|
|
@@ -38,14 +38,14 @@ module Algolia
|
|
38
38
|
# @param [Hash] attributes Model attributes in the form of hash
|
39
39
|
def initialize(attributes = {})
|
40
40
|
unless attributes.is_a?(Hash)
|
41
|
-
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::
|
41
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::HideConsequenceObject` initialize method"
|
42
42
|
end
|
43
43
|
|
44
44
|
# check to see if the attribute exists and convert string to symbol for hash key
|
45
45
|
attributes = attributes.each_with_object({}) do |(k, v), h|
|
46
46
|
unless self.class.attribute_map.key?(k.to_sym)
|
47
47
|
raise ArgumentError,
|
48
|
-
"`#{k}` is not a valid attribute in `Algolia::
|
48
|
+
"`#{k}` is not a valid attribute in `Algolia::HideConsequenceObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
49
49
|
end
|
50
50
|
|
51
51
|
h[k.to_sym] = v
|
@@ -53,8 +53,6 @@ module Algolia
|
|
53
53
|
|
54
54
|
if attributes.key?(:object_id)
|
55
55
|
self.object_id = attributes[:object_id]
|
56
|
-
else
|
57
|
-
self.object_id = nil
|
58
56
|
end
|
59
57
|
end
|
60
58
|
|
@@ -9,10 +9,10 @@ module Algolia
|
|
9
9
|
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` 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.
|
10
10
|
attr_accessor :attributes_to_retrieve
|
11
11
|
|
12
|
-
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers**
|
12
|
+
# Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **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. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
|
13
13
|
attr_accessor :ranking
|
14
14
|
|
15
|
-
# Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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**
|
15
|
+
# Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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.
|
16
16
|
attr_accessor :custom_ranking
|
17
17
|
|
18
18
|
# 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.
|
@@ -91,10 +91,10 @@ module Algolia
|
|
91
91
|
|
92
92
|
attr_accessor :exact_on_single_word_query
|
93
93
|
|
94
|
-
# Alternatives of query words that should be considered as exact matches by the Exact ranking criterion.
|
94
|
+
# Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
|
95
95
|
attr_accessor :alternatives_as_exact
|
96
96
|
|
97
|
-
# Advanced search syntax features you want to support.
|
97
|
+
# 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.
|
98
98
|
attr_accessor :advanced_syntax_features
|
99
99
|
|
100
100
|
attr_accessor :distinct
|
@@ -114,7 +114,7 @@ module Algolia
|
|
114
114
|
# Maximum number of facet values to return for each facet.
|
115
115
|
attr_accessor :max_values_per_facet
|
116
116
|
|
117
|
-
# Order in which to retrieve facet values.
|
117
|
+
# 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/).
|
118
118
|
attr_accessor :sort_facet_values_by
|
119
119
|
|
120
120
|
# 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.
|