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
@@ -5,123 +5,123 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Index settings.
|
9
9
|
class IndexSettings
|
10
|
-
#
|
10
|
+
# 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.
|
11
|
+
attr_accessor :attributes_for_faceting
|
12
|
+
|
13
|
+
# 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/).
|
11
14
|
attr_accessor :replicas
|
12
15
|
|
13
|
-
# Maximum number of
|
16
|
+
# 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.
|
14
17
|
attr_accessor :pagination_limited_to
|
15
18
|
|
16
|
-
# Attributes that can't be retrieved at query time.
|
19
|
+
# 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.
|
17
20
|
attr_accessor :unretrievable_attributes
|
18
21
|
|
19
|
-
# Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
22
|
+
# 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.
|
20
23
|
attr_accessor :disable_typo_tolerance_on_words
|
21
24
|
|
22
|
-
# Attributes
|
25
|
+
# 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.
|
23
26
|
attr_accessor :attributes_to_transliterate
|
24
27
|
|
25
|
-
# Attributes
|
28
|
+
# Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words.
|
26
29
|
attr_accessor :camel_case_attributes
|
27
30
|
|
28
|
-
#
|
31
|
+
# 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`).
|
29
32
|
attr_accessor :decompounded_attributes
|
30
33
|
|
31
|
-
#
|
34
|
+
# [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/).
|
32
35
|
attr_accessor :index_languages
|
33
36
|
|
34
|
-
#
|
37
|
+
# 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).
|
35
38
|
attr_accessor :disable_prefix_on_attributes
|
36
39
|
|
37
|
-
#
|
40
|
+
# Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
38
41
|
attr_accessor :allow_compression_of_integer_array
|
39
42
|
|
40
|
-
# 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).
|
43
|
+
# 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.
|
41
44
|
attr_accessor :numeric_attributes_for_filtering
|
42
45
|
|
43
|
-
# Controls which separators are
|
46
|
+
# 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.
|
44
47
|
attr_accessor :separators_to_index
|
45
48
|
|
46
|
-
#
|
49
|
+
# 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.
|
47
50
|
attr_accessor :searchable_attributes
|
48
51
|
|
49
|
-
#
|
52
|
+
# An object with custom data. You can store up to 32 kB as custom data.
|
50
53
|
attr_accessor :user_data
|
51
54
|
|
52
|
-
#
|
55
|
+
# 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/).
|
53
56
|
attr_accessor :custom_normalization
|
54
57
|
|
55
|
-
#
|
58
|
+
# 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.
|
56
59
|
attr_accessor :attribute_for_distinct
|
57
60
|
|
58
|
-
# Attributes
|
59
|
-
attr_accessor :attributes_for_faceting
|
60
|
-
|
61
|
-
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
|
61
|
+
# 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.
|
62
62
|
attr_accessor :attributes_to_retrieve
|
63
63
|
|
64
|
-
# Determines the order in which Algolia
|
64
|
+
# 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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/).
|
65
65
|
attr_accessor :ranking
|
66
66
|
|
67
|
-
#
|
67
|
+
# 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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.
|
68
68
|
attr_accessor :custom_ranking
|
69
69
|
|
70
|
-
# Relevancy threshold below which less relevant results aren't included in the results.
|
70
|
+
# 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.
|
71
71
|
attr_accessor :relevancy_strictness
|
72
72
|
|
73
|
-
# Attributes to highlight.
|
73
|
+
# Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. 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/).
|
74
74
|
attr_accessor :attributes_to_highlight
|
75
75
|
|
76
|
-
# Attributes to
|
76
|
+
# Attributes for which to enable snippets. 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.
|
77
77
|
attr_accessor :attributes_to_snippet
|
78
78
|
|
79
|
-
# HTML
|
79
|
+
# HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
80
80
|
attr_accessor :highlight_pre_tag
|
81
81
|
|
82
|
-
# HTML
|
82
|
+
# HTML tag to insert after the highlighted parts in all highlighted results and snippets.
|
83
83
|
attr_accessor :highlight_post_tag
|
84
84
|
|
85
85
|
# String used as an ellipsis indicator when a snippet is truncated.
|
86
86
|
attr_accessor :snippet_ellipsis_text
|
87
87
|
|
88
|
-
#
|
88
|
+
# Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
|
89
89
|
attr_accessor :restrict_highlight_and_snippet_arrays
|
90
90
|
|
91
91
|
# Number of hits per page.
|
92
92
|
attr_accessor :hits_per_page
|
93
93
|
|
94
|
-
# Minimum number of characters a word in the query
|
94
|
+
# 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/#configuring-word-length-for-typos).
|
95
95
|
attr_accessor :min_word_sizefor1_typo
|
96
96
|
|
97
|
-
# Minimum number of characters a word in the query
|
97
|
+
# 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/#configuring-word-length-for-typos).
|
98
98
|
attr_accessor :min_word_sizefor2_typos
|
99
99
|
|
100
100
|
attr_accessor :typo_tolerance
|
101
101
|
|
102
|
-
# Whether to allow typos on numbers
|
102
|
+
# 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.
|
103
103
|
attr_accessor :allow_typos_on_numeric_tokens
|
104
104
|
|
105
|
-
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
105
|
+
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). 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.
|
106
106
|
attr_accessor :disable_typo_tolerance_on_attributes
|
107
107
|
|
108
108
|
attr_accessor :ignore_plurals
|
109
109
|
|
110
110
|
attr_accessor :remove_stop_words
|
111
111
|
|
112
|
-
# Characters
|
112
|
+
# Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
|
113
113
|
attr_accessor :keep_diacritics_on_characters
|
114
114
|
|
115
|
-
#
|
115
|
+
# [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
|
116
116
|
attr_accessor :query_languages
|
117
117
|
|
118
|
-
#
|
118
|
+
# Whether to split compound words 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/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
|
119
119
|
attr_accessor :decompound_query
|
120
120
|
|
121
|
-
#
|
121
|
+
# Whether to enable rules.
|
122
122
|
attr_accessor :enable_rules
|
123
123
|
|
124
|
-
#
|
124
|
+
# Whether to enable Personalization.
|
125
125
|
attr_accessor :enable_personalization
|
126
126
|
|
127
127
|
attr_accessor :query_type
|
@@ -132,49 +132,49 @@ module Algolia
|
|
132
132
|
|
133
133
|
attr_accessor :semantic_search
|
134
134
|
|
135
|
-
#
|
135
|
+
# Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
136
136
|
attr_accessor :advanced_syntax
|
137
137
|
|
138
|
-
# Words
|
138
|
+
# Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
|
139
139
|
attr_accessor :optional_words
|
140
140
|
|
141
|
-
#
|
141
|
+
# Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
|
142
142
|
attr_accessor :disable_exact_on_attributes
|
143
143
|
|
144
144
|
attr_accessor :exact_on_single_word_query
|
145
145
|
|
146
|
-
# Alternatives that should be considered
|
146
|
+
# Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
|
147
147
|
attr_accessor :alternatives_as_exact
|
148
148
|
|
149
|
-
#
|
149
|
+
# Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
|
150
150
|
attr_accessor :advanced_syntax_features
|
151
151
|
|
152
152
|
attr_accessor :distinct
|
153
153
|
|
154
|
-
# Whether to
|
154
|
+
# Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
|
155
155
|
attr_accessor :replace_synonyms_in_highlight
|
156
156
|
|
157
|
-
#
|
157
|
+
# 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.
|
158
158
|
attr_accessor :min_proximity
|
159
159
|
|
160
|
-
#
|
160
|
+
# 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 attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI.
|
161
161
|
attr_accessor :response_fields
|
162
162
|
|
163
|
-
# Maximum number of facet
|
163
|
+
# Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
164
164
|
attr_accessor :max_facet_hits
|
165
165
|
|
166
166
|
# Maximum number of facet values to return for each facet.
|
167
167
|
attr_accessor :max_values_per_facet
|
168
168
|
|
169
|
-
#
|
169
|
+
# Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> 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/).
|
170
170
|
attr_accessor :sort_facet_values_by
|
171
171
|
|
172
|
-
#
|
172
|
+
# 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.
|
173
173
|
attr_accessor :attribute_criteria_computed_by_min_proximity
|
174
174
|
|
175
175
|
attr_accessor :rendering_content
|
176
176
|
|
177
|
-
#
|
177
|
+
# 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.
|
178
178
|
attr_accessor :enable_re_ranking
|
179
179
|
|
180
180
|
attr_accessor :re_ranking_apply_filter
|
@@ -204,6 +204,7 @@ module Algolia
|
|
204
204
|
# Attribute mapping from ruby-style variable name to JSON key.
|
205
205
|
def self.attribute_map
|
206
206
|
{
|
207
|
+
:attributes_for_faceting => :attributesForFaceting,
|
207
208
|
:replicas => :replicas,
|
208
209
|
:pagination_limited_to => :paginationLimitedTo,
|
209
210
|
:unretrievable_attributes => :unretrievableAttributes,
|
@@ -220,7 +221,6 @@ module Algolia
|
|
220
221
|
:user_data => :userData,
|
221
222
|
:custom_normalization => :customNormalization,
|
222
223
|
:attribute_for_distinct => :attributeForDistinct,
|
223
|
-
:attributes_for_faceting => :attributesForFaceting,
|
224
224
|
:attributes_to_retrieve => :attributesToRetrieve,
|
225
225
|
:ranking => :ranking,
|
226
226
|
:custom_ranking => :customRanking,
|
@@ -276,6 +276,7 @@ module Algolia
|
|
276
276
|
# Attribute type mapping.
|
277
277
|
def self.types_mapping
|
278
278
|
{
|
279
|
+
:attributes_for_faceting => :'Array<String>',
|
279
280
|
:replicas => :'Array<String>',
|
280
281
|
:pagination_limited_to => :Integer,
|
281
282
|
:unretrievable_attributes => :'Array<String>',
|
@@ -292,7 +293,6 @@ module Algolia
|
|
292
293
|
:user_data => :Object,
|
293
294
|
:custom_normalization => :'Hash<String, Hash<String, String>>',
|
294
295
|
:attribute_for_distinct => :String,
|
295
|
-
:attributes_for_faceting => :'Array<String>',
|
296
296
|
:attributes_to_retrieve => :'Array<String>',
|
297
297
|
:ranking => :'Array<String>',
|
298
298
|
:custom_ranking => :'Array<String>',
|
@@ -372,6 +372,12 @@ module Algolia
|
|
372
372
|
h[k.to_sym] = v
|
373
373
|
end
|
374
374
|
|
375
|
+
if attributes.key?(:attributes_for_faceting)
|
376
|
+
if (value = attributes[:attributes_for_faceting]).is_a?(Array)
|
377
|
+
self.attributes_for_faceting = value
|
378
|
+
end
|
379
|
+
end
|
380
|
+
|
375
381
|
if attributes.key?(:replicas)
|
376
382
|
if (value = attributes[:replicas]).is_a?(Array)
|
377
383
|
self.replicas = value
|
@@ -456,12 +462,6 @@ module Algolia
|
|
456
462
|
self.attribute_for_distinct = attributes[:attribute_for_distinct]
|
457
463
|
end
|
458
464
|
|
459
|
-
if attributes.key?(:attributes_for_faceting)
|
460
|
-
if (value = attributes[:attributes_for_faceting]).is_a?(Array)
|
461
|
-
self.attributes_for_faceting = value
|
462
|
-
end
|
463
|
-
end
|
464
|
-
|
465
465
|
if attributes.key?(:attributes_to_retrieve)
|
466
466
|
if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
|
467
467
|
self.attributes_to_retrieve = value
|
@@ -663,6 +663,20 @@ module Algolia
|
|
663
663
|
end
|
664
664
|
end
|
665
665
|
|
666
|
+
# Custom attribute writer method with validation
|
667
|
+
# @param [Object] pagination_limited_to Value to be assigned
|
668
|
+
def pagination_limited_to=(pagination_limited_to)
|
669
|
+
if pagination_limited_to.nil?
|
670
|
+
raise ArgumentError, 'pagination_limited_to cannot be nil'
|
671
|
+
end
|
672
|
+
|
673
|
+
if pagination_limited_to > 20_000
|
674
|
+
raise ArgumentError, 'invalid value for "pagination_limited_to", must be smaller than or equal to 20000.'
|
675
|
+
end
|
676
|
+
|
677
|
+
@pagination_limited_to = pagination_limited_to
|
678
|
+
end
|
679
|
+
|
666
680
|
# Custom attribute writer method with validation
|
667
681
|
# @param [Object] hits_per_page Value to be assigned
|
668
682
|
def hits_per_page=(hits_per_page)
|
@@ -713,12 +727,27 @@ module Algolia
|
|
713
727
|
@max_facet_hits = max_facet_hits
|
714
728
|
end
|
715
729
|
|
730
|
+
# Custom attribute writer method with validation
|
731
|
+
# @param [Object] max_values_per_facet Value to be assigned
|
732
|
+
def max_values_per_facet=(max_values_per_facet)
|
733
|
+
if max_values_per_facet.nil?
|
734
|
+
raise ArgumentError, 'max_values_per_facet cannot be nil'
|
735
|
+
end
|
736
|
+
|
737
|
+
if max_values_per_facet > 1000
|
738
|
+
raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.'
|
739
|
+
end
|
740
|
+
|
741
|
+
@max_values_per_facet = max_values_per_facet
|
742
|
+
end
|
743
|
+
|
716
744
|
# Checks equality by comparing each attribute.
|
717
745
|
# @param [Object] Object to be compared
|
718
746
|
def ==(other)
|
719
747
|
return true if equal?(other)
|
720
748
|
|
721
749
|
self.class == other.class &&
|
750
|
+
attributes_for_faceting == other.attributes_for_faceting &&
|
722
751
|
replicas == other.replicas &&
|
723
752
|
pagination_limited_to == other.pagination_limited_to &&
|
724
753
|
unretrievable_attributes == other.unretrievable_attributes &&
|
@@ -735,7 +764,6 @@ module Algolia
|
|
735
764
|
user_data == other.user_data &&
|
736
765
|
custom_normalization == other.custom_normalization &&
|
737
766
|
attribute_for_distinct == other.attribute_for_distinct &&
|
738
|
-
attributes_for_faceting == other.attributes_for_faceting &&
|
739
767
|
attributes_to_retrieve == other.attributes_to_retrieve &&
|
740
768
|
ranking == other.ranking &&
|
741
769
|
custom_ranking == other.custom_ranking &&
|
@@ -791,8 +819,8 @@ module Algolia
|
|
791
819
|
# Calculates hash code according to all attributes.
|
792
820
|
# @return [Integer] Hash code
|
793
821
|
def hash
|
794
|
-
[replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes,
|
795
|
-
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,
|
822
|
+
[attributes_for_faceting, replicas, pagination_limited_to, unretrievable_attributes, disable_typo_tolerance_on_words, attributes_to_transliterate, camel_case_attributes,
|
823
|
+
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, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash
|
796
824
|
end
|
797
825
|
|
798
826
|
# Builds the object from hash
|