algolia 3.0.0.alpha.12 → 3.0.0.alpha.13
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 +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +4 -4
- data/lib/algolia/api/abtesting_client.rb +8 -4
- data/lib/algolia/api/analytics_client.rb +146 -282
- data/lib/algolia/api/ingestion_client.rb +4 -4
- data/lib/algolia/api/insights_client.rb +7 -7
- data/lib/algolia/api/recommend_client.rb +12 -12
- data/lib/algolia/api/search_client.rb +242 -242
- data/lib/algolia/models/abtesting/ab_test_response.rb +1 -1
- data/lib/algolia/models/analytics/search_no_result_event.rb +1 -1
- data/lib/algolia/models/analytics/top_search.rb +1 -1
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
- data/lib/algolia/models/ingestion/action_type.rb +2 -1
- data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +223 -0
- data/lib/algolia/models/ingestion/source_input.rb +1 -0
- data/lib/algolia/models/ingestion/source_type.rb +2 -1
- data/lib/algolia/models/ingestion/source_update_input.rb +1 -0
- data/lib/algolia/models/ingestion/streaming_trigger.rb +221 -0
- data/lib/algolia/models/ingestion/streaming_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/streaming_utils_input.rb +199 -0
- data/lib/algolia/models/ingestion/task_create_trigger.rb +1 -0
- data/lib/algolia/models/ingestion/task_input.rb +2 -1
- data/lib/algolia/models/ingestion/trigger.rb +1 -0
- data/lib/algolia/models/ingestion/trigger_type.rb +2 -1
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +6 -6
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +6 -6
- data/lib/algolia/models/insights/clicked_filters.rb +6 -6
- data/lib/algolia/models/insights/clicked_object_ids.rb +6 -6
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -7
- data/lib/algolia/models/insights/converted_filters.rb +6 -6
- data/lib/algolia/models/insights/converted_object_ids.rb +6 -6
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -6
- data/lib/algolia/models/insights/discount.rb +1 -1
- data/lib/algolia/models/insights/insights_events.rb +1 -1
- data/lib/algolia/models/insights/object_data.rb +1 -1
- data/lib/algolia/models/insights/object_data_after_search.rb +1 -1
- data/lib/algolia/models/insights/price.rb +1 -1
- data/lib/algolia/models/insights/purchased_object_ids.rb +6 -6
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +6 -6
- data/lib/algolia/models/insights/viewed_filters.rb +6 -6
- data/lib/algolia/models/insights/viewed_object_ids.rb +6 -6
- data/lib/algolia/models/recommend/around_precision.rb +1 -1
- data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +3 -0
- data/lib/algolia/models/recommend/around_radius.rb +1 -1
- data/lib/algolia/models/recommend/automatic_facet_filter.rb +4 -4
- data/lib/algolia/models/recommend/automatic_facet_filters.rb +1 -1
- data/lib/algolia/models/recommend/base_recommend_request.rb +1 -1
- data/lib/algolia/models/recommend/base_recommendations_query.rb +1 -1
- data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +1 -1
- data/lib/algolia/models/recommend/base_search_params.rb +58 -38
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +57 -37
- data/lib/algolia/models/recommend/base_search_response.rb +20 -6
- data/lib/algolia/models/recommend/condition.rb +32 -7
- data/lib/algolia/models/recommend/consequence.rb +33 -5
- data/lib/algolia/models/recommend/consequence_hide.rb +2 -2
- data/lib/algolia/models/recommend/consequence_params.rb +101 -79
- data/lib/algolia/models/recommend/consequence_query.rb +1 -1
- data/lib/algolia/models/recommend/consequence_query_object.rb +2 -2
- data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
- data/lib/algolia/models/recommend/distinct.rb +1 -1
- data/lib/algolia/models/recommend/edit.rb +1 -1
- data/lib/algolia/models/recommend/facet_filters.rb +1 -1
- data/lib/algolia/models/recommend/facet_ordering.rb +2 -2
- data/lib/algolia/models/recommend/facets.rb +2 -2
- data/lib/algolia/models/recommend/highlight_result_option.rb +3 -3
- data/lib/algolia/models/recommend/ignore_plurals.rb +1 -1
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +46 -44
- data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
- data/lib/algolia/models/recommend/optional_filters.rb +1 -1
- data/lib/algolia/models/recommend/params.rb +1 -1
- data/lib/algolia/models/recommend/promote_object_id.rb +2 -2
- data/lib/algolia/models/recommend/promote_object_ids.rb +16 -2
- data/lib/algolia/models/recommend/ranking_info.rb +120 -7
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/recommend/recommend_hit.rb +3 -3
- data/lib/algolia/models/recommend/recommendations_hits.rb +1 -1
- data/lib/algolia/models/recommend/recommendations_query.rb +2 -2
- data/lib/algolia/models/recommend/recommendations_results.rb +21 -7
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +1 -1
- data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +102 -80
- data/lib/algolia/models/recommend/remove_stop_words.rb +1 -1
- data/lib/algolia/models/recommend/rendering_content.rb +1 -1
- data/lib/algolia/models/recommend/search_params_object.rb +102 -80
- data/lib/algolia/models/recommend/search_params_query.rb +1 -1
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -2
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +17 -3
- data/lib/algolia/models/recommend/semantic_search.rb +2 -2
- data/lib/algolia/models/recommend/snippet_result_option.rb +2 -2
- data/lib/algolia/models/recommend/tag_filters.rb +1 -1
- data/lib/algolia/models/recommend/trending_facets_query.rb +1 -1
- data/lib/algolia/models/recommend/trending_items_query.rb +1 -1
- data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
- data/lib/algolia/models/recommend/value.rb +1 -1
- data/lib/algolia/models/search/add_api_key_response.rb +1 -1
- data/lib/algolia/models/search/api_key.rb +8 -8
- data/lib/algolia/models/search/around_precision.rb +1 -1
- data/lib/algolia/models/search/around_precision_from_value_inner.rb +3 -0
- data/lib/algolia/models/search/around_radius.rb +1 -1
- data/lib/algolia/models/search/automatic_facet_filter.rb +4 -4
- data/lib/algolia/models/search/automatic_facet_filters.rb +1 -1
- data/lib/algolia/models/search/base_index_settings.rb +44 -18
- data/lib/algolia/models/search/base_search_params.rb +58 -38
- data/lib/algolia/models/search/base_search_params_without_query.rb +57 -37
- data/lib/algolia/models/search/base_search_response.rb +20 -6
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +3 -3
- data/lib/algolia/models/search/batch_response.rb +2 -2
- data/lib/algolia/models/search/browse_params_object.rb +103 -81
- data/lib/algolia/models/search/browse_response.rb +23 -8
- data/lib/algolia/models/search/built_in_operation.rb +2 -2
- data/lib/algolia/models/search/condition.rb +32 -7
- data/lib/algolia/models/search/consequence.rb +33 -5
- data/lib/algolia/models/search/consequence_hide.rb +2 -2
- data/lib/algolia/models/search/consequence_params.rb +101 -79
- data/lib/algolia/models/search/consequence_query.rb +1 -1
- data/lib/algolia/models/search/consequence_query_object.rb +2 -2
- data/lib/algolia/models/search/created_at_response.rb +1 -1
- data/lib/algolia/models/search/cursor.rb +1 -1
- data/lib/algolia/models/search/delete_by_params.rb +4 -4
- data/lib/algolia/models/search/deleted_at_response.rb +1 -1
- data/lib/algolia/models/search/dictionary_entry.rb +5 -5
- data/lib/algolia/models/search/dictionary_language.rb +2 -2
- data/lib/algolia/models/search/dictionary_settings_params.rb +1 -1
- data/lib/algolia/models/search/distinct.rb +1 -1
- data/lib/algolia/models/search/edit.rb +1 -1
- data/lib/algolia/models/search/facet_filters.rb +1 -1
- data/lib/algolia/models/search/facet_hits.rb +2 -2
- data/lib/algolia/models/search/facet_ordering.rb +2 -2
- data/lib/algolia/models/search/facets.rb +2 -2
- data/lib/algolia/models/search/get_api_key_response.rb +8 -8
- data/lib/algolia/models/search/get_objects_request.rb +3 -3
- data/lib/algolia/models/search/get_objects_response.rb +1 -1
- data/lib/algolia/models/search/has_pending_mappings_response.rb +1 -1
- data/lib/algolia/models/search/highlight_result_option.rb +3 -3
- data/lib/algolia/models/search/hit.rb +4 -4
- data/lib/algolia/models/search/ignore_plurals.rb +1 -1
- data/lib/algolia/models/search/index_settings.rb +89 -61
- data/lib/algolia/models/search/index_settings_as_search_params.rb +46 -44
- data/lib/algolia/models/search/log.rb +39 -11
- data/lib/algolia/models/search/log_query.rb +1 -1
- data/lib/algolia/models/search/multiple_batch_response.rb +2 -2
- data/lib/algolia/models/search/numeric_filters.rb +1 -1
- data/lib/algolia/models/search/operation_index_params.rb +2 -2
- data/lib/algolia/models/search/optional_filters.rb +1 -1
- data/lib/algolia/models/search/params.rb +1 -1
- data/lib/algolia/models/search/promote_object_id.rb +2 -2
- data/lib/algolia/models/search/promote_object_ids.rb +16 -2
- data/lib/algolia/models/search/ranking_info.rb +120 -7
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
- data/lib/algolia/models/search/remove_stop_words.rb +1 -1
- data/lib/algolia/models/search/rendering_content.rb +1 -1
- data/lib/algolia/models/search/rule.rb +23 -5
- data/lib/algolia/models/search/save_object_response.rb +3 -3
- data/lib/algolia/models/search/save_synonym_response.rb +1 -1
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +18 -4
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +251 -0
- data/lib/algolia/models/search/search_for_facet_values_request.rb +1 -1
- data/lib/algolia/models/search/search_for_facet_values_response.rb +1 -0
- data/lib/algolia/models/search/search_for_facets.rb +103 -81
- data/lib/algolia/models/search/search_for_facets_options.rb +2 -2
- data/lib/algolia/models/search/search_for_hits.rb +103 -81
- data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
- data/lib/algolia/models/search/search_hits.rb +2 -1
- data/lib/algolia/models/search/search_params_object.rb +102 -80
- data/lib/algolia/models/search/search_params_query.rb +1 -1
- data/lib/algolia/models/search/search_response.rb +22 -7
- data/lib/algolia/models/search/search_rules_params.rb +8 -20
- data/lib/algolia/models/search/search_rules_response.rb +2 -2
- data/lib/algolia/models/search/search_synonyms_params.rb +16 -2
- data/lib/algolia/models/search/search_synonyms_response.rb +2 -2
- data/lib/algolia/models/search/search_user_ids_params.rb +15 -1
- data/lib/algolia/models/search/search_user_ids_response.rb +16 -2
- data/lib/algolia/models/search/secured_api_key_restrictions.rb +5 -5
- data/lib/algolia/models/search/semantic_search.rb +2 -2
- data/lib/algolia/models/search/snippet_result_option.rb +2 -2
- data/lib/algolia/models/search/tag_filters.rb +1 -1
- data/lib/algolia/models/search/time_range.rb +2 -2
- data/lib/algolia/models/search/typo_tolerance.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 +2 -2
- data/lib/algolia/models/search/updated_rule_response.rb +2 -2
- data/lib/algolia/models/search/user_hit.rb +1 -1
- data/lib/algolia/models/search/user_id.rb +1 -1
- data/lib/algolia/models/search/value.rb +1 -1
- data/lib/algolia/version.rb +1 -1
- metadata +7 -2
@@ -7,28 +7,28 @@ module Algolia
|
|
7
7
|
module Search
|
8
8
|
# API key object.
|
9
9
|
class ApiKey
|
10
|
-
# [
|
10
|
+
# Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
|
11
11
|
attr_accessor :acl
|
12
12
|
|
13
|
-
# Description of an API key
|
13
|
+
# Description of an API key to help you identify this API key.
|
14
14
|
attr_accessor :description
|
15
15
|
|
16
|
-
#
|
16
|
+
# Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
|
17
17
|
attr_accessor :indexes
|
18
18
|
|
19
|
-
# Maximum number of
|
19
|
+
# Maximum number of results this API key can retrieve in one query. By default, there's no limit.
|
20
20
|
attr_accessor :max_hits_per_query
|
21
21
|
|
22
|
-
# Maximum number of API
|
22
|
+
# Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit.
|
23
23
|
attr_accessor :max_queries_per_ip_per_hour
|
24
24
|
|
25
|
-
#
|
25
|
+
# Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that's outside the restricted range.
|
26
26
|
attr_accessor :query_parameters
|
27
27
|
|
28
|
-
#
|
28
|
+
# Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
|
29
29
|
attr_accessor :referers
|
30
30
|
|
31
|
-
#
|
31
|
+
# Duration (in seconds) after which the API key expires. By default, API keys don't expire.
|
32
32
|
attr_accessor :validity
|
33
33
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
# Precision of a
|
8
|
+
# Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
|
9
9
|
module AroundPrecision
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -5,9 +5,12 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
+
# Range object with lower and upper values in meters to define custom ranges.
|
8
9
|
class AroundPrecisionFromValueInner
|
10
|
+
# Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
9
11
|
attr_accessor :from
|
10
12
|
|
13
|
+
# Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
11
14
|
attr_accessor :value
|
12
15
|
|
13
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
|
9
9
|
module AroundRadius
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -5,15 +5,15 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Filter or optional filter to be applied to the search.
|
9
9
|
class AutomaticFacetFilter
|
10
|
-
#
|
10
|
+
# Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
|
11
11
|
attr_accessor :facet
|
12
12
|
|
13
|
-
#
|
13
|
+
# Filter scores to give different weights to individual filters.
|
14
14
|
attr_accessor :score
|
15
15
|
|
16
|
-
# Whether the filter is disjunctive
|
16
|
+
# Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
|
17
17
|
attr_accessor :disjunctive
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies.
|
9
9
|
module AutomaticFacetFilters
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -6,57 +6,61 @@ require 'time'
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
8
|
class BaseIndexSettings
|
9
|
-
#
|
9
|
+
# Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers** <dl> <dt><code>filterOnly(\"ATTRIBUTE\")</code></dt> <dd>Allows using this attribute as a filter, but doesn't evalue the facet values.</dd> <dt><code>searchable(\"ATTRIBUTE\")</code></dt> <dd>Allows searching for facet values.</dd> <dt><code>afterDistinct(\"ATTRIBUTE\")</code></dt> <dd> Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. </dd> </dl> Without modifiers, the attribute is used as a regular facet.
|
10
|
+
attr_accessor :attributes_for_faceting
|
11
|
+
|
12
|
+
# Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** <dl> <dt><code>virtual(\"REPLICA\")</code></dt> <dd> Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/). </dd> </dl> Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-sort/).
|
10
13
|
attr_accessor :replicas
|
11
14
|
|
12
|
-
# Maximum number of
|
15
|
+
# Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.
|
13
16
|
attr_accessor :pagination_limited_to
|
14
17
|
|
15
|
-
# Attributes that can't be retrieved at query time.
|
18
|
+
# Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results.
|
16
19
|
attr_accessor :unretrievable_attributes
|
17
20
|
|
18
|
-
# Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
21
|
+
# Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
|
19
22
|
attr_accessor :disable_typo_tolerance_on_words
|
20
23
|
|
21
|
-
# Attributes
|
24
|
+
# Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese.
|
22
25
|
attr_accessor :attributes_to_transliterate
|
23
26
|
|
24
|
-
# Attributes
|
27
|
+
# Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
|
25
28
|
attr_accessor :camel_case_attributes
|
26
29
|
|
27
|
-
#
|
30
|
+
# Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`).
|
28
31
|
attr_accessor :decompounded_attributes
|
29
32
|
|
30
|
-
#
|
33
|
+
# [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for a language for language-specific processing steps, such as word detection and dictionary settings. **You should 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/).
|
31
34
|
attr_accessor :index_languages
|
32
35
|
|
33
|
-
#
|
36
|
+
# 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/#adjusting-prefix-search).
|
34
37
|
attr_accessor :disable_prefix_on_attributes
|
35
38
|
|
36
|
-
#
|
39
|
+
# Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
37
40
|
attr_accessor :allow_compression_of_integer_array
|
38
41
|
|
39
|
-
# Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters).
|
42
|
+
# Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** <dl> <dt><code>equalOnly(\"ATTRIBUTE\")</code></dt> <dd> Support only filtering based on equality comparisons `=` and `!=`. </dd> </dl> Without modifier, all numeric comparisons are supported.
|
40
43
|
attr_accessor :numeric_attributes_for_filtering
|
41
44
|
|
42
|
-
# Controls which separators are
|
45
|
+
# Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
|
43
46
|
attr_accessor :separators_to_index
|
44
47
|
|
45
|
-
#
|
48
|
+
# Attributes used for searching. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** <dl> <dt><code>unordered(\"ATTRIBUTE\")</code></dt> <dd> Ignore the position of a match within the attribute. </dd> </dl> Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
|
46
49
|
attr_accessor :searchable_attributes
|
47
50
|
|
48
|
-
#
|
51
|
+
# An object with custom data. You can store up to 32 kB as custom data.
|
49
52
|
attr_accessor :user_data
|
50
53
|
|
51
|
-
#
|
54
|
+
# Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
|
52
55
|
attr_accessor :custom_normalization
|
53
56
|
|
54
|
-
#
|
57
|
+
# Attribute that should be used to establish groups of results. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
|
55
58
|
attr_accessor :attribute_for_distinct
|
56
59
|
|
57
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
58
61
|
def self.attribute_map
|
59
62
|
{
|
63
|
+
:attributes_for_faceting => :attributesForFaceting,
|
60
64
|
:replicas => :replicas,
|
61
65
|
:pagination_limited_to => :paginationLimitedTo,
|
62
66
|
:unretrievable_attributes => :unretrievableAttributes,
|
@@ -84,6 +88,7 @@ module Algolia
|
|
84
88
|
# Attribute type mapping.
|
85
89
|
def self.types_mapping
|
86
90
|
{
|
91
|
+
:attributes_for_faceting => :'Array<String>',
|
87
92
|
:replicas => :'Array<String>',
|
88
93
|
:pagination_limited_to => :Integer,
|
89
94
|
:unretrievable_attributes => :'Array<String>',
|
@@ -127,6 +132,12 @@ module Algolia
|
|
127
132
|
h[k.to_sym] = v
|
128
133
|
end
|
129
134
|
|
135
|
+
if attributes.key?(:attributes_for_faceting)
|
136
|
+
if (value = attributes[:attributes_for_faceting]).is_a?(Array)
|
137
|
+
self.attributes_for_faceting = value
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
130
141
|
if attributes.key?(:replicas)
|
131
142
|
if (value = attributes[:replicas]).is_a?(Array)
|
132
143
|
self.replicas = value
|
@@ -212,12 +223,27 @@ module Algolia
|
|
212
223
|
end
|
213
224
|
end
|
214
225
|
|
226
|
+
# Custom attribute writer method with validation
|
227
|
+
# @param [Object] pagination_limited_to Value to be assigned
|
228
|
+
def pagination_limited_to=(pagination_limited_to)
|
229
|
+
if pagination_limited_to.nil?
|
230
|
+
raise ArgumentError, 'pagination_limited_to cannot be nil'
|
231
|
+
end
|
232
|
+
|
233
|
+
if pagination_limited_to > 20_000
|
234
|
+
raise ArgumentError, 'invalid value for "pagination_limited_to", must be smaller than or equal to 20000.'
|
235
|
+
end
|
236
|
+
|
237
|
+
@pagination_limited_to = pagination_limited_to
|
238
|
+
end
|
239
|
+
|
215
240
|
# Checks equality by comparing each attribute.
|
216
241
|
# @param [Object] Object to be compared
|
217
242
|
def ==(other)
|
218
243
|
return true if equal?(other)
|
219
244
|
|
220
245
|
self.class == other.class &&
|
246
|
+
attributes_for_faceting == other.attributes_for_faceting &&
|
221
247
|
replicas == other.replicas &&
|
222
248
|
pagination_limited_to == other.pagination_limited_to &&
|
223
249
|
unretrievable_attributes == other.unretrievable_attributes &&
|
@@ -245,8 +271,8 @@ module Algolia
|
|
245
271
|
# Calculates hash code according to all attributes.
|
246
272
|
# @return [Integer] Hash code
|
247
273
|
def hash
|
248
|
-
[replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes,
|
249
|
-
index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct].hash
|
274
|
+
[attributes_for_faceting, replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes,
|
275
|
+
decompounded_attributes, index_languages, disable_prefix_on_attributes, allow_compression_of_integer_array, numeric_attributes_for_filtering, separators_to_index, searchable_attributes, user_data, custom_normalization, attribute_for_distinct].hash
|
250
276
|
end
|
251
277
|
|
252
278
|
# Builds the object from hash
|
@@ -6,13 +6,13 @@ require 'time'
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
8
|
class BaseSearchParams
|
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
|
-
# [
|
15
|
+
# Filter the search so that only records with matching values are included in the results. These filters are supported: - **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
|
@@ -23,80 +23,77 @@ module Algolia
|
|
23
23
|
|
24
24
|
attr_accessor :tag_filters
|
25
25
|
|
26
|
-
#
|
26
|
+
# 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/#accumulating-scores-with-sumorfiltersscores).
|
27
27
|
attr_accessor :sum_or_filters_scores
|
28
28
|
|
29
|
-
# Restricts a
|
29
|
+
# Restricts a search to a subset of your searchable attributes.
|
30
30
|
attr_accessor :restrict_searchable_attributes
|
31
31
|
|
32
|
-
#
|
32
|
+
# 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).
|
33
33
|
attr_accessor :facets
|
34
34
|
|
35
|
-
#
|
35
|
+
# 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`.
|
36
36
|
attr_accessor :faceting_after_distinct
|
37
37
|
|
38
|
-
# Page
|
38
|
+
# Page of search results to retrieve.
|
39
39
|
attr_accessor :page
|
40
40
|
|
41
|
-
#
|
41
|
+
# Position of the first hit to retrieve.
|
42
42
|
attr_accessor :offset
|
43
43
|
|
44
|
-
#
|
44
|
+
# Number of hits to retrieve (used in combination with `offset`).
|
45
45
|
attr_accessor :length
|
46
46
|
|
47
|
-
#
|
47
|
+
# Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
48
48
|
attr_accessor :around_lat_lng
|
49
49
|
|
50
|
-
#
|
50
|
+
# Whether to obtain the coordinates from the request's IP address.
|
51
51
|
attr_accessor :around_lat_lng_via_ip
|
52
52
|
|
53
53
|
attr_accessor :around_radius
|
54
54
|
|
55
55
|
attr_accessor :around_precision
|
56
56
|
|
57
|
-
# Minimum radius (in meters)
|
57
|
+
# Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
|
58
58
|
attr_accessor :minimum_around_radius
|
59
59
|
|
60
|
-
#
|
60
|
+
# Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
|
61
61
|
attr_accessor :inside_bounding_box
|
62
62
|
|
63
|
-
#
|
63
|
+
# 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`.
|
64
64
|
attr_accessor :inside_polygon
|
65
65
|
|
66
|
-
#
|
66
|
+
# 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`.
|
67
67
|
attr_accessor :natural_languages
|
68
68
|
|
69
|
-
# Assigns
|
69
|
+
# 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/#whats-a-context) are strings that you can use to trigger matching rules.
|
70
70
|
attr_accessor :rule_contexts
|
71
71
|
|
72
|
-
#
|
72
|
+
# 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).
|
73
73
|
attr_accessor :personalization_impact
|
74
74
|
|
75
|
-
#
|
75
|
+
# 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/).
|
76
76
|
attr_accessor :user_token
|
77
77
|
|
78
|
-
#
|
78
|
+
# Whether the search response should include detailed ranking information.
|
79
79
|
attr_accessor :get_ranking_info
|
80
80
|
|
81
|
-
#
|
82
|
-
attr_accessor :explain
|
83
|
-
|
84
|
-
# Whether to take into account an index's synonyms for a particular search.
|
81
|
+
# Whether to take into account an index's synonyms for this search.
|
85
82
|
attr_accessor :synonyms
|
86
83
|
|
87
|
-
#
|
84
|
+
# 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/guides/sending-events/getting-started/).
|
88
85
|
attr_accessor :click_analytics
|
89
86
|
|
90
|
-
#
|
87
|
+
# Whether this search will be included in Analytics.
|
91
88
|
attr_accessor :analytics
|
92
89
|
|
93
90
|
# Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
94
91
|
attr_accessor :analytics_tags
|
95
92
|
|
96
|
-
# Whether to include
|
93
|
+
# Whether to include this search when calculating processing-time percentiles.
|
97
94
|
attr_accessor :percentile_computation
|
98
95
|
|
99
|
-
#
|
96
|
+
# Whether to enable A/B testing for this search.
|
100
97
|
attr_accessor :enable_ab_test
|
101
98
|
|
102
99
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -128,7 +125,6 @@ module Algolia
|
|
128
125
|
:personalization_impact => :personalizationImpact,
|
129
126
|
:user_token => :userToken,
|
130
127
|
:get_ranking_info => :getRankingInfo,
|
131
|
-
:explain => :explain,
|
132
128
|
:synonyms => :synonyms,
|
133
129
|
:click_analytics => :clickAnalytics,
|
134
130
|
:analytics => :analytics,
|
@@ -172,7 +168,6 @@ module Algolia
|
|
172
168
|
:personalization_impact => :Integer,
|
173
169
|
:user_token => :String,
|
174
170
|
:get_ranking_info => :Boolean,
|
175
|
-
:explain => :'Array<String>',
|
176
171
|
:synonyms => :Boolean,
|
177
172
|
:click_analytics => :Boolean,
|
178
173
|
:analytics => :Boolean,
|
@@ -328,12 +323,6 @@ module Algolia
|
|
328
323
|
self.get_ranking_info = attributes[:get_ranking_info]
|
329
324
|
end
|
330
325
|
|
331
|
-
if attributes.key?(:explain)
|
332
|
-
if (value = attributes[:explain]).is_a?(Array)
|
333
|
-
self.explain = value
|
334
|
-
end
|
335
|
-
end
|
336
|
-
|
337
326
|
if attributes.key?(:synonyms)
|
338
327
|
self.synonyms = attributes[:synonyms]
|
339
328
|
end
|
@@ -361,6 +350,20 @@ module Algolia
|
|
361
350
|
end
|
362
351
|
end
|
363
352
|
|
353
|
+
# Custom attribute writer method with validation
|
354
|
+
# @param [Object] page Value to be assigned
|
355
|
+
def page=(page)
|
356
|
+
if page.nil?
|
357
|
+
raise ArgumentError, 'page cannot be nil'
|
358
|
+
end
|
359
|
+
|
360
|
+
if page < 0
|
361
|
+
raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.'
|
362
|
+
end
|
363
|
+
|
364
|
+
@page = page
|
365
|
+
end
|
366
|
+
|
364
367
|
# Custom attribute writer method with validation
|
365
368
|
# @param [Object] length Value to be assigned
|
366
369
|
def length=(length)
|
@@ -393,6 +396,24 @@ module Algolia
|
|
393
396
|
@minimum_around_radius = minimum_around_radius
|
394
397
|
end
|
395
398
|
|
399
|
+
# Custom attribute writer method with validation
|
400
|
+
# @param [Object] personalization_impact Value to be assigned
|
401
|
+
def personalization_impact=(personalization_impact)
|
402
|
+
if personalization_impact.nil?
|
403
|
+
raise ArgumentError, 'personalization_impact cannot be nil'
|
404
|
+
end
|
405
|
+
|
406
|
+
if personalization_impact > 100
|
407
|
+
raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.'
|
408
|
+
end
|
409
|
+
|
410
|
+
if personalization_impact < 0
|
411
|
+
raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.'
|
412
|
+
end
|
413
|
+
|
414
|
+
@personalization_impact = personalization_impact
|
415
|
+
end
|
416
|
+
|
396
417
|
# Checks equality by comparing each attribute.
|
397
418
|
# @param [Object] Object to be compared
|
398
419
|
def ==(other)
|
@@ -425,7 +446,6 @@ module Algolia
|
|
425
446
|
personalization_impact == other.personalization_impact &&
|
426
447
|
user_token == other.user_token &&
|
427
448
|
get_ranking_info == other.get_ranking_info &&
|
428
|
-
explain == other.explain &&
|
429
449
|
synonyms == other.synonyms &&
|
430
450
|
click_analytics == other.click_analytics &&
|
431
451
|
analytics == other.analytics &&
|
@@ -444,7 +464,7 @@ module Algolia
|
|
444
464
|
# @return [Integer] Hash code
|
445
465
|
def hash
|
446
466
|
[query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets,
|
447
|
-
faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info,
|
467
|
+
faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test].hash
|
448
468
|
end
|
449
469
|
|
450
470
|
# Builds the object from hash
|