From faaa38f0f7fca1175b7e925db7402b303cf9a4a9 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 9 Jan 2025 16:14:41 +0000 Subject: [PATCH] fix(specs): move customRanking and keepDiacriticsOnCharacters to indexSettings [skip-bc] (generated) https://github.com/algolia/api-clients-automation/pull/4324 Co-authored-by: algolia-bot Co-authored-by: Pierre Millot --- .../models/recommend/fallback_params.rb | 24 ++++++++++ .../recommend/recommend_search_params.rb | 24 ++++++++++ .../models/search/browse_params_object.rb | 24 ---------- .../models/search/consequence_params.rb | 24 ---------- lib/algolia/models/search/index_settings.rb | 48 +++++++++---------- .../models/search/search_for_facets.rb | 24 ---------- lib/algolia/models/search/search_for_hits.rb | 24 ---------- .../models/search/search_params_object.rb | 24 ---------- .../models/search/settings_response.rb | 48 +++++++++---------- 9 files changed, 96 insertions(+), 168 deletions(-) diff --git a/lib/algolia/models/recommend/fallback_params.rb b/lib/algolia/models/recommend/fallback_params.rb index a7fe0973..15e25af9 100644 --- a/lib/algolia/models/recommend/fallback_params.rb +++ b/lib/algolia/models/recommend/fallback_params.rb @@ -140,6 +140,12 @@ class FallbackParams # 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). attr_accessor :max_facet_hits + # 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. + attr_accessor :keep_diacritics_on_characters + + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + attr_accessor :custom_ranking + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve @@ -294,6 +300,8 @@ def self.attribute_map :custom_normalization => :customNormalization, :attribute_for_distinct => :attributeForDistinct, :max_facet_hits => :maxFacetHits, + :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, + :custom_ranking => :customRanking, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :relevancy_strictness => :relevancyStrictness, @@ -385,6 +393,8 @@ def self.types_mapping :custom_normalization => :"Hash>", :attribute_for_distinct => :"String", :max_facet_hits => :"Integer", + :keep_diacritics_on_characters => :"String", + :custom_ranking => :"Array", :attributes_to_retrieve => :"Array", :ranking => :"Array", :relevancy_strictness => :"Integer", @@ -688,6 +698,16 @@ def initialize(attributes = {}) self.max_facet_hits = attributes[:max_facet_hits] end + if attributes.key?(:keep_diacritics_on_characters) + self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] + end + + if attributes.key?(:custom_ranking) + if (value = attributes[:custom_ranking]).is_a?(Array) + self.custom_ranking = value + end + end + if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -913,6 +933,8 @@ def ==(other) custom_normalization == other.custom_normalization && attribute_for_distinct == other.attribute_for_distinct && max_facet_hits == other.max_facet_hits && + keep_diacritics_on_characters == other.keep_diacritics_on_characters && + custom_ranking == other.custom_ranking && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && relevancy_strictness == other.relevancy_strictness && @@ -1010,6 +1032,8 @@ def hash custom_normalization, attribute_for_distinct, max_facet_hits, + keep_diacritics_on_characters, + custom_ranking, attributes_to_retrieve, ranking, relevancy_strictness, diff --git a/lib/algolia/models/recommend/recommend_search_params.rb b/lib/algolia/models/recommend/recommend_search_params.rb index 26008c1b..0c47a66a 100644 --- a/lib/algolia/models/recommend/recommend_search_params.rb +++ b/lib/algolia/models/recommend/recommend_search_params.rb @@ -141,6 +141,12 @@ class RecommendSearchParams # 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). attr_accessor :max_facet_hits + # 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. + attr_accessor :keep_diacritics_on_characters + + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + attr_accessor :custom_ranking + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve @@ -295,6 +301,8 @@ def self.attribute_map :custom_normalization => :customNormalization, :attribute_for_distinct => :attributeForDistinct, :max_facet_hits => :maxFacetHits, + :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, + :custom_ranking => :customRanking, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, :relevancy_strictness => :relevancyStrictness, @@ -386,6 +394,8 @@ def self.types_mapping :custom_normalization => :"Hash>", :attribute_for_distinct => :"String", :max_facet_hits => :"Integer", + :keep_diacritics_on_characters => :"String", + :custom_ranking => :"Array", :attributes_to_retrieve => :"Array", :ranking => :"Array", :relevancy_strictness => :"Integer", @@ -691,6 +701,16 @@ def initialize(attributes = {}) self.max_facet_hits = attributes[:max_facet_hits] end + if attributes.key?(:keep_diacritics_on_characters) + self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] + end + + if attributes.key?(:custom_ranking) + if (value = attributes[:custom_ranking]).is_a?(Array) + self.custom_ranking = value + end + end + if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -916,6 +936,8 @@ def ==(other) custom_normalization == other.custom_normalization && attribute_for_distinct == other.attribute_for_distinct && max_facet_hits == other.max_facet_hits && + keep_diacritics_on_characters == other.keep_diacritics_on_characters && + custom_ranking == other.custom_ranking && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && relevancy_strictness == other.relevancy_strictness && @@ -1013,6 +1035,8 @@ def hash custom_normalization, attribute_for_distinct, max_facet_hits, + keep_diacritics_on_characters, + custom_ranking, attributes_to_retrieve, ranking, relevancy_strictness, diff --git a/lib/algolia/models/search/browse_params_object.rb b/lib/algolia/models/search/browse_params_object.rb index 62bee75d..4aefa4cb 100644 --- a/lib/algolia/models/search/browse_params_object.rb +++ b/lib/algolia/models/search/browse_params_object.rb @@ -101,9 +101,6 @@ class BrowseParamsObject # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -146,9 +143,6 @@ class BrowseParamsObject attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -252,7 +246,6 @@ def self.attribute_map :enable_ab_test => :enableABTest, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -268,7 +261,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -334,7 +326,6 @@ def self.types_mapping :enable_ab_test => :"Boolean", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -350,7 +341,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -572,12 +562,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -644,10 +628,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -798,7 +778,6 @@ def ==(other) enable_ab_test == other.enable_ab_test && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -814,7 +793,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -886,7 +864,6 @@ def hash enable_ab_test, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -902,7 +879,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/consequence_params.rb b/lib/algolia/models/search/consequence_params.rb index e7428906..b0488071 100644 --- a/lib/algolia/models/search/consequence_params.rb +++ b/lib/algolia/models/search/consequence_params.rb @@ -98,9 +98,6 @@ class ConsequenceParams # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -143,9 +140,6 @@ class ConsequenceParams attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -251,7 +245,6 @@ def self.attribute_map :enable_ab_test => :enableABTest, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -267,7 +260,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -334,7 +326,6 @@ def self.types_mapping :enable_ab_test => :"Boolean", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -350,7 +341,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -571,12 +561,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -643,10 +627,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -804,7 +784,6 @@ def ==(other) enable_ab_test == other.enable_ab_test && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -820,7 +799,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -893,7 +871,6 @@ def hash enable_ab_test, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -909,7 +886,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/index_settings.rb b/lib/algolia/models/search/index_settings.rb index 7ee89a03..d718f120 100644 --- a/lib/algolia/models/search/index_settings.rb +++ b/lib/algolia/models/search/index_settings.rb @@ -61,15 +61,18 @@ class IndexSettings # 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). attr_accessor :max_facet_hits + # 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. + attr_accessor :keep_diacritics_on_characters + + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + attr_accessor :custom_ranking + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -112,9 +115,6 @@ class IndexSettings attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -199,9 +199,10 @@ def self.attribute_map :custom_normalization => :customNormalization, :attribute_for_distinct => :attributeForDistinct, :max_facet_hits => :maxFacetHits, + :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, + :custom_ranking => :customRanking, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -217,7 +218,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -266,9 +266,10 @@ def self.types_mapping :custom_normalization => :"Hash>", :attribute_for_distinct => :"String", :max_facet_hits => :"Integer", + :keep_diacritics_on_characters => :"String", + :custom_ranking => :"Array", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -284,7 +285,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -446,6 +446,16 @@ def initialize(attributes = {}) self.max_facet_hits = attributes[:max_facet_hits] end + if attributes.key?(:keep_diacritics_on_characters) + self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] + end + + if attributes.key?(:custom_ranking) + if (value = attributes[:custom_ranking]).is_a?(Array) + self.custom_ranking = value + end + end + if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -458,12 +468,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -530,10 +534,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -664,9 +664,10 @@ def ==(other) custom_normalization == other.custom_normalization && attribute_for_distinct == other.attribute_for_distinct && max_facet_hits == other.max_facet_hits && + keep_diacritics_on_characters == other.keep_diacritics_on_characters && + custom_ranking == other.custom_ranking && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -682,7 +683,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -737,9 +737,10 @@ def hash custom_normalization, attribute_for_distinct, max_facet_hits, + keep_diacritics_on_characters, + custom_ranking, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -755,7 +756,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/search_for_facets.rb b/lib/algolia/models/search/search_for_facets.rb index 645f5410..1101a2a1 100644 --- a/lib/algolia/models/search/search_for_facets.rb +++ b/lib/algolia/models/search/search_for_facets.rb @@ -104,9 +104,6 @@ class SearchForFacets # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -149,9 +146,6 @@ class SearchForFacets attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -267,7 +261,6 @@ def self.attribute_map :enable_ab_test => :enableABTest, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -283,7 +276,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -362,7 +354,6 @@ def self.types_mapping :enable_ab_test => :"Boolean", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -378,7 +369,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -608,12 +598,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -680,10 +664,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -857,7 +837,6 @@ def ==(other) enable_ab_test == other.enable_ab_test && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -873,7 +852,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -950,7 +928,6 @@ def hash enable_ab_test, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -966,7 +943,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/search_for_hits.rb b/lib/algolia/models/search/search_for_hits.rb index 06b5a50f..b145219c 100644 --- a/lib/algolia/models/search/search_for_hits.rb +++ b/lib/algolia/models/search/search_for_hits.rb @@ -104,9 +104,6 @@ class SearchForHits # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -149,9 +146,6 @@ class SearchForHits attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -258,7 +252,6 @@ def self.attribute_map :enable_ab_test => :enableABTest, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -274,7 +267,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -342,7 +334,6 @@ def self.types_mapping :enable_ab_test => :"Boolean", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -358,7 +349,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -585,12 +575,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -657,10 +641,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -818,7 +798,6 @@ def ==(other) enable_ab_test == other.enable_ab_test && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -834,7 +813,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -908,7 +886,6 @@ def hash enable_ab_test, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -924,7 +901,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/search_params_object.rb b/lib/algolia/models/search/search_params_object.rb index 90651df9..c5afaf48 100644 --- a/lib/algolia/models/search/search_params_object.rb +++ b/lib/algolia/models/search/search_params_object.rb @@ -102,9 +102,6 @@ class SearchParamsObject # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -147,9 +144,6 @@ class SearchParamsObject attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -250,7 +244,6 @@ def self.attribute_map :enable_ab_test => :enableABTest, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -266,7 +259,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -331,7 +323,6 @@ def self.types_mapping :enable_ab_test => :"Boolean", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -347,7 +338,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -568,12 +558,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -640,10 +624,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -790,7 +770,6 @@ def ==(other) enable_ab_test == other.enable_ab_test && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -806,7 +785,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -877,7 +855,6 @@ def hash enable_ab_test, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -893,7 +870,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, diff --git a/lib/algolia/models/search/settings_response.rb b/lib/algolia/models/search/settings_response.rb index f0514e5a..65f00fb5 100644 --- a/lib/algolia/models/search/settings_response.rb +++ b/lib/algolia/models/search/settings_response.rb @@ -60,15 +60,18 @@ class SettingsResponse # 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). attr_accessor :max_facet_hits + # 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. + attr_accessor :keep_diacritics_on_characters + + # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. + attr_accessor :custom_ranking + # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included. attr_accessor :attributes_to_retrieve # Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they're specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/). attr_accessor :ranking - # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied. - attr_accessor :custom_ranking - # 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. attr_accessor :relevancy_strictness @@ -111,9 +114,6 @@ class SettingsResponse attr_accessor :remove_stop_words - # 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. - attr_accessor :keep_diacritics_on_characters - # Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, 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/). attr_accessor :query_languages @@ -201,9 +201,10 @@ def self.attribute_map :custom_normalization => :customNormalization, :attribute_for_distinct => :attributeForDistinct, :max_facet_hits => :maxFacetHits, + :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, + :custom_ranking => :customRanking, :attributes_to_retrieve => :attributesToRetrieve, :ranking => :ranking, - :custom_ranking => :customRanking, :relevancy_strictness => :relevancyStrictness, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -219,7 +220,6 @@ def self.attribute_map :disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes, :ignore_plurals => :ignorePlurals, :remove_stop_words => :removeStopWords, - :keep_diacritics_on_characters => :keepDiacriticsOnCharacters, :query_languages => :queryLanguages, :decompound_query => :decompoundQuery, :enable_rules => :enableRules, @@ -269,9 +269,10 @@ def self.types_mapping :custom_normalization => :"Hash>", :attribute_for_distinct => :"String", :max_facet_hits => :"Integer", + :keep_diacritics_on_characters => :"String", + :custom_ranking => :"Array", :attributes_to_retrieve => :"Array", :ranking => :"Array", - :custom_ranking => :"Array", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array", :attributes_to_snippet => :"Array", @@ -287,7 +288,6 @@ def self.types_mapping :disable_typo_tolerance_on_attributes => :"Array", :ignore_plurals => :"IgnorePlurals", :remove_stop_words => :"RemoveStopWords", - :keep_diacritics_on_characters => :"String", :query_languages => :"Array", :decompound_query => :"Boolean", :enable_rules => :"Boolean", @@ -450,6 +450,16 @@ def initialize(attributes = {}) self.max_facet_hits = attributes[:max_facet_hits] end + if attributes.key?(:keep_diacritics_on_characters) + self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] + end + + if attributes.key?(:custom_ranking) + if (value = attributes[:custom_ranking]).is_a?(Array) + self.custom_ranking = value + end + end + if attributes.key?(:attributes_to_retrieve) if (value = attributes[:attributes_to_retrieve]).is_a?(Array) self.attributes_to_retrieve = value @@ -462,12 +472,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:custom_ranking) - if (value = attributes[:custom_ranking]).is_a?(Array) - self.custom_ranking = value - end - end - if attributes.key?(:relevancy_strictness) self.relevancy_strictness = attributes[:relevancy_strictness] end @@ -534,10 +538,6 @@ def initialize(attributes = {}) self.remove_stop_words = attributes[:remove_stop_words] end - if attributes.key?(:keep_diacritics_on_characters) - self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters] - end - if attributes.key?(:query_languages) if (value = attributes[:query_languages]).is_a?(Array) self.query_languages = value @@ -672,9 +672,10 @@ def ==(other) custom_normalization == other.custom_normalization && attribute_for_distinct == other.attribute_for_distinct && max_facet_hits == other.max_facet_hits && + keep_diacritics_on_characters == other.keep_diacritics_on_characters && + custom_ranking == other.custom_ranking && attributes_to_retrieve == other.attributes_to_retrieve && ranking == other.ranking && - custom_ranking == other.custom_ranking && relevancy_strictness == other.relevancy_strictness && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -690,7 +691,6 @@ def ==(other) disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes && ignore_plurals == other.ignore_plurals && remove_stop_words == other.remove_stop_words && - keep_diacritics_on_characters == other.keep_diacritics_on_characters && query_languages == other.query_languages && decompound_query == other.decompound_query && enable_rules == other.enable_rules && @@ -746,9 +746,10 @@ def hash custom_normalization, attribute_for_distinct, max_facet_hits, + keep_diacritics_on_characters, + custom_ranking, attributes_to_retrieve, ranking, - custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, @@ -764,7 +765,6 @@ def hash disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, - keep_diacritics_on_characters, query_languages, decompound_query, enable_rules,