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
@@ -6,73 +6,70 @@ require 'time'
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
8
|
class IndexSettingsAsSearchParams
|
9
|
-
# Attributes
|
10
|
-
attr_accessor :attributes_for_faceting
|
11
|
-
|
12
|
-
# 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.
|
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.
|
13
10
|
attr_accessor :attributes_to_retrieve
|
14
11
|
|
15
|
-
# Determines the order in which Algolia
|
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** <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/).
|
16
13
|
attr_accessor :ranking
|
17
14
|
|
18
|
-
#
|
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** <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.
|
19
16
|
attr_accessor :custom_ranking
|
20
17
|
|
21
|
-
# Relevancy threshold below which less relevant results aren't included in the results.
|
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.
|
22
19
|
attr_accessor :relevancy_strictness
|
23
20
|
|
24
|
-
# Attributes to highlight.
|
21
|
+
# 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/).
|
25
22
|
attr_accessor :attributes_to_highlight
|
26
23
|
|
27
|
-
# Attributes to
|
24
|
+
# 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.
|
28
25
|
attr_accessor :attributes_to_snippet
|
29
26
|
|
30
|
-
# HTML
|
27
|
+
# HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
31
28
|
attr_accessor :highlight_pre_tag
|
32
29
|
|
33
|
-
# HTML
|
30
|
+
# HTML tag to insert after the highlighted parts in all highlighted results and snippets.
|
34
31
|
attr_accessor :highlight_post_tag
|
35
32
|
|
36
33
|
# String used as an ellipsis indicator when a snippet is truncated.
|
37
34
|
attr_accessor :snippet_ellipsis_text
|
38
35
|
|
39
|
-
#
|
36
|
+
# Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
|
40
37
|
attr_accessor :restrict_highlight_and_snippet_arrays
|
41
38
|
|
42
39
|
# Number of hits per page.
|
43
40
|
attr_accessor :hits_per_page
|
44
41
|
|
45
|
-
# Minimum number of characters a word in the query
|
42
|
+
# 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).
|
46
43
|
attr_accessor :min_word_sizefor1_typo
|
47
44
|
|
48
|
-
# Minimum number of characters a word in the query
|
45
|
+
# 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).
|
49
46
|
attr_accessor :min_word_sizefor2_typos
|
50
47
|
|
51
48
|
attr_accessor :typo_tolerance
|
52
49
|
|
53
|
-
# Whether to allow typos on numbers
|
50
|
+
# 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.
|
54
51
|
attr_accessor :allow_typos_on_numeric_tokens
|
55
52
|
|
56
|
-
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
53
|
+
# 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.
|
57
54
|
attr_accessor :disable_typo_tolerance_on_attributes
|
58
55
|
|
59
56
|
attr_accessor :ignore_plurals
|
60
57
|
|
61
58
|
attr_accessor :remove_stop_words
|
62
59
|
|
63
|
-
# Characters
|
60
|
+
# 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.
|
64
61
|
attr_accessor :keep_diacritics_on_characters
|
65
62
|
|
66
|
-
#
|
63
|
+
# [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/).
|
67
64
|
attr_accessor :query_languages
|
68
65
|
|
69
|
-
#
|
66
|
+
# 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.
|
70
67
|
attr_accessor :decompound_query
|
71
68
|
|
72
|
-
#
|
69
|
+
# Whether to enable rules.
|
73
70
|
attr_accessor :enable_rules
|
74
71
|
|
75
|
-
#
|
72
|
+
# Whether to enable Personalization.
|
76
73
|
attr_accessor :enable_personalization
|
77
74
|
|
78
75
|
attr_accessor :query_type
|
@@ -83,49 +80,49 @@ module Algolia
|
|
83
80
|
|
84
81
|
attr_accessor :semantic_search
|
85
82
|
|
86
|
-
#
|
83
|
+
# Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
87
84
|
attr_accessor :advanced_syntax
|
88
85
|
|
89
|
-
# Words
|
86
|
+
# 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).
|
90
87
|
attr_accessor :optional_words
|
91
88
|
|
92
|
-
#
|
89
|
+
# 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.
|
93
90
|
attr_accessor :disable_exact_on_attributes
|
94
91
|
|
95
92
|
attr_accessor :exact_on_single_word_query
|
96
93
|
|
97
|
-
# Alternatives that should be considered
|
94
|
+
# 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>.
|
98
95
|
attr_accessor :alternatives_as_exact
|
99
96
|
|
100
|
-
#
|
97
|
+
# 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.
|
101
98
|
attr_accessor :advanced_syntax_features
|
102
99
|
|
103
100
|
attr_accessor :distinct
|
104
101
|
|
105
|
-
# Whether to
|
102
|
+
# 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.
|
106
103
|
attr_accessor :replace_synonyms_in_highlight
|
107
104
|
|
108
|
-
#
|
105
|
+
# 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.
|
109
106
|
attr_accessor :min_proximity
|
110
107
|
|
111
|
-
#
|
108
|
+
# 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.
|
112
109
|
attr_accessor :response_fields
|
113
110
|
|
114
|
-
# Maximum number of facet
|
111
|
+
# 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).
|
115
112
|
attr_accessor :max_facet_hits
|
116
113
|
|
117
114
|
# Maximum number of facet values to return for each facet.
|
118
115
|
attr_accessor :max_values_per_facet
|
119
116
|
|
120
|
-
#
|
117
|
+
# 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/).
|
121
118
|
attr_accessor :sort_facet_values_by
|
122
119
|
|
123
|
-
#
|
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.
|
124
121
|
attr_accessor :attribute_criteria_computed_by_min_proximity
|
125
122
|
|
126
123
|
attr_accessor :rendering_content
|
127
124
|
|
128
|
-
#
|
125
|
+
# 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.
|
129
126
|
attr_accessor :enable_re_ranking
|
130
127
|
|
131
128
|
attr_accessor :re_ranking_apply_filter
|
@@ -155,7 +152,6 @@ module Algolia
|
|
155
152
|
# Attribute mapping from ruby-style variable name to JSON key.
|
156
153
|
def self.attribute_map
|
157
154
|
{
|
158
|
-
:attributes_for_faceting => :attributesForFaceting,
|
159
155
|
:attributes_to_retrieve => :attributesToRetrieve,
|
160
156
|
:ranking => :ranking,
|
161
157
|
:custom_ranking => :customRanking,
|
@@ -211,7 +207,6 @@ module Algolia
|
|
211
207
|
# Attribute type mapping.
|
212
208
|
def self.types_mapping
|
213
209
|
{
|
214
|
-
:attributes_for_faceting => :'Array<String>',
|
215
210
|
:attributes_to_retrieve => :'Array<String>',
|
216
211
|
:ranking => :'Array<String>',
|
217
212
|
:custom_ranking => :'Array<String>',
|
@@ -283,12 +278,6 @@ module Algolia
|
|
283
278
|
h[k.to_sym] = v
|
284
279
|
end
|
285
280
|
|
286
|
-
if attributes.key?(:attributes_for_faceting)
|
287
|
-
if (value = attributes[:attributes_for_faceting]).is_a?(Array)
|
288
|
-
self.attributes_for_faceting = value
|
289
|
-
end
|
290
|
-
end
|
291
|
-
|
292
281
|
if attributes.key?(:attributes_to_retrieve)
|
293
282
|
if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
|
294
283
|
self.attributes_to_retrieve = value
|
@@ -540,13 +529,26 @@ module Algolia
|
|
540
529
|
@max_facet_hits = max_facet_hits
|
541
530
|
end
|
542
531
|
|
532
|
+
# Custom attribute writer method with validation
|
533
|
+
# @param [Object] max_values_per_facet Value to be assigned
|
534
|
+
def max_values_per_facet=(max_values_per_facet)
|
535
|
+
if max_values_per_facet.nil?
|
536
|
+
raise ArgumentError, 'max_values_per_facet cannot be nil'
|
537
|
+
end
|
538
|
+
|
539
|
+
if max_values_per_facet > 1000
|
540
|
+
raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.'
|
541
|
+
end
|
542
|
+
|
543
|
+
@max_values_per_facet = max_values_per_facet
|
544
|
+
end
|
545
|
+
|
543
546
|
# Checks equality by comparing each attribute.
|
544
547
|
# @param [Object] Object to be compared
|
545
548
|
def ==(other)
|
546
549
|
return true if equal?(other)
|
547
550
|
|
548
551
|
self.class == other.class &&
|
549
|
-
attributes_for_faceting == other.attributes_for_faceting &&
|
550
552
|
attributes_to_retrieve == other.attributes_to_retrieve &&
|
551
553
|
ranking == other.ranking &&
|
552
554
|
custom_ranking == other.custom_ranking &&
|
@@ -602,8 +604,8 @@ module Algolia
|
|
602
604
|
# Calculates hash code according to all attributes.
|
603
605
|
# @return [Integer] Hash code
|
604
606
|
def hash
|
605
|
-
[
|
606
|
-
|
607
|
+
[attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag,
|
608
|
+
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
|
607
609
|
end
|
608
610
|
|
609
611
|
# Builds the object from hash
|
@@ -6,37 +6,37 @@ require 'time'
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
8
|
class Log
|
9
|
-
# Timestamp in
|
9
|
+
# Timestamp of the API request in ISO 8601 format.
|
10
10
|
attr_accessor :timestamp
|
11
11
|
|
12
|
-
# HTTP method of the
|
12
|
+
# HTTP method of the request.
|
13
13
|
attr_accessor :method
|
14
14
|
|
15
|
-
# HTTP
|
15
|
+
# HTTP status code of the response.
|
16
16
|
attr_accessor :answer_code
|
17
17
|
|
18
|
-
# Request body.
|
18
|
+
# Request body.
|
19
19
|
attr_accessor :query_body
|
20
20
|
|
21
|
-
#
|
21
|
+
# Response body.
|
22
22
|
attr_accessor :answer
|
23
23
|
|
24
|
-
#
|
24
|
+
# URL of the API endpoint.
|
25
25
|
attr_accessor :url
|
26
26
|
|
27
27
|
# IP address of the client that performed the request.
|
28
28
|
attr_accessor :ip
|
29
29
|
|
30
|
-
# Request headers (API
|
30
|
+
# Request headers (API keys are obfuscated).
|
31
31
|
attr_accessor :query_headers
|
32
32
|
|
33
33
|
# SHA1 signature of the log entry.
|
34
34
|
attr_accessor :sha1
|
35
35
|
|
36
|
-
# Number of API
|
36
|
+
# Number of API requests.
|
37
37
|
attr_accessor :nb_api_calls
|
38
38
|
|
39
|
-
# Processing time for the query.
|
39
|
+
# Processing time for the query in milliseconds. This doesn't include latency due to the network.
|
40
40
|
attr_accessor :processing_time_ms
|
41
41
|
|
42
42
|
# Index targeted by the query.
|
@@ -45,10 +45,10 @@ module Algolia
|
|
45
45
|
# Query parameters sent with the request.
|
46
46
|
attr_accessor :_query_params
|
47
47
|
|
48
|
-
# Number of hits returned for the query.
|
48
|
+
# Number of search results (hits) returned for the query.
|
49
49
|
attr_accessor :query_nb_hits
|
50
50
|
|
51
|
-
#
|
51
|
+
# Queries performed for the given request.
|
52
52
|
attr_accessor :inner_queries
|
53
53
|
|
54
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -205,6 +205,34 @@ module Algolia
|
|
205
205
|
end
|
206
206
|
end
|
207
207
|
|
208
|
+
# Custom attribute writer method with validation
|
209
|
+
# @param [Object] query_body Value to be assigned
|
210
|
+
def query_body=(query_body)
|
211
|
+
if query_body.nil?
|
212
|
+
raise ArgumentError, 'query_body cannot be nil'
|
213
|
+
end
|
214
|
+
|
215
|
+
if query_body.to_s.length > 1000
|
216
|
+
raise ArgumentError, 'invalid value for "query_body", the character length must be smaller than or equal to 1000.'
|
217
|
+
end
|
218
|
+
|
219
|
+
@query_body = query_body
|
220
|
+
end
|
221
|
+
|
222
|
+
# Custom attribute writer method with validation
|
223
|
+
# @param [Object] answer Value to be assigned
|
224
|
+
def answer=(answer)
|
225
|
+
if answer.nil?
|
226
|
+
raise ArgumentError, 'answer cannot be nil'
|
227
|
+
end
|
228
|
+
|
229
|
+
if answer.to_s.length > 1000
|
230
|
+
raise ArgumentError, 'invalid value for "answer", the character length must be smaller than or equal to 1000.'
|
231
|
+
end
|
232
|
+
|
233
|
+
@answer = answer
|
234
|
+
end
|
235
|
+
|
208
236
|
# Checks equality by comparing each attribute.
|
209
237
|
# @param [Object] Object to be compared
|
210
238
|
def ==(other)
|
@@ -6,10 +6,10 @@ require 'time'
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
8
|
class MultipleBatchResponse
|
9
|
-
#
|
9
|
+
# Task IDs. One for each index.
|
10
10
|
attr_accessor :task_id
|
11
11
|
|
12
|
-
# Unique
|
12
|
+
# Unique record identifiers.
|
13
13
|
attr_accessor :object_ids
|
14
14
|
|
15
15
|
# 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 by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
|
9
9
|
module NumericFilters
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -8,10 +8,10 @@ module Algolia
|
|
8
8
|
class OperationIndexParams
|
9
9
|
attr_accessor :operation
|
10
10
|
|
11
|
-
#
|
11
|
+
# Index name.
|
12
12
|
attr_accessor :destination
|
13
13
|
|
14
|
-
# **
|
14
|
+
# **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
|
15
15
|
attr_accessor :scope
|
16
16
|
|
17
17
|
class EnumAttributeValidator
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don't work with numeric attributes.
|
9
9
|
module OptionalFilters
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.
|
9
9
|
class Params
|
10
10
|
attr_accessor :query
|
11
11
|
|
@@ -7,10 +7,10 @@ module Algolia
|
|
7
7
|
module Search
|
8
8
|
# Record to promote.
|
9
9
|
class PromoteObjectID
|
10
|
-
# Unique
|
10
|
+
# Unique record identifier.
|
11
11
|
attr_accessor :object_id
|
12
12
|
|
13
|
-
#
|
13
|
+
# Position in the search results where you want to show the promoted records.
|
14
14
|
attr_accessor :position
|
15
15
|
|
16
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -7,10 +7,10 @@ module Algolia
|
|
7
7
|
module Search
|
8
8
|
# Records to promote.
|
9
9
|
class PromoteObjectIDs
|
10
|
-
#
|
10
|
+
# Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results.
|
11
11
|
attr_accessor :object_ids
|
12
12
|
|
13
|
-
#
|
13
|
+
# Position in the search results where you want to show the promoted records.
|
14
14
|
attr_accessor :position
|
15
15
|
|
16
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -71,6 +71,20 @@ module Algolia
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
# Custom attribute writer method with validation
|
75
|
+
# @param [Object] object_ids Value to be assigned
|
76
|
+
def object_ids=(object_ids)
|
77
|
+
if object_ids.nil?
|
78
|
+
raise ArgumentError, 'object_ids cannot be nil'
|
79
|
+
end
|
80
|
+
|
81
|
+
if object_ids.length > 100
|
82
|
+
raise ArgumentError, 'invalid value for "object_ids", number of items must be less than or equal to 100.'
|
83
|
+
end
|
84
|
+
|
85
|
+
@object_ids = object_ids
|
86
|
+
end
|
87
|
+
|
74
88
|
# Checks equality by comparing each attribute.
|
75
89
|
# @param [Object] Object to be compared
|
76
90
|
def ==(other)
|
@@ -5,11 +5,12 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
+
# Object with detailed information about the record's ranking.
|
8
9
|
class RankingInfo
|
9
|
-
#
|
10
|
+
# Whether a filter matched the query.
|
10
11
|
attr_accessor :filters
|
11
12
|
|
12
|
-
# Position of the
|
13
|
+
# Position of the first matched word in the best matching attribute of the record.
|
13
14
|
attr_accessor :first_matched_word
|
14
15
|
|
15
16
|
# Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
|
@@ -28,19 +29,19 @@ module Algolia
|
|
28
29
|
# Number of typos encountered when matching the record.
|
29
30
|
attr_accessor :nb_typos
|
30
31
|
|
31
|
-
#
|
32
|
+
# Whether the record was promoted by a rule.
|
32
33
|
attr_accessor :promoted
|
33
34
|
|
34
|
-
#
|
35
|
+
# Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
|
35
36
|
attr_accessor :proximity_distance
|
36
37
|
|
37
|
-
#
|
38
|
+
# Overall ranking of the record, expressed as a single integer. This attribute is internal.
|
38
39
|
attr_accessor :user_score
|
39
40
|
|
40
|
-
# Number of matched words
|
41
|
+
# Number of matched words.
|
41
42
|
attr_accessor :words
|
42
43
|
|
43
|
-
#
|
44
|
+
# Whether the record is re-ranked.
|
44
45
|
attr_accessor :promoted_by_re_ranking
|
45
46
|
|
46
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -177,6 +178,118 @@ module Algolia
|
|
177
178
|
end
|
178
179
|
end
|
179
180
|
|
181
|
+
# Custom attribute writer method with validation
|
182
|
+
# @param [Object] filters Value to be assigned
|
183
|
+
def filters=(filters)
|
184
|
+
if filters.nil?
|
185
|
+
raise ArgumentError, 'filters cannot be nil'
|
186
|
+
end
|
187
|
+
|
188
|
+
if filters < 0
|
189
|
+
raise ArgumentError, 'invalid value for "filters", must be greater than or equal to 0.'
|
190
|
+
end
|
191
|
+
|
192
|
+
@filters = filters
|
193
|
+
end
|
194
|
+
|
195
|
+
# Custom attribute writer method with validation
|
196
|
+
# @param [Object] first_matched_word Value to be assigned
|
197
|
+
def first_matched_word=(first_matched_word)
|
198
|
+
if first_matched_word.nil?
|
199
|
+
raise ArgumentError, 'first_matched_word cannot be nil'
|
200
|
+
end
|
201
|
+
|
202
|
+
if first_matched_word < 0
|
203
|
+
raise ArgumentError, 'invalid value for "first_matched_word", must be greater than or equal to 0.'
|
204
|
+
end
|
205
|
+
|
206
|
+
@first_matched_word = first_matched_word
|
207
|
+
end
|
208
|
+
|
209
|
+
# Custom attribute writer method with validation
|
210
|
+
# @param [Object] geo_distance Value to be assigned
|
211
|
+
def geo_distance=(geo_distance)
|
212
|
+
if geo_distance.nil?
|
213
|
+
raise ArgumentError, 'geo_distance cannot be nil'
|
214
|
+
end
|
215
|
+
|
216
|
+
if geo_distance < 0
|
217
|
+
raise ArgumentError, 'invalid value for "geo_distance", must be greater than or equal to 0.'
|
218
|
+
end
|
219
|
+
|
220
|
+
@geo_distance = geo_distance
|
221
|
+
end
|
222
|
+
|
223
|
+
# Custom attribute writer method with validation
|
224
|
+
# @param [Object] geo_precision Value to be assigned
|
225
|
+
def geo_precision=(geo_precision)
|
226
|
+
if geo_precision.nil?
|
227
|
+
raise ArgumentError, 'geo_precision cannot be nil'
|
228
|
+
end
|
229
|
+
|
230
|
+
if geo_precision < 1
|
231
|
+
raise ArgumentError, 'invalid value for "geo_precision", must be greater than or equal to 1.'
|
232
|
+
end
|
233
|
+
|
234
|
+
@geo_precision = geo_precision
|
235
|
+
end
|
236
|
+
|
237
|
+
# Custom attribute writer method with validation
|
238
|
+
# @param [Object] nb_exact_words Value to be assigned
|
239
|
+
def nb_exact_words=(nb_exact_words)
|
240
|
+
if nb_exact_words.nil?
|
241
|
+
raise ArgumentError, 'nb_exact_words cannot be nil'
|
242
|
+
end
|
243
|
+
|
244
|
+
if nb_exact_words < 0
|
245
|
+
raise ArgumentError, 'invalid value for "nb_exact_words", must be greater than or equal to 0.'
|
246
|
+
end
|
247
|
+
|
248
|
+
@nb_exact_words = nb_exact_words
|
249
|
+
end
|
250
|
+
|
251
|
+
# Custom attribute writer method with validation
|
252
|
+
# @param [Object] nb_typos Value to be assigned
|
253
|
+
def nb_typos=(nb_typos)
|
254
|
+
if nb_typos.nil?
|
255
|
+
raise ArgumentError, 'nb_typos cannot be nil'
|
256
|
+
end
|
257
|
+
|
258
|
+
if nb_typos < 0
|
259
|
+
raise ArgumentError, 'invalid value for "nb_typos", must be greater than or equal to 0.'
|
260
|
+
end
|
261
|
+
|
262
|
+
@nb_typos = nb_typos
|
263
|
+
end
|
264
|
+
|
265
|
+
# Custom attribute writer method with validation
|
266
|
+
# @param [Object] proximity_distance Value to be assigned
|
267
|
+
def proximity_distance=(proximity_distance)
|
268
|
+
if proximity_distance.nil?
|
269
|
+
raise ArgumentError, 'proximity_distance cannot be nil'
|
270
|
+
end
|
271
|
+
|
272
|
+
if proximity_distance < 0
|
273
|
+
raise ArgumentError, 'invalid value for "proximity_distance", must be greater than or equal to 0.'
|
274
|
+
end
|
275
|
+
|
276
|
+
@proximity_distance = proximity_distance
|
277
|
+
end
|
278
|
+
|
279
|
+
# Custom attribute writer method with validation
|
280
|
+
# @param [Object] words Value to be assigned
|
281
|
+
def words=(words)
|
282
|
+
if words.nil?
|
283
|
+
raise ArgumentError, 'words cannot be nil'
|
284
|
+
end
|
285
|
+
|
286
|
+
if words < 1
|
287
|
+
raise ArgumentError, 'invalid value for "words", must be greater than or equal to 1.'
|
288
|
+
end
|
289
|
+
|
290
|
+
@words = words
|
291
|
+
end
|
292
|
+
|
180
293
|
# Checks equality by comparing each attribute.
|
181
294
|
# @param [Object] Object to be compared
|
182
295
|
def ==(other)
|
@@ -5,7 +5,7 @@ require 'time'
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
#
|
8
|
+
# Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
|
9
9
|
module ReRankingApplyFilter
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|