From f105b8971f5104df1031e200d4eaf56c425cd654 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 9 Jan 2025 16:12:52 +0000 Subject: [PATCH] fix(specs): move customRanking and keepDiacriticsOnCharacters to indexSettings [skip-bc] (#4324) (generated) [skip ci] Co-authored-by: Pierre Millot --- .../Models/Recommend/FallbackParams.cs | 26 +++ .../Models/Recommend/RecommendSearchParams.cs | 26 +++ .../Models/Search/BrowseParamsObject.cs | 26 --- .../Models/Search/ConsequenceParams.cs | 26 --- .../Models/Search/IndexSettings.cs | 52 ++--- .../Models/Search/SearchForFacets.cs | 26 --- .../Models/Search/SearchForHits.cs | 26 --- .../Models/Search/SearchParamsObject.cs | 26 --- .../Models/Search/SettingsResponse.cs | 52 ++--- .../lib/src/model/base_index_settings.dart | 18 +- .../lib/src/model/base_index_settings.g.dart | 7 + .../lib/src/model/browse_params_object.dart | 14 -- .../lib/src/model/browse_params_object.g.dart | 7 - .../lib/src/model/consequence_params.dart | 14 -- .../lib/src/model/consequence_params.g.dart | 7 - .../lib/src/model/fallback_params.dart | 14 ++ .../lib/src/model/fallback_params.g.dart | 7 + .../lib/src/model/index_settings.dart | 28 +-- .../lib/src/model/index_settings.g.dart | 14 +- .../index_settings_as_search_params.dart | 14 -- .../index_settings_as_search_params.g.dart | 7 - .../src/model/recommend_index_settings.dart | 14 ++ .../src/model/recommend_index_settings.g.dart | 7 + .../src/model/recommend_search_params.dart | 14 ++ .../src/model/recommend_search_params.g.dart | 7 + .../lib/src/model/search_for_facets.dart | 14 -- .../lib/src/model/search_for_facets.g.dart | 7 - .../lib/src/model/search_for_hits.dart | 14 -- .../lib/src/model/search_for_hits.g.dart | 7 - .../lib/src/model/search_params_object.dart | 14 -- .../lib/src/model/search_params_object.g.dart | 7 - .../lib/src/model/settings_response.dart | 28 +-- .../lib/src/model/settings_response.g.dart | 14 +- .../lib/src/model/base_index_settings.dart | 18 +- .../lib/src/model/base_index_settings.g.dart | 7 + .../lib/src/model/fallback_params.dart | 14 ++ .../lib/src/model/fallback_params.g.dart | 7 + .../src/model/recommend_index_settings.dart | 14 ++ .../src/model/recommend_index_settings.g.dart | 7 + .../src/model/recommend_search_params.dart | 14 ++ .../src/model/recommend_search_params.g.dart | 7 + .../lib/src/model/base_index_settings.dart | 18 +- .../lib/src/model/base_index_settings.g.dart | 7 + .../lib/src/model/browse_params_object.dart | 14 -- .../lib/src/model/browse_params_object.g.dart | 7 - .../lib/src/model/consequence_params.dart | 14 -- .../lib/src/model/consequence_params.g.dart | 7 - .../lib/src/model/index_settings.dart | 28 +-- .../lib/src/model/index_settings.g.dart | 14 +- .../index_settings_as_search_params.dart | 14 -- .../index_settings_as_search_params.g.dart | 7 - .../lib/src/model/search_for_facets.dart | 14 -- .../lib/src/model/search_for_facets.g.dart | 7 - .../lib/src/model/search_for_hits.dart | 14 -- .../lib/src/model/search_for_hits.g.dart | 7 - .../lib/src/model/search_params_object.dart | 14 -- .../lib/src/model/search_params_object.g.dart | 7 - .../lib/src/model/settings_response.dart | 28 +-- .../lib/src/model/settings_response.g.dart | 14 +- .../recommend/model_fallback_params.go | 90 +++++++++ .../model_recommend_search_params.go | 90 +++++++++ .../search/model_browse_params_object.go | 90 --------- .../search/model_consequence_params.go | 90 --------- .../algolia/search/model_index_settings.go | 180 +++++++++--------- .../algolia/search/model_search_for_facets.go | 90 --------- .../algolia/search/model_search_for_hits.go | 90 --------- .../search/model_search_params_object.go | 90 --------- .../algolia/search/model_settings_response.go | 180 +++++++++--------- .../model/recommend/FallbackParams.java | 57 ++++++ .../recommend/RecommendSearchParams.java | 57 ++++++ .../model/search/BrowseParamsObject.java | 57 ------ .../model/search/ConsequenceParams.java | 57 ------ .../algolia/model/search/IndexSettings.java | 114 +++++------ .../algolia/model/search/SearchForFacets.java | 57 ------ .../algolia/model/search/SearchForHits.java | 57 ------ .../model/search/SearchParamsObject.java | 57 ------ .../model/search/SettingsResponse.java | 114 +++++------ .../lite/model/baseIndexSettings.ts | 10 + .../lite/model/indexSettingsAsSearchParams.ts | 10 - .../client-search/model/baseIndexSettings.ts | 10 + .../model/indexSettingsAsSearchParams.ts | 10 - .../recommend/model/baseIndexSettings.ts | 10 + .../client/model/recommend/FallbackParams.kt | 8 + .../model/recommend/RecommendSearchParams.kt | 8 + .../client/model/search/BrowseParamsObject.kt | 8 - .../client/model/search/ConsequenceParams.kt | 8 - .../client/model/search/IndexSettings.kt | 16 +- .../client/model/search/SearchForFacets.kt | 8 - .../client/model/search/SearchForHits.kt | 8 - .../client/model/search/SearchParamsObject.kt | 8 - .../client/model/search/SettingsResponse.kt | 16 +- .../lib/Model/Recommend/FallbackParams.php | 64 +++++++ .../Model/Recommend/RecommendSearchParams.php | 64 +++++++ .../lib/Model/Search/BrowseParams.php | 64 ------- .../lib/Model/Search/BrowseParamsObject.php | 64 ------- .../lib/Model/Search/ConsequenceParams.php | 64 ------- .../lib/Model/Search/IndexSettings.php | 122 ++++++------ .../lib/Model/Search/SearchForFacets.php | 64 ------- .../lib/Model/Search/SearchForHits.php | 64 ------- .../lib/Model/Search/SearchParams.php | 64 ------- .../lib/Model/Search/SearchParamsObject.php | 64 ------- .../lib/Model/Search/SearchQuery.php | 64 ------- .../lib/Model/Search/SettingsResponse.php | 122 ++++++------ .../recommend/models/fallback_params.py | 6 + .../models/recommend_search_params.py | 6 + .../search/models/browse_params_object.py | 6 - .../search/models/consequence_params.py | 6 - .../search/models/index_settings.py | 12 +- .../search/models/search_for_facets.py | 6 - .../search/models/search_for_hits.py | 6 - .../search/models/search_params_object.py | 6 - .../search/models/settings_response.py | 12 +- .../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 --- .../algolia/models/search/index_settings.rb | 48 ++--- .../models/search/search_for_facets.rb | 24 --- .../algolia/models/search/search_for_hits.rb | 24 --- .../models/search/search_params_object.rb | 24 --- .../models/search/settings_response.rb | 48 ++--- .../recommend/BaseIndexSettings.scala | 18 +- .../recommend/FallbackParams.scala | 16 ++ .../recommend/RecommendIndexSettings.scala | 16 ++ .../recommend/RecommendSearchParams.scala | 16 ++ .../search/BaseIndexSettings.scala | 18 +- .../search/BrowseParamsObject.scala | 16 -- .../search/ConsequenceParams.scala | 16 -- .../algoliasearch/search/IndexSettings.scala | 32 ++-- .../search/IndexSettingsAsSearchParams.scala | 16 -- .../search/SearchForFacets.scala | 16 -- .../algoliasearch/search/SearchForHits.scala | 16 -- .../search/SearchParamsObject.scala | 16 -- .../search/SettingsResponse.scala | 32 ++-- .../Recommend/Models/FallbackParams.swift | 25 +++ .../Models/RecommendBaseIndexSettings.swift | 29 ++- .../Models/RecommendIndexSettings.swift | 25 +++ .../Models/RecommendSearchParams.swift | 25 +++ .../Search/Models/BrowseParamsObject.swift | 25 --- .../Sources/Search/Models/IndexSettings.swift | 50 ++--- .../Models/SearchBaseIndexSettings.swift | 29 ++- .../Models/SearchConsequenceParams.swift | 25 --- .../Search/Models/SearchForFacets.swift | 25 --- .../Sources/Search/Models/SearchForHits.swift | 25 --- .../SearchIndexSettingsAsSearchParams.swift | 25 --- .../Models/SearchSearchParamsObject.swift | 25 --- .../Search/Models/SettingsResponse.swift | 50 ++--- docs/bundled/crawler.yml | 110 +++++------ docs/bundled/recommend.yml | 57 +++++- docs/bundled/search.yml | 112 +++++------ specs/bundled/algoliasearch.yml | 110 +++++------ specs/bundled/crawler.yml | 110 +++++------ specs/bundled/recommend.yml | 55 ++++++ specs/bundled/search.yml | 110 +++++------ .../src/generated/requests/Search.test.cs | 4 +- .../test/requests/algoliasearch_test.dart | 6 +- .../dart/test/requests/search_test.dart | 6 +- tests/output/go/tests/requests/search_test.go | 7 +- .../com/algolia/requests/Search.test.java | 4 +- .../src/requests/algoliasearch.test.ts | 4 - .../javascript/src/requests/search.test.ts | 4 - .../kotlin/com/algolia/requests/SearchTest.kt | 4 +- tests/output/php/src/requests/SearchTest.php | 6 +- .../python/tests/requests/search_test.py | 12 +- .../output/ruby/test/requests/search_test.rb | 4 +- .../algoliasearch/requests/SearchTest.scala | 4 +- .../swift/Tests/requests/SearchTests.swift | 8 +- 167 files changed, 2099 insertions(+), 3141 deletions(-) diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FallbackParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FallbackParams.cs index c2cc4db404..9dede6b5cc 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FallbackParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/FallbackParams.cs @@ -363,6 +363,20 @@ public FallbackParams() [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } + /// + /// 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. + /// + /// 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. + [JsonPropertyName("keepDiacriticsOnCharacters")] + public string KeepDiacriticsOnCharacters { get; set; } + + /// + /// 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. + /// + /// 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. + [JsonPropertyName("customRanking")] + public List CustomRanking { get; set; } + /// /// 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. /// @@ -656,6 +670,8 @@ public override string ToString() sb.Append(" CustomNormalization: ").Append(CustomNormalization).Append("\n"); sb.Append(" AttributeForDistinct: ").Append(AttributeForDistinct).Append("\n"); sb.Append(" MaxFacetHits: ").Append(MaxFacetHits).Append("\n"); + sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); + sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); @@ -767,6 +783,8 @@ public override bool Equals(object obj) (CustomNormalization == input.CustomNormalization || CustomNormalization != null && input.CustomNormalization != null && CustomNormalization.SequenceEqual(input.CustomNormalization)) && (AttributeForDistinct == input.AttributeForDistinct || (AttributeForDistinct != null && AttributeForDistinct.Equals(input.AttributeForDistinct))) && (MaxFacetHits == input.MaxFacetHits || MaxFacetHits.Equals(input.MaxFacetHits)) && + (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && + (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && @@ -962,6 +980,14 @@ public override int GetHashCode() hashCode = (hashCode * 59) + AttributeForDistinct.GetHashCode(); } hashCode = (hashCode * 59) + MaxFacetHits.GetHashCode(); + if (KeepDiacriticsOnCharacters != null) + { + hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); + } + if (CustomRanking != null) + { + hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); + } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendSearchParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendSearchParams.cs index 0aec27d752..15e90d3b7e 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendSearchParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Recommend/RecommendSearchParams.cs @@ -363,6 +363,20 @@ public RecommendSearchParams() [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } + /// + /// 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. + /// + /// 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. + [JsonPropertyName("keepDiacriticsOnCharacters")] + public string KeepDiacriticsOnCharacters { get; set; } + + /// + /// 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. + /// + /// 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. + [JsonPropertyName("customRanking")] + public List CustomRanking { get; set; } + /// /// 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. /// @@ -656,6 +670,8 @@ public override string ToString() sb.Append(" CustomNormalization: ").Append(CustomNormalization).Append("\n"); sb.Append(" AttributeForDistinct: ").Append(AttributeForDistinct).Append("\n"); sb.Append(" MaxFacetHits: ").Append(MaxFacetHits).Append("\n"); + sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); + sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); @@ -767,6 +783,8 @@ public override bool Equals(object obj) (CustomNormalization == input.CustomNormalization || CustomNormalization != null && input.CustomNormalization != null && CustomNormalization.SequenceEqual(input.CustomNormalization)) && (AttributeForDistinct == input.AttributeForDistinct || (AttributeForDistinct != null && AttributeForDistinct.Equals(input.AttributeForDistinct))) && (MaxFacetHits == input.MaxFacetHits || MaxFacetHits.Equals(input.MaxFacetHits)) && + (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && + (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && @@ -962,6 +980,14 @@ public override int GetHashCode() hashCode = (hashCode * 59) + AttributeForDistinct.GetHashCode(); } hashCode = (hashCode * 59) + MaxFacetHits.GetHashCode(); + if (KeepDiacriticsOnCharacters != null) + { + hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); + } + if (CustomRanking != null) + { + hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); + } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs index a4a0ce9b2f..70522f0de9 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/BrowseParamsObject.cs @@ -278,13 +278,6 @@ public BrowseParamsObject() [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -387,13 +380,6 @@ public BrowseParamsObject() [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -578,7 +564,6 @@ public override string ToString() sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -594,7 +579,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -680,7 +664,6 @@ public override bool Equals(object obj) (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -696,7 +679,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -827,10 +809,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -873,10 +851,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs index 149a6acc53..494416cc83 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ConsequenceParams.cs @@ -271,13 +271,6 @@ public ConsequenceParams() [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -380,13 +373,6 @@ public ConsequenceParams() [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -581,7 +567,6 @@ public override string ToString() sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -597,7 +582,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -684,7 +668,6 @@ public override bool Equals(object obj) (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -700,7 +683,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -829,10 +811,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -875,10 +853,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs index e540362c16..fb32091432 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/IndexSettings.cs @@ -173,6 +173,20 @@ public IndexSettings() [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } + /// + /// 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. + /// + /// 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. + [JsonPropertyName("keepDiacriticsOnCharacters")] + public string KeepDiacriticsOnCharacters { get; set; } + + /// + /// 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. + /// + /// 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. + [JsonPropertyName("customRanking")] + public List CustomRanking { get; set; } + /// /// 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. /// @@ -187,13 +201,6 @@ public IndexSettings() [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -296,13 +303,6 @@ public IndexSettings() [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -464,9 +464,10 @@ public override string ToString() sb.Append(" CustomNormalization: ").Append(CustomNormalization).Append("\n"); sb.Append(" AttributeForDistinct: ").Append(AttributeForDistinct).Append("\n"); sb.Append(" MaxFacetHits: ").Append(MaxFacetHits).Append("\n"); + sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); + sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -482,7 +483,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -551,9 +551,10 @@ public override bool Equals(object obj) (CustomNormalization == input.CustomNormalization || CustomNormalization != null && input.CustomNormalization != null && CustomNormalization.SequenceEqual(input.CustomNormalization)) && (AttributeForDistinct == input.AttributeForDistinct || (AttributeForDistinct != null && AttributeForDistinct.Equals(input.AttributeForDistinct))) && (MaxFacetHits == input.MaxFacetHits || MaxFacetHits.Equals(input.MaxFacetHits)) && + (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && + (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -569,7 +570,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -668,6 +668,14 @@ public override int GetHashCode() hashCode = (hashCode * 59) + AttributeForDistinct.GetHashCode(); } hashCode = (hashCode * 59) + MaxFacetHits.GetHashCode(); + if (KeepDiacriticsOnCharacters != null) + { + hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); + } + if (CustomRanking != null) + { + hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); + } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); @@ -676,10 +684,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -722,10 +726,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs index e67b69f6b8..0fa0050ad6 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForFacets.cs @@ -302,13 +302,6 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -411,13 +404,6 @@ public SearchForFacets(string facet, string indexName, SearchTypeFacet? type) [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -624,7 +610,6 @@ public override string ToString() sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -640,7 +625,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -731,7 +715,6 @@ public override bool Equals(object obj) (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -747,7 +730,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -886,10 +868,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -932,10 +910,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs index 87cb18b5e4..b1e67410e8 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchForHits.cs @@ -298,13 +298,6 @@ public SearchForHits(string indexName) [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -407,13 +400,6 @@ public SearchForHits(string indexName) [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -599,7 +585,6 @@ public override string ToString() sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -615,7 +600,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -703,7 +687,6 @@ public override bool Equals(object obj) (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -719,7 +702,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -855,10 +837,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -901,10 +879,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs index af0516df5b..b3128629d0 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SearchParamsObject.cs @@ -278,13 +278,6 @@ public SearchParamsObject() [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -387,13 +380,6 @@ public SearchParamsObject() [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -571,7 +557,6 @@ public override string ToString() sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -587,7 +572,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -672,7 +656,6 @@ public override bool Equals(object obj) (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -688,7 +671,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -818,10 +800,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -864,10 +842,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SettingsResponse.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SettingsResponse.cs index 2102170c97..346de52871 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SettingsResponse.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SettingsResponse.cs @@ -173,6 +173,20 @@ public SettingsResponse() [JsonPropertyName("maxFacetHits")] public int? MaxFacetHits { get; set; } + /// + /// 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. + /// + /// 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. + [JsonPropertyName("keepDiacriticsOnCharacters")] + public string KeepDiacriticsOnCharacters { get; set; } + + /// + /// 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. + /// + /// 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. + [JsonPropertyName("customRanking")] + public List CustomRanking { get; set; } + /// /// 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. /// @@ -187,13 +201,6 @@ public SettingsResponse() [JsonPropertyName("ranking")] public List Ranking { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("customRanking")] - public List CustomRanking { get; set; } - /// /// 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. /// @@ -296,13 +303,6 @@ public SettingsResponse() [JsonPropertyName("removeStopWords")] public RemoveStopWords RemoveStopWords { get; set; } - /// - /// 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. - /// - /// 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. - [JsonPropertyName("keepDiacriticsOnCharacters")] - public string KeepDiacriticsOnCharacters { get; set; } - /// /// 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/). /// @@ -471,9 +471,10 @@ public override string ToString() sb.Append(" CustomNormalization: ").Append(CustomNormalization).Append("\n"); sb.Append(" AttributeForDistinct: ").Append(AttributeForDistinct).Append("\n"); sb.Append(" MaxFacetHits: ").Append(MaxFacetHits).Append("\n"); + sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); + sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" AttributesToRetrieve: ").Append(AttributesToRetrieve).Append("\n"); sb.Append(" Ranking: ").Append(Ranking).Append("\n"); - sb.Append(" CustomRanking: ").Append(CustomRanking).Append("\n"); sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n"); sb.Append(" AttributesToHighlight: ").Append(AttributesToHighlight).Append("\n"); sb.Append(" AttributesToSnippet: ").Append(AttributesToSnippet).Append("\n"); @@ -489,7 +490,6 @@ public override string ToString() sb.Append(" DisableTypoToleranceOnAttributes: ").Append(DisableTypoToleranceOnAttributes).Append("\n"); sb.Append(" IgnorePlurals: ").Append(IgnorePlurals).Append("\n"); sb.Append(" RemoveStopWords: ").Append(RemoveStopWords).Append("\n"); - sb.Append(" KeepDiacriticsOnCharacters: ").Append(KeepDiacriticsOnCharacters).Append("\n"); sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n"); sb.Append(" DecompoundQuery: ").Append(DecompoundQuery).Append("\n"); sb.Append(" EnableRules: ").Append(EnableRules).Append("\n"); @@ -559,9 +559,10 @@ public override bool Equals(object obj) (CustomNormalization == input.CustomNormalization || CustomNormalization != null && input.CustomNormalization != null && CustomNormalization.SequenceEqual(input.CustomNormalization)) && (AttributeForDistinct == input.AttributeForDistinct || (AttributeForDistinct != null && AttributeForDistinct.Equals(input.AttributeForDistinct))) && (MaxFacetHits == input.MaxFacetHits || MaxFacetHits.Equals(input.MaxFacetHits)) && + (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && + (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (AttributesToRetrieve == input.AttributesToRetrieve || AttributesToRetrieve != null && input.AttributesToRetrieve != null && AttributesToRetrieve.SequenceEqual(input.AttributesToRetrieve)) && (Ranking == input.Ranking || Ranking != null && input.Ranking != null && Ranking.SequenceEqual(input.Ranking)) && - (CustomRanking == input.CustomRanking || CustomRanking != null && input.CustomRanking != null && CustomRanking.SequenceEqual(input.CustomRanking)) && (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) && (AttributesToHighlight == input.AttributesToHighlight || AttributesToHighlight != null && input.AttributesToHighlight != null && AttributesToHighlight.SequenceEqual(input.AttributesToHighlight)) && (AttributesToSnippet == input.AttributesToSnippet || AttributesToSnippet != null && input.AttributesToSnippet != null && AttributesToSnippet.SequenceEqual(input.AttributesToSnippet)) && @@ -577,7 +578,6 @@ public override bool Equals(object obj) (DisableTypoToleranceOnAttributes == input.DisableTypoToleranceOnAttributes || DisableTypoToleranceOnAttributes != null && input.DisableTypoToleranceOnAttributes != null && DisableTypoToleranceOnAttributes.SequenceEqual(input.DisableTypoToleranceOnAttributes)) && (IgnorePlurals == input.IgnorePlurals || (IgnorePlurals != null && IgnorePlurals.Equals(input.IgnorePlurals))) && (RemoveStopWords == input.RemoveStopWords || (RemoveStopWords != null && RemoveStopWords.Equals(input.RemoveStopWords))) && - (KeepDiacriticsOnCharacters == input.KeepDiacriticsOnCharacters || (KeepDiacriticsOnCharacters != null && KeepDiacriticsOnCharacters.Equals(input.KeepDiacriticsOnCharacters))) && (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) && (DecompoundQuery == input.DecompoundQuery || DecompoundQuery.Equals(input.DecompoundQuery)) && (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) && @@ -677,6 +677,14 @@ public override int GetHashCode() hashCode = (hashCode * 59) + AttributeForDistinct.GetHashCode(); } hashCode = (hashCode * 59) + MaxFacetHits.GetHashCode(); + if (KeepDiacriticsOnCharacters != null) + { + hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); + } + if (CustomRanking != null) + { + hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); + } if (AttributesToRetrieve != null) { hashCode = (hashCode * 59) + AttributesToRetrieve.GetHashCode(); @@ -685,10 +693,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + Ranking.GetHashCode(); } - if (CustomRanking != null) - { - hashCode = (hashCode * 59) + CustomRanking.GetHashCode(); - } hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode(); if (AttributesToHighlight != null) { @@ -731,10 +735,6 @@ public override int GetHashCode() { hashCode = (hashCode * 59) + RemoveStopWords.GetHashCode(); } - if (KeepDiacriticsOnCharacters != null) - { - hashCode = (hashCode * 59) + KeepDiacriticsOnCharacters.GetHashCode(); - } if (QueryLanguages != null) { hashCode = (hashCode * 59) + QueryLanguages.GetHashCode(); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart index 4e5c264df1..56610fd72e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.dart @@ -28,6 +28,8 @@ final class BaseIndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, }); /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. @@ -104,6 +106,14 @@ final class BaseIndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + @override bool operator ==(Object other) => identical(this, other) || @@ -127,7 +137,9 @@ final class BaseIndexSettings { other.userData == userData && other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && - other.maxFacetHits == maxFacetHits; + other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking; @override int get hashCode => @@ -148,7 +160,9 @@ final class BaseIndexSettings { userData.hashCode + customNormalization.hashCode + attributeForDistinct.hashCode + - maxFacetHits.hashCode; + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode; factory BaseIndexSettings.fromJson(Map json) => _$BaseIndexSettingsFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart index 4e0257eeac..29b1134b36 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/base_index_settings.g.dart @@ -57,6 +57,10 @@ BaseIndexSettings _$BaseIndexSettingsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), ); return val; }, @@ -98,6 +102,9 @@ Map _$BaseIndexSettingsToJson(BaseIndexSettings instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, }; const _$SupportedLanguageEnumMap = { diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart index 589a9588fc..46d7e92b22 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.dart @@ -52,7 +52,6 @@ final class BrowseParamsObject { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -68,7 +67,6 @@ final class BrowseParamsObject { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -256,10 +254,6 @@ final class BrowseParamsObject { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -329,10 +323,6 @@ final class BrowseParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -475,7 +465,6 @@ final class BrowseParamsObject { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -493,7 +482,6 @@ final class BrowseParamsObject { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -557,7 +545,6 @@ final class BrowseParamsObject { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -573,7 +560,6 @@ final class BrowseParamsObject { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart index 11885620e3..c0e6e46ecf 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/browse_params_object.g.dart @@ -69,8 +69,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -99,8 +97,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -213,7 +209,6 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -239,8 +234,6 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart index 42018ab0d0..6268446e8a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.dart @@ -51,7 +51,6 @@ final class ConsequenceParams { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -67,7 +66,6 @@ final class ConsequenceParams { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -253,10 +251,6 @@ final class ConsequenceParams { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -326,10 +320,6 @@ final class ConsequenceParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -485,7 +475,6 @@ final class ConsequenceParams { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -503,7 +492,6 @@ final class ConsequenceParams { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -568,7 +556,6 @@ final class ConsequenceParams { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -584,7 +571,6 @@ final class ConsequenceParams { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart index 065434f432..cf51274957 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/consequence_params.g.dart @@ -68,8 +68,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -98,8 +96,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -215,7 +211,6 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -241,8 +236,6 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart index 293618d76c..50696ab622 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.dart @@ -63,6 +63,8 @@ final class FallbackParams { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -314,6 +316,14 @@ final class FallbackParams { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -532,6 +542,8 @@ final class FallbackParams { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -623,6 +635,8 @@ final class FallbackParams { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.g.dart index d4b90dd8ae..79fb55cb62 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/fallback_params.g.dart @@ -107,6 +107,10 @@ FallbackParams _$FallbackParamsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -269,6 +273,9 @@ Map _$FallbackParamsToJson(FallbackParams instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart index a789381223..57f19f362a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.dart @@ -36,9 +36,10 @@ final class IndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -54,7 +55,6 @@ final class IndexSettings { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -155,6 +155,14 @@ final class IndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -163,10 +171,6 @@ final class IndexSettings { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -236,10 +240,6 @@ final class IndexSettings { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -364,9 +364,10 @@ final class IndexSettings { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -384,7 +385,6 @@ final class IndexSettings { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -431,9 +431,10 @@ final class IndexSettings { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -449,7 +450,6 @@ final class IndexSettings { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart index 083b83674d..3234f2dc0f 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings.g.dart @@ -57,12 +57,14 @@ IndexSettings _$IndexSettingsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -91,8 +93,6 @@ IndexSettings _$IndexSettingsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -193,10 +193,12 @@ Map _$IndexSettingsToJson(IndexSettings instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -222,8 +224,6 @@ Map _$IndexSettingsToJson(IndexSettings instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart index 97803f0146..6c2f7385bb 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.dart @@ -20,7 +20,6 @@ final class IndexSettingsAsSearchParams { const IndexSettingsAsSearchParams({ this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -36,7 +35,6 @@ final class IndexSettingsAsSearchParams { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -71,10 +69,6 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -144,10 +138,6 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -254,7 +244,6 @@ final class IndexSettingsAsSearchParams { other is IndexSettingsAsSearchParams && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -272,7 +261,6 @@ final class IndexSettingsAsSearchParams { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -303,7 +291,6 @@ final class IndexSettingsAsSearchParams { int get hashCode => attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -319,7 +306,6 @@ final class IndexSettingsAsSearchParams { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart index 6645b6d22d..2c7f9b26b3 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/index_settings_as_search_params.g.dart @@ -17,8 +17,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -47,8 +45,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -119,7 +115,6 @@ Map _$IndexSettingsAsSearchParamsToJson( if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -145,8 +140,6 @@ Map _$IndexSettingsAsSearchParamsToJson( 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.dart index 5c735660d5..b35e70f6e2 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.dart @@ -34,6 +34,8 @@ final class RecommendIndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -148,6 +150,14 @@ final class RecommendIndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -337,6 +347,8 @@ final class RecommendIndexSettings { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -399,6 +411,8 @@ final class RecommendIndexSettings { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.g.dart index 099ac372fa..437572b876 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_index_settings.g.dart @@ -58,6 +58,10 @@ RecommendIndexSettings _$RecommendIndexSettingsFromJson( $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -182,6 +186,9 @@ Map _$RecommendIndexSettingsToJson( if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.dart index 31a0fd795e..ba23e5db97 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.dart @@ -63,6 +63,8 @@ final class RecommendSearchParams { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -314,6 +316,14 @@ final class RecommendSearchParams { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -532,6 +542,8 @@ final class RecommendSearchParams { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -623,6 +635,8 @@ final class RecommendSearchParams { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.g.dart index 6ca014ecc0..01f13df41b 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/recommend_search_params.g.dart @@ -108,6 +108,10 @@ RecommendSearchParams _$RecommendSearchParamsFromJson( $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -271,6 +275,9 @@ Map _$RecommendSearchParamsToJson( if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart index ce07b81ea7..89de63d357 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.dart @@ -54,7 +54,6 @@ final class SearchForFacets { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -70,7 +69,6 @@ final class SearchForFacets { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -266,10 +264,6 @@ final class SearchForFacets { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -339,10 +333,6 @@ final class SearchForFacets { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -502,7 +492,6 @@ final class SearchForFacets { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -520,7 +509,6 @@ final class SearchForFacets { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -589,7 +577,6 @@ final class SearchForFacets { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -605,7 +592,6 @@ final class SearchForFacets { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart index 8bb2aa4d35..68c0d82752 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_facets.g.dart @@ -70,8 +70,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -100,8 +98,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -221,7 +217,6 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -247,8 +242,6 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart index ba28835f5a..5bc9fad13c 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.dart @@ -54,7 +54,6 @@ final class SearchForHits { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -70,7 +69,6 @@ final class SearchForHits { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -263,10 +261,6 @@ final class SearchForHits { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -336,10 +330,6 @@ final class SearchForHits { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -486,7 +476,6 @@ final class SearchForHits { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -504,7 +493,6 @@ final class SearchForHits { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -570,7 +558,6 @@ final class SearchForHits { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -586,7 +573,6 @@ final class SearchForHits { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart index f922120359..70d63813b0 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_for_hits.g.dart @@ -70,8 +70,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -100,8 +98,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -217,7 +213,6 @@ Map _$SearchForHitsToJson(SearchForHits instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -243,8 +238,6 @@ Map _$SearchForHitsToJson(SearchForHits instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart index fb4f951c13..73291b9d5e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.dart @@ -52,7 +52,6 @@ final class SearchParamsObject { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -68,7 +67,6 @@ final class SearchParamsObject { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -255,10 +253,6 @@ final class SearchParamsObject { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -328,10 +322,6 @@ final class SearchParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -470,7 +460,6 @@ final class SearchParamsObject { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -488,7 +477,6 @@ final class SearchParamsObject { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -551,7 +539,6 @@ final class SearchParamsObject { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -567,7 +554,6 @@ final class SearchParamsObject { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart index af070047a0..1d4487546e 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/search_params_object.g.dart @@ -69,8 +69,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -99,8 +97,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -212,7 +208,6 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -238,8 +233,6 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.dart index 6e330abd5f..927e7eac3a 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.dart @@ -36,9 +36,10 @@ final class SettingsResponse { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -54,7 +55,6 @@ final class SettingsResponse { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -156,6 +156,14 @@ final class SettingsResponse { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -164,10 +172,6 @@ final class SettingsResponse { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -237,10 +241,6 @@ final class SettingsResponse { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -369,9 +369,10 @@ final class SettingsResponse { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -389,7 +390,6 @@ final class SettingsResponse { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -437,9 +437,10 @@ final class SettingsResponse { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -455,7 +456,6 @@ final class SettingsResponse { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.g.dart b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.g.dart index 497156d92d..f2e37442a1 100644 --- a/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.g.dart +++ b/clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/model/settings_response.g.dart @@ -57,12 +57,14 @@ SettingsResponse _$SettingsResponseFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -91,8 +93,6 @@ SettingsResponse _$SettingsResponseFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -194,10 +194,12 @@ Map _$SettingsResponseToJson(SettingsResponse instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -223,8 +225,6 @@ Map _$SettingsResponseToJson(SettingsResponse instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.dart index f4bc591863..6b226baca2 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.dart @@ -28,6 +28,8 @@ final class BaseIndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, }); /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. @@ -104,6 +106,14 @@ final class BaseIndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + @override bool operator ==(Object other) => identical(this, other) || @@ -127,7 +137,9 @@ final class BaseIndexSettings { other.userData == userData && other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && - other.maxFacetHits == maxFacetHits; + other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking; @override int get hashCode => @@ -148,7 +160,9 @@ final class BaseIndexSettings { userData.hashCode + customNormalization.hashCode + attributeForDistinct.hashCode + - maxFacetHits.hashCode; + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode; factory BaseIndexSettings.fromJson(Map json) => _$BaseIndexSettingsFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.g.dart index 4e0257eeac..29b1134b36 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/base_index_settings.g.dart @@ -57,6 +57,10 @@ BaseIndexSettings _$BaseIndexSettingsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), ); return val; }, @@ -98,6 +102,9 @@ Map _$BaseIndexSettingsToJson(BaseIndexSettings instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, }; const _$SupportedLanguageEnumMap = { diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart index 2760dc83d5..aca5e0ef80 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.dart @@ -63,6 +63,8 @@ final class FallbackParams { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -314,6 +316,14 @@ final class FallbackParams { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -532,6 +542,8 @@ final class FallbackParams { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -623,6 +635,8 @@ final class FallbackParams { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.g.dart index d4b90dd8ae..79fb55cb62 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/fallback_params.g.dart @@ -107,6 +107,10 @@ FallbackParams _$FallbackParamsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -269,6 +273,9 @@ Map _$FallbackParamsToJson(FallbackParams instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.dart index cc0d274ebb..8ad0b3f17d 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.dart @@ -34,6 +34,8 @@ final class RecommendIndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -148,6 +150,14 @@ final class RecommendIndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -337,6 +347,8 @@ final class RecommendIndexSettings { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -399,6 +411,8 @@ final class RecommendIndexSettings { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.g.dart index 099ac372fa..437572b876 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_index_settings.g.dart @@ -58,6 +58,10 @@ RecommendIndexSettings _$RecommendIndexSettingsFromJson( $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -182,6 +186,9 @@ Map _$RecommendIndexSettingsToJson( if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.dart index 87848d10ac..7b01d2027f 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.dart @@ -63,6 +63,8 @@ final class RecommendSearchParams { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, this.relevancyStrictness, @@ -314,6 +316,14 @@ final class RecommendSearchParams { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -532,6 +542,8 @@ final class RecommendSearchParams { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && other.relevancyStrictness == relevancyStrictness && @@ -623,6 +635,8 @@ final class RecommendSearchParams { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + relevancyStrictness.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.g.dart index 6ca014ecc0..01f13df41b 100644 --- a/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_recommend/lib/src/model/recommend_search_params.g.dart @@ -108,6 +108,10 @@ RecommendSearchParams _$RecommendSearchParamsFromJson( $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', @@ -271,6 +275,9 @@ Map _$RecommendSearchParamsToJson( if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart index ab405f0455..8defd6fef5 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.dart @@ -28,6 +28,8 @@ final class BaseIndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, }); /// Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. @@ -104,6 +106,14 @@ final class BaseIndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + @override bool operator ==(Object other) => identical(this, other) || @@ -127,7 +137,9 @@ final class BaseIndexSettings { other.userData == userData && other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && - other.maxFacetHits == maxFacetHits; + other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking; @override int get hashCode => @@ -148,7 +160,9 @@ final class BaseIndexSettings { userData.hashCode + customNormalization.hashCode + attributeForDistinct.hashCode + - maxFacetHits.hashCode; + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode; factory BaseIndexSettings.fromJson(Map json) => _$BaseIndexSettingsFromJson(json); diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart index 4e0257eeac..29b1134b36 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/base_index_settings.g.dart @@ -57,6 +57,10 @@ BaseIndexSettings _$BaseIndexSettingsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), ); return val; }, @@ -98,6 +102,9 @@ Map _$BaseIndexSettingsToJson(BaseIndexSettings instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, }; const _$SupportedLanguageEnumMap = { diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart index 5625ddc6b9..3ac581225a 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.dart @@ -52,7 +52,6 @@ final class BrowseParamsObject { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -68,7 +67,6 @@ final class BrowseParamsObject { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -256,10 +254,6 @@ final class BrowseParamsObject { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -329,10 +323,6 @@ final class BrowseParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -475,7 +465,6 @@ final class BrowseParamsObject { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -493,7 +482,6 @@ final class BrowseParamsObject { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -557,7 +545,6 @@ final class BrowseParamsObject { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -573,7 +560,6 @@ final class BrowseParamsObject { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart index 11885620e3..c0e6e46ecf 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/browse_params_object.g.dart @@ -69,8 +69,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -99,8 +97,6 @@ BrowseParamsObject _$BrowseParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -213,7 +209,6 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -239,8 +234,6 @@ Map _$BrowseParamsObjectToJson(BrowseParamsObject instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart index b818dfaace..e2b1695232 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.dart @@ -51,7 +51,6 @@ final class ConsequenceParams { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -67,7 +66,6 @@ final class ConsequenceParams { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -253,10 +251,6 @@ final class ConsequenceParams { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -326,10 +320,6 @@ final class ConsequenceParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -485,7 +475,6 @@ final class ConsequenceParams { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -503,7 +492,6 @@ final class ConsequenceParams { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -568,7 +556,6 @@ final class ConsequenceParams { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -584,7 +571,6 @@ final class ConsequenceParams { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart index 065434f432..cf51274957 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/consequence_params.g.dart @@ -68,8 +68,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -98,8 +96,6 @@ ConsequenceParams _$ConsequenceParamsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -215,7 +211,6 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -241,8 +236,6 @@ Map _$ConsequenceParamsToJson(ConsequenceParams instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart index 21f010e98e..d1e9780dbc 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.dart @@ -36,9 +36,10 @@ final class IndexSettings { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -54,7 +55,6 @@ final class IndexSettings { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -155,6 +155,14 @@ final class IndexSettings { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -163,10 +171,6 @@ final class IndexSettings { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -236,10 +240,6 @@ final class IndexSettings { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -364,9 +364,10 @@ final class IndexSettings { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -384,7 +385,6 @@ final class IndexSettings { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -431,9 +431,10 @@ final class IndexSettings { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -449,7 +450,6 @@ final class IndexSettings { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart index 083b83674d..3234f2dc0f 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings.g.dart @@ -57,12 +57,14 @@ IndexSettings _$IndexSettingsFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -91,8 +93,6 @@ IndexSettings _$IndexSettingsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -193,10 +193,12 @@ Map _$IndexSettingsToJson(IndexSettings instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -222,8 +224,6 @@ Map _$IndexSettingsToJson(IndexSettings instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart index 4c8cdfe79b..7750971304 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.dart @@ -20,7 +20,6 @@ final class IndexSettingsAsSearchParams { const IndexSettingsAsSearchParams({ this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -36,7 +35,6 @@ final class IndexSettingsAsSearchParams { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -71,10 +69,6 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -144,10 +138,6 @@ final class IndexSettingsAsSearchParams { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -254,7 +244,6 @@ final class IndexSettingsAsSearchParams { other is IndexSettingsAsSearchParams && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -272,7 +261,6 @@ final class IndexSettingsAsSearchParams { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -303,7 +291,6 @@ final class IndexSettingsAsSearchParams { int get hashCode => attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -319,7 +306,6 @@ final class IndexSettingsAsSearchParams { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart index 6645b6d22d..2c7f9b26b3 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/index_settings_as_search_params.g.dart @@ -17,8 +17,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -47,8 +45,6 @@ IndexSettingsAsSearchParams _$IndexSettingsAsSearchParamsFromJson( (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -119,7 +115,6 @@ Map _$IndexSettingsAsSearchParamsToJson( if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -145,8 +140,6 @@ Map _$IndexSettingsAsSearchParamsToJson( 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart index c97e484725..a409a36416 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.dart @@ -54,7 +54,6 @@ final class SearchForFacets { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -70,7 +69,6 @@ final class SearchForFacets { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -266,10 +264,6 @@ final class SearchForFacets { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -339,10 +333,6 @@ final class SearchForFacets { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -502,7 +492,6 @@ final class SearchForFacets { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -520,7 +509,6 @@ final class SearchForFacets { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -589,7 +577,6 @@ final class SearchForFacets { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -605,7 +592,6 @@ final class SearchForFacets { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart index 8bb2aa4d35..68c0d82752 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_facets.g.dart @@ -70,8 +70,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -100,8 +98,6 @@ SearchForFacets _$SearchForFacetsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -221,7 +217,6 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -247,8 +242,6 @@ Map _$SearchForFacetsToJson(SearchForFacets instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart index 1c8da98569..b9d9aea41c 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.dart @@ -54,7 +54,6 @@ final class SearchForHits { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -70,7 +69,6 @@ final class SearchForHits { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -263,10 +261,6 @@ final class SearchForHits { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -336,10 +330,6 @@ final class SearchForHits { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -486,7 +476,6 @@ final class SearchForHits { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -504,7 +493,6 @@ final class SearchForHits { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -570,7 +558,6 @@ final class SearchForHits { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -586,7 +573,6 @@ final class SearchForHits { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart index f922120359..70d63813b0 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_for_hits.g.dart @@ -70,8 +70,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -100,8 +98,6 @@ SearchForHits _$SearchForHitsFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -217,7 +213,6 @@ Map _$SearchForHitsToJson(SearchForHits instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -243,8 +238,6 @@ Map _$SearchForHitsToJson(SearchForHits instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart index 9872e6a48e..8af29f956b 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.dart @@ -52,7 +52,6 @@ final class SearchParamsObject { this.enableABTest, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -68,7 +67,6 @@ final class SearchParamsObject { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -255,10 +253,6 @@ final class SearchParamsObject { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -328,10 +322,6 @@ final class SearchParamsObject { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -470,7 +460,6 @@ final class SearchParamsObject { other.enableABTest == enableABTest && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -488,7 +477,6 @@ final class SearchParamsObject { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -551,7 +539,6 @@ final class SearchParamsObject { enableABTest.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -567,7 +554,6 @@ final class SearchParamsObject { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart index af070047a0..1d4487546e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/search_params_object.g.dart @@ -69,8 +69,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -99,8 +97,6 @@ SearchParamsObject _$SearchParamsObjectFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -212,7 +208,6 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) => if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -238,8 +233,6 @@ Map _$SearchParamsObjectToJson(SearchParamsObject instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.dart index 8897baf2d5..bb0cdae39e 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.dart @@ -36,9 +36,10 @@ final class SettingsResponse { this.customNormalization, this.attributeForDistinct, this.maxFacetHits, + this.keepDiacriticsOnCharacters, + this.customRanking, this.attributesToRetrieve, this.ranking, - this.customRanking, this.relevancyStrictness, this.attributesToHighlight, this.attributesToSnippet, @@ -54,7 +55,6 @@ final class SettingsResponse { this.disableTypoToleranceOnAttributes, this.ignorePlurals, this.removeStopWords, - this.keepDiacriticsOnCharacters, this.queryLanguages, this.decompoundQuery, this.enableRules, @@ -156,6 +156,14 @@ final class SettingsResponse { @JsonKey(name: r'maxFacetHits') final int? maxFacetHits; + /// 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. + @JsonKey(name: r'keepDiacriticsOnCharacters') + final String? keepDiacriticsOnCharacters; + + /// 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. + @JsonKey(name: r'customRanking') + final List? customRanking; + /// 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. @JsonKey(name: r'attributesToRetrieve') final List? attributesToRetrieve; @@ -164,10 +172,6 @@ final class SettingsResponse { @JsonKey(name: r'ranking') final List? 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. - @JsonKey(name: r'customRanking') - final List? customRanking; - /// 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. @JsonKey(name: r'relevancyStrictness') final int? relevancyStrictness; @@ -237,10 +241,6 @@ final class SettingsResponse { @JsonKey(name: r'removeStopWords') final dynamic removeStopWords; - /// 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. - @JsonKey(name: r'keepDiacriticsOnCharacters') - final String? keepDiacriticsOnCharacters; - /// 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/). @JsonKey(name: r'queryLanguages') final List? queryLanguages; @@ -369,9 +369,10 @@ final class SettingsResponse { other.customNormalization == customNormalization && other.attributeForDistinct == attributeForDistinct && other.maxFacetHits == maxFacetHits && + other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && + other.customRanking == customRanking && other.attributesToRetrieve == attributesToRetrieve && other.ranking == ranking && - other.customRanking == customRanking && other.relevancyStrictness == relevancyStrictness && other.attributesToHighlight == attributesToHighlight && other.attributesToSnippet == attributesToSnippet && @@ -389,7 +390,6 @@ final class SettingsResponse { disableTypoToleranceOnAttributes && other.ignorePlurals == ignorePlurals && other.removeStopWords == removeStopWords && - other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters && other.queryLanguages == queryLanguages && other.decompoundQuery == decompoundQuery && other.enableRules == enableRules && @@ -437,9 +437,10 @@ final class SettingsResponse { customNormalization.hashCode + attributeForDistinct.hashCode + maxFacetHits.hashCode + + keepDiacriticsOnCharacters.hashCode + + customRanking.hashCode + attributesToRetrieve.hashCode + ranking.hashCode + - customRanking.hashCode + relevancyStrictness.hashCode + attributesToHighlight.hashCode + attributesToSnippet.hashCode + @@ -455,7 +456,6 @@ final class SettingsResponse { disableTypoToleranceOnAttributes.hashCode + ignorePlurals.hashCode + removeStopWords.hashCode + - keepDiacriticsOnCharacters.hashCode + queryLanguages.hashCode + decompoundQuery.hashCode + enableRules.hashCode + diff --git a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.g.dart b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.g.dart index 497156d92d..f2e37442a1 100644 --- a/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.g.dart +++ b/clients/algoliasearch-client-dart/packages/client_search/lib/src/model/settings_response.g.dart @@ -57,12 +57,14 @@ SettingsResponse _$SettingsResponseFromJson(Map json) => $checkedConvert('attributeForDistinct', (v) => v as String?), maxFacetHits: $checkedConvert('maxFacetHits', (v) => (v as num?)?.toInt()), + keepDiacriticsOnCharacters: $checkedConvert( + 'keepDiacriticsOnCharacters', (v) => v as String?), + customRanking: $checkedConvert('customRanking', + (v) => (v as List?)?.map((e) => e as String).toList()), attributesToRetrieve: $checkedConvert('attributesToRetrieve', (v) => (v as List?)?.map((e) => e as String).toList()), ranking: $checkedConvert('ranking', (v) => (v as List?)?.map((e) => e as String).toList()), - customRanking: $checkedConvert('customRanking', - (v) => (v as List?)?.map((e) => e as String).toList()), relevancyStrictness: $checkedConvert( 'relevancyStrictness', (v) => (v as num?)?.toInt()), attributesToHighlight: $checkedConvert('attributesToHighlight', @@ -91,8 +93,6 @@ SettingsResponse _$SettingsResponseFromJson(Map json) => (v) => (v as List?)?.map((e) => e as String).toList()), ignorePlurals: $checkedConvert('ignorePlurals', (v) => v), removeStopWords: $checkedConvert('removeStopWords', (v) => v), - keepDiacriticsOnCharacters: $checkedConvert( - 'keepDiacriticsOnCharacters', (v) => v as String?), queryLanguages: $checkedConvert( 'queryLanguages', (v) => (v as List?) @@ -194,10 +194,12 @@ Map _$SettingsResponseToJson(SettingsResponse instance) => if (instance.attributeForDistinct case final value?) 'attributeForDistinct': value, if (instance.maxFacetHits case final value?) 'maxFacetHits': value, + if (instance.keepDiacriticsOnCharacters case final value?) + 'keepDiacriticsOnCharacters': value, + if (instance.customRanking case final value?) 'customRanking': value, if (instance.attributesToRetrieve case final value?) 'attributesToRetrieve': value, if (instance.ranking case final value?) 'ranking': value, - if (instance.customRanking case final value?) 'customRanking': value, if (instance.relevancyStrictness case final value?) 'relevancyStrictness': value, if (instance.attributesToHighlight case final value?) @@ -223,8 +225,6 @@ Map _$SettingsResponseToJson(SettingsResponse instance) => 'disableTypoToleranceOnAttributes': value, if (instance.ignorePlurals case final value?) 'ignorePlurals': value, if (instance.removeStopWords case final value?) 'removeStopWords': value, - if (instance.keepDiacriticsOnCharacters case final value?) - 'keepDiacriticsOnCharacters': value, if (instance.queryLanguages?.map((e) => e.toJson()).toList() case final value?) 'queryLanguages': value, diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_fallback_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_fallback_params.go index e0343a4923..1827572393 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_fallback_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_fallback_params.go @@ -97,6 +97,10 @@ type FallbackParams struct { AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` // 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). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` + // 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. + KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` + // 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. + CustomRanking []string `json:"customRanking,omitempty"` // 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. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). @@ -449,6 +453,18 @@ func WithFallbackParamsMaxFacetHits(val int32) FallbackParamsOption { } } +func WithFallbackParamsKeepDiacriticsOnCharacters(val string) FallbackParamsOption { + return func(f *FallbackParams) { + f.KeepDiacriticsOnCharacters = &val + } +} + +func WithFallbackParamsCustomRanking(val []string) FallbackParamsOption { + return func(f *FallbackParams) { + f.CustomRanking = val + } +} + func WithFallbackParamsAttributesToRetrieve(val []string) FallbackParamsOption { return func(f *FallbackParams) { f.AttributesToRetrieve = val @@ -2256,6 +2272,72 @@ func (o *FallbackParams) SetMaxFacetHits(v int32) *FallbackParams { return o } +// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. +func (o *FallbackParams) GetKeepDiacriticsOnCharacters() string { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + var ret string + return ret + } + return *o.KeepDiacriticsOnCharacters +} + +// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FallbackParams) GetKeepDiacriticsOnCharactersOk() (*string, bool) { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + return nil, false + } + return o.KeepDiacriticsOnCharacters, true +} + +// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. +func (o *FallbackParams) HasKeepDiacriticsOnCharacters() bool { + if o != nil && o.KeepDiacriticsOnCharacters != nil { + return true + } + + return false +} + +// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. +func (o *FallbackParams) SetKeepDiacriticsOnCharacters(v string) *FallbackParams { + o.KeepDiacriticsOnCharacters = &v + return o +} + +// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. +func (o *FallbackParams) GetCustomRanking() []string { + if o == nil || o.CustomRanking == nil { + var ret []string + return ret + } + return o.CustomRanking +} + +// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FallbackParams) GetCustomRankingOk() ([]string, bool) { + if o == nil || o.CustomRanking == nil { + return nil, false + } + return o.CustomRanking, true +} + +// HasCustomRanking returns a boolean if a field has been set. +func (o *FallbackParams) HasCustomRanking() bool { + if o != nil && o.CustomRanking != nil { + return true + } + + return false +} + +// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. +func (o *FallbackParams) SetCustomRanking(v []string) *FallbackParams { + o.CustomRanking = v + return o +} + // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *FallbackParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3664,6 +3746,12 @@ func (o FallbackParams) MarshalJSON() ([]byte, error) { if o.MaxFacetHits != nil { toSerialize["maxFacetHits"] = o.MaxFacetHits } + if o.KeepDiacriticsOnCharacters != nil { + toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters + } + if o.CustomRanking != nil { + toSerialize["customRanking"] = o.CustomRanking + } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3835,6 +3923,8 @@ func (o FallbackParams) String() string { out += fmt.Sprintf(" customNormalization=%v\n", o.CustomNormalization) out += fmt.Sprintf(" attributeForDistinct=%v\n", o.AttributeForDistinct) out += fmt.Sprintf(" maxFacetHits=%v\n", o.MaxFacetHits) + out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) + out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) diff --git a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_search_params.go b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_search_params.go index 7d5a125cf6..523879f847 100644 --- a/clients/algoliasearch-client-go/algolia/recommend/model_recommend_search_params.go +++ b/clients/algoliasearch-client-go/algolia/recommend/model_recommend_search_params.go @@ -97,6 +97,10 @@ type RecommendSearchParams struct { AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` // 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). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` + // 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. + KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` + // 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. + CustomRanking []string `json:"customRanking,omitempty"` // 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. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). @@ -449,6 +453,18 @@ func WithRecommendSearchParamsMaxFacetHits(val int32) RecommendSearchParamsOptio } } +func WithRecommendSearchParamsKeepDiacriticsOnCharacters(val string) RecommendSearchParamsOption { + return func(f *RecommendSearchParams) { + f.KeepDiacriticsOnCharacters = &val + } +} + +func WithRecommendSearchParamsCustomRanking(val []string) RecommendSearchParamsOption { + return func(f *RecommendSearchParams) { + f.CustomRanking = val + } +} + func WithRecommendSearchParamsAttributesToRetrieve(val []string) RecommendSearchParamsOption { return func(f *RecommendSearchParams) { f.AttributesToRetrieve = val @@ -2256,6 +2272,72 @@ func (o *RecommendSearchParams) SetMaxFacetHits(v int32) *RecommendSearchParams return o } +// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. +func (o *RecommendSearchParams) GetKeepDiacriticsOnCharacters() string { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + var ret string + return ret + } + return *o.KeepDiacriticsOnCharacters +} + +// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecommendSearchParams) GetKeepDiacriticsOnCharactersOk() (*string, bool) { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + return nil, false + } + return o.KeepDiacriticsOnCharacters, true +} + +// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. +func (o *RecommendSearchParams) HasKeepDiacriticsOnCharacters() bool { + if o != nil && o.KeepDiacriticsOnCharacters != nil { + return true + } + + return false +} + +// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. +func (o *RecommendSearchParams) SetKeepDiacriticsOnCharacters(v string) *RecommendSearchParams { + o.KeepDiacriticsOnCharacters = &v + return o +} + +// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. +func (o *RecommendSearchParams) GetCustomRanking() []string { + if o == nil || o.CustomRanking == nil { + var ret []string + return ret + } + return o.CustomRanking +} + +// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecommendSearchParams) GetCustomRankingOk() ([]string, bool) { + if o == nil || o.CustomRanking == nil { + return nil, false + } + return o.CustomRanking, true +} + +// HasCustomRanking returns a boolean if a field has been set. +func (o *RecommendSearchParams) HasCustomRanking() bool { + if o != nil && o.CustomRanking != nil { + return true + } + + return false +} + +// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. +func (o *RecommendSearchParams) SetCustomRanking(v []string) *RecommendSearchParams { + o.CustomRanking = v + return o +} + // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *RecommendSearchParams) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -3664,6 +3746,12 @@ func (o RecommendSearchParams) MarshalJSON() ([]byte, error) { if o.MaxFacetHits != nil { toSerialize["maxFacetHits"] = o.MaxFacetHits } + if o.KeepDiacriticsOnCharacters != nil { + toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters + } + if o.CustomRanking != nil { + toSerialize["customRanking"] = o.CustomRanking + } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } @@ -3835,6 +3923,8 @@ func (o RecommendSearchParams) String() string { out += fmt.Sprintf(" customNormalization=%v\n", o.CustomNormalization) out += fmt.Sprintf(" attributeForDistinct=%v\n", o.AttributeForDistinct) out += fmt.Sprintf(" maxFacetHits=%v\n", o.MaxFacetHits) + out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) + out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) diff --git a/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go b/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go index de963f3b69..13588a708c 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go +++ b/clients/algoliasearch-client-go/algolia/search/model_browse_params_object.go @@ -71,8 +71,6 @@ type BrowseParamsObject struct { AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -100,8 +98,6 @@ type BrowseParamsObject struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -351,12 +347,6 @@ func WithBrowseParamsObjectRanking(val []string) BrowseParamsObjectOption { } } -func WithBrowseParamsObjectCustomRanking(val []string) BrowseParamsObjectOption { - return func(f *BrowseParamsObject) { - f.CustomRanking = val - } -} - func WithBrowseParamsObjectRelevancyStrictness(val int32) BrowseParamsObjectOption { return func(f *BrowseParamsObject) { f.RelevancyStrictness = &val @@ -447,12 +437,6 @@ func WithBrowseParamsObjectRemoveStopWords(val RemoveStopWords) BrowseParamsObje } } -func WithBrowseParamsObjectKeepDiacriticsOnCharacters(val string) BrowseParamsObjectOption { - return func(f *BrowseParamsObject) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithBrowseParamsObjectQueryLanguages(val []SupportedLanguage) BrowseParamsObjectOption { return func(f *BrowseParamsObject) { f.QueryLanguages = val @@ -1753,39 +1737,6 @@ func (o *BrowseParamsObject) SetRanking(v []string) *BrowseParamsObject { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *BrowseParamsObject) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BrowseParamsObject) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *BrowseParamsObject) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *BrowseParamsObject) SetCustomRanking(v []string) *BrowseParamsObject { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *BrowseParamsObject) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -2281,39 +2232,6 @@ func (o *BrowseParamsObject) SetRemoveStopWords(v *RemoveStopWords) *BrowseParam return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *BrowseParamsObject) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *BrowseParamsObject) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *BrowseParamsObject) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *BrowseParamsObject) SetKeepDiacriticsOnCharacters(v string) *BrowseParamsObject { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *BrowseParamsObject) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -3254,9 +3172,6 @@ func (o BrowseParamsObject) MarshalJSON() ([]byte, error) { if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -3302,9 +3217,6 @@ func (o BrowseParamsObject) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -3424,7 +3336,6 @@ func (o BrowseParamsObject) String() string { out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -3440,7 +3351,6 @@ func (o BrowseParamsObject) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go b/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go index 8e58ff2cbf..13ce825326 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go +++ b/clients/algoliasearch-client-go/algolia/search/model_consequence_params.go @@ -69,8 +69,6 @@ type ConsequenceParams struct { AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -98,8 +96,6 @@ type ConsequenceParams struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -344,12 +340,6 @@ func WithConsequenceParamsRanking(val []string) ConsequenceParamsOption { } } -func WithConsequenceParamsCustomRanking(val []string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.CustomRanking = val - } -} - func WithConsequenceParamsRelevancyStrictness(val int32) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.RelevancyStrictness = &val @@ -440,12 +430,6 @@ func WithConsequenceParamsRemoveStopWords(val RemoveStopWords) ConsequenceParams } } -func WithConsequenceParamsKeepDiacriticsOnCharacters(val string) ConsequenceParamsOption { - return func(f *ConsequenceParams) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithConsequenceParamsQueryLanguages(val []SupportedLanguage) ConsequenceParamsOption { return func(f *ConsequenceParams) { f.QueryLanguages = val @@ -1725,39 +1709,6 @@ func (o *ConsequenceParams) SetRanking(v []string) *ConsequenceParams { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *ConsequenceParams) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *ConsequenceParams) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *ConsequenceParams) SetCustomRanking(v []string) *ConsequenceParams { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *ConsequenceParams) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -2253,39 +2204,6 @@ func (o *ConsequenceParams) SetRemoveStopWords(v *RemoveStopWords) *ConsequenceP return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *ConsequenceParams) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ConsequenceParams) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *ConsequenceParams) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *ConsequenceParams) SetKeepDiacriticsOnCharacters(v string) *ConsequenceParams { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *ConsequenceParams) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -3289,9 +3207,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -3337,9 +3252,6 @@ func (o ConsequenceParams) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -3464,7 +3376,6 @@ func (o ConsequenceParams) String() string { out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -3480,7 +3391,6 @@ func (o ConsequenceParams) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_index_settings.go b/clients/algoliasearch-client-go/algolia/search/model_index_settings.go index d1ce606842..70b86686ab 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_index_settings.go +++ b/clients/algoliasearch-client-go/algolia/search/model_index_settings.go @@ -46,12 +46,14 @@ type IndexSettings struct { AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` // 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). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` + // 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. + KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` + // 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. + CustomRanking []string `json:"customRanking,omitempty"` // 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. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -79,8 +81,6 @@ type IndexSettings struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -232,21 +232,27 @@ func WithIndexSettingsMaxFacetHits(val int32) IndexSettingsOption { } } -func WithIndexSettingsAttributesToRetrieve(val []string) IndexSettingsOption { +func WithIndexSettingsKeepDiacriticsOnCharacters(val string) IndexSettingsOption { return func(f *IndexSettings) { - f.AttributesToRetrieve = val + f.KeepDiacriticsOnCharacters = &val } } -func WithIndexSettingsRanking(val []string) IndexSettingsOption { +func WithIndexSettingsCustomRanking(val []string) IndexSettingsOption { return func(f *IndexSettings) { - f.Ranking = val + f.CustomRanking = val } } -func WithIndexSettingsCustomRanking(val []string) IndexSettingsOption { +func WithIndexSettingsAttributesToRetrieve(val []string) IndexSettingsOption { return func(f *IndexSettings) { - f.CustomRanking = val + f.AttributesToRetrieve = val + } +} + +func WithIndexSettingsRanking(val []string) IndexSettingsOption { + return func(f *IndexSettings) { + f.Ranking = val } } @@ -340,12 +346,6 @@ func WithIndexSettingsRemoveStopWords(val RemoveStopWords) IndexSettingsOption { } } -func WithIndexSettingsKeepDiacriticsOnCharacters(val string) IndexSettingsOption { - return func(f *IndexSettings) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithIndexSettingsQueryLanguages(val []SupportedLanguage) IndexSettingsOption { return func(f *IndexSettings) { f.QueryLanguages = val @@ -1101,6 +1101,72 @@ func (o *IndexSettings) SetMaxFacetHits(v int32) *IndexSettings { return o } +// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. +func (o *IndexSettings) GetKeepDiacriticsOnCharacters() string { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + var ret string + return ret + } + return *o.KeepDiacriticsOnCharacters +} + +// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndexSettings) GetKeepDiacriticsOnCharactersOk() (*string, bool) { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + return nil, false + } + return o.KeepDiacriticsOnCharacters, true +} + +// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. +func (o *IndexSettings) HasKeepDiacriticsOnCharacters() bool { + if o != nil && o.KeepDiacriticsOnCharacters != nil { + return true + } + + return false +} + +// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. +func (o *IndexSettings) SetKeepDiacriticsOnCharacters(v string) *IndexSettings { + o.KeepDiacriticsOnCharacters = &v + return o +} + +// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. +func (o *IndexSettings) GetCustomRanking() []string { + if o == nil || o.CustomRanking == nil { + var ret []string + return ret + } + return o.CustomRanking +} + +// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndexSettings) GetCustomRankingOk() ([]string, bool) { + if o == nil || o.CustomRanking == nil { + return nil, false + } + return o.CustomRanking, true +} + +// HasCustomRanking returns a boolean if a field has been set. +func (o *IndexSettings) HasCustomRanking() bool { + if o != nil && o.CustomRanking != nil { + return true + } + + return false +} + +// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. +func (o *IndexSettings) SetCustomRanking(v []string) *IndexSettings { + o.CustomRanking = v + return o +} + // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *IndexSettings) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -1167,39 +1233,6 @@ func (o *IndexSettings) SetRanking(v []string) *IndexSettings { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *IndexSettings) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexSettings) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *IndexSettings) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *IndexSettings) SetCustomRanking(v []string) *IndexSettings { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *IndexSettings) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -1695,39 +1728,6 @@ func (o *IndexSettings) SetRemoveStopWords(v *RemoveStopWords) *IndexSettings { return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *IndexSettings) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndexSettings) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *IndexSettings) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *IndexSettings) SetKeepDiacriticsOnCharacters(v string) *IndexSettings { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *IndexSettings) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -2587,15 +2587,18 @@ func (o IndexSettings) MarshalJSON() ([]byte, error) { if o.MaxFacetHits != nil { toSerialize["maxFacetHits"] = o.MaxFacetHits } + if o.KeepDiacriticsOnCharacters != nil { + toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters + } + if o.CustomRanking != nil { + toSerialize["customRanking"] = o.CustomRanking + } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -2641,9 +2644,6 @@ func (o IndexSettings) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -2744,9 +2744,10 @@ func (o IndexSettings) String() string { out += fmt.Sprintf(" customNormalization=%v\n", o.CustomNormalization) out += fmt.Sprintf(" attributeForDistinct=%v\n", o.AttributeForDistinct) out += fmt.Sprintf(" maxFacetHits=%v\n", o.MaxFacetHits) + out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) + out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -2762,7 +2763,6 @@ func (o IndexSettings) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go index 83a95637b4..57077513f0 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_facets.go @@ -73,8 +73,6 @@ type SearchForFacets struct { AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -102,8 +100,6 @@ type SearchForFacets struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -366,12 +362,6 @@ func WithSearchForFacetsRanking(val []string) SearchForFacetsOption { } } -func WithSearchForFacetsCustomRanking(val []string) SearchForFacetsOption { - return func(f *SearchForFacets) { - f.CustomRanking = val - } -} - func WithSearchForFacetsRelevancyStrictness(val int32) SearchForFacetsOption { return func(f *SearchForFacets) { f.RelevancyStrictness = &val @@ -462,12 +452,6 @@ func WithSearchForFacetsRemoveStopWords(val RemoveStopWords) SearchForFacetsOpti } } -func WithSearchForFacetsKeepDiacriticsOnCharacters(val string) SearchForFacetsOption { - return func(f *SearchForFacets) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithSearchForFacetsQueryLanguages(val []SupportedLanguage) SearchForFacetsOption { return func(f *SearchForFacets) { f.QueryLanguages = val @@ -1810,39 +1794,6 @@ func (o *SearchForFacets) SetRanking(v []string) *SearchForFacets { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *SearchForFacets) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForFacets) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *SearchForFacets) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *SearchForFacets) SetCustomRanking(v []string) *SearchForFacets { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *SearchForFacets) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -2338,39 +2289,6 @@ func (o *SearchForFacets) SetRemoveStopWords(v *RemoveStopWords) *SearchForFacet return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *SearchForFacets) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForFacets) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *SearchForFacets) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *SearchForFacets) SetKeepDiacriticsOnCharacters(v string) *SearchForFacets { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *SearchForFacets) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -3422,9 +3340,6 @@ func (o SearchForFacets) MarshalJSON() ([]byte, error) { if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -3470,9 +3385,6 @@ func (o SearchForFacets) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -3605,7 +3517,6 @@ func (o SearchForFacets) String() string { out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -3621,7 +3532,6 @@ func (o SearchForFacets) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go index ae45495f46..5e9a0d3d88 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_for_hits.go @@ -73,8 +73,6 @@ type SearchForHits struct { AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -102,8 +100,6 @@ type SearchForHits struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -360,12 +356,6 @@ func WithSearchForHitsRanking(val []string) SearchForHitsOption { } } -func WithSearchForHitsCustomRanking(val []string) SearchForHitsOption { - return func(f *SearchForHits) { - f.CustomRanking = val - } -} - func WithSearchForHitsRelevancyStrictness(val int32) SearchForHitsOption { return func(f *SearchForHits) { f.RelevancyStrictness = &val @@ -456,12 +446,6 @@ func WithSearchForHitsRemoveStopWords(val RemoveStopWords) SearchForHitsOption { } } -func WithSearchForHitsKeepDiacriticsOnCharacters(val string) SearchForHitsOption { - return func(f *SearchForHits) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithSearchForHitsQueryLanguages(val []SupportedLanguage) SearchForHitsOption { return func(f *SearchForHits) { f.QueryLanguages = val @@ -1796,39 +1780,6 @@ func (o *SearchForHits) SetRanking(v []string) *SearchForHits { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *SearchForHits) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForHits) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *SearchForHits) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *SearchForHits) SetCustomRanking(v []string) *SearchForHits { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *SearchForHits) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -2324,39 +2275,6 @@ func (o *SearchForHits) SetRemoveStopWords(v *RemoveStopWords) *SearchForHits { return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *SearchForHits) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchForHits) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *SearchForHits) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *SearchForHits) SetKeepDiacriticsOnCharacters(v string) *SearchForHits { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *SearchForHits) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -3325,9 +3243,6 @@ func (o SearchForHits) MarshalJSON() ([]byte, error) { if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -3373,9 +3288,6 @@ func (o SearchForHits) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -3499,7 +3411,6 @@ func (o SearchForHits) String() string { out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -3515,7 +3426,6 @@ func (o SearchForHits) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go b/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go index 51a3e98aa4..d0f5c9097f 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go +++ b/clients/algoliasearch-client-go/algolia/search/model_search_params_object.go @@ -71,8 +71,6 @@ type SearchParamsObject struct { AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -100,8 +98,6 @@ type SearchParamsObject struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -349,12 +345,6 @@ func WithSearchParamsObjectRanking(val []string) SearchParamsObjectOption { } } -func WithSearchParamsObjectCustomRanking(val []string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.CustomRanking = val - } -} - func WithSearchParamsObjectRelevancyStrictness(val int32) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.RelevancyStrictness = &val @@ -445,12 +435,6 @@ func WithSearchParamsObjectRemoveStopWords(val RemoveStopWords) SearchParamsObje } } -func WithSearchParamsObjectKeepDiacriticsOnCharacters(val string) SearchParamsObjectOption { - return func(f *SearchParamsObject) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithSearchParamsObjectQueryLanguages(val []SupportedLanguage) SearchParamsObjectOption { return func(f *SearchParamsObject) { f.QueryLanguages = val @@ -1745,39 +1729,6 @@ func (o *SearchParamsObject) SetRanking(v []string) *SearchParamsObject { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *SearchParamsObject) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *SearchParamsObject) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *SearchParamsObject) SetCustomRanking(v []string) *SearchParamsObject { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *SearchParamsObject) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -2273,39 +2224,6 @@ func (o *SearchParamsObject) SetRemoveStopWords(v *RemoveStopWords) *SearchParam return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *SearchParamsObject) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SearchParamsObject) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *SearchParamsObject) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *SearchParamsObject) SetKeepDiacriticsOnCharacters(v string) *SearchParamsObject { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *SearchParamsObject) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -3213,9 +3131,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -3261,9 +3176,6 @@ func (o SearchParamsObject) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -3380,7 +3292,6 @@ func (o SearchParamsObject) String() string { out += fmt.Sprintf(" enableABTest=%v\n", o.EnableABTest) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -3396,7 +3307,6 @@ func (o SearchParamsObject) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-go/algolia/search/model_settings_response.go b/clients/algoliasearch-client-go/algolia/search/model_settings_response.go index 483f1e8c3b..4e5bd6df21 100644 --- a/clients/algoliasearch-client-go/algolia/search/model_settings_response.go +++ b/clients/algoliasearch-client-go/algolia/search/model_settings_response.go @@ -46,12 +46,14 @@ type SettingsResponse struct { AttributeForDistinct *string `json:"attributeForDistinct,omitempty"` // 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). MaxFacetHits *int32 `json:"maxFacetHits,omitempty"` + // 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. + KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` + // 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. + CustomRanking []string `json:"customRanking,omitempty"` // 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. AttributesToRetrieve []string `json:"attributesToRetrieve,omitempty"` // 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/). Ranking []string `json:"ranking,omitempty"` - // 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. - CustomRanking []string `json:"customRanking,omitempty"` // 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. RelevancyStrictness *int32 `json:"relevancyStrictness,omitempty"` // Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). @@ -79,8 +81,6 @@ type SettingsResponse struct { DisableTypoToleranceOnAttributes []string `json:"disableTypoToleranceOnAttributes,omitempty"` IgnorePlurals *IgnorePlurals `json:"ignorePlurals,omitempty"` RemoveStopWords *RemoveStopWords `json:"removeStopWords,omitempty"` - // 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. - KeepDiacriticsOnCharacters *string `json:"keepDiacriticsOnCharacters,omitempty"` // 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/). QueryLanguages []SupportedLanguage `json:"queryLanguages,omitempty"` // Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). @@ -234,21 +234,27 @@ func WithSettingsResponseMaxFacetHits(val int32) SettingsResponseOption { } } -func WithSettingsResponseAttributesToRetrieve(val []string) SettingsResponseOption { +func WithSettingsResponseKeepDiacriticsOnCharacters(val string) SettingsResponseOption { return func(f *SettingsResponse) { - f.AttributesToRetrieve = val + f.KeepDiacriticsOnCharacters = &val } } -func WithSettingsResponseRanking(val []string) SettingsResponseOption { +func WithSettingsResponseCustomRanking(val []string) SettingsResponseOption { return func(f *SettingsResponse) { - f.Ranking = val + f.CustomRanking = val } } -func WithSettingsResponseCustomRanking(val []string) SettingsResponseOption { +func WithSettingsResponseAttributesToRetrieve(val []string) SettingsResponseOption { return func(f *SettingsResponse) { - f.CustomRanking = val + f.AttributesToRetrieve = val + } +} + +func WithSettingsResponseRanking(val []string) SettingsResponseOption { + return func(f *SettingsResponse) { + f.Ranking = val } } @@ -342,12 +348,6 @@ func WithSettingsResponseRemoveStopWords(val RemoveStopWords) SettingsResponseOp } } -func WithSettingsResponseKeepDiacriticsOnCharacters(val string) SettingsResponseOption { - return func(f *SettingsResponse) { - f.KeepDiacriticsOnCharacters = &val - } -} - func WithSettingsResponseQueryLanguages(val []SupportedLanguage) SettingsResponseOption { return func(f *SettingsResponse) { f.QueryLanguages = val @@ -1109,6 +1109,72 @@ func (o *SettingsResponse) SetMaxFacetHits(v int32) *SettingsResponse { return o } +// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. +func (o *SettingsResponse) GetKeepDiacriticsOnCharacters() string { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + var ret string + return ret + } + return *o.KeepDiacriticsOnCharacters +} + +// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SettingsResponse) GetKeepDiacriticsOnCharactersOk() (*string, bool) { + if o == nil || o.KeepDiacriticsOnCharacters == nil { + return nil, false + } + return o.KeepDiacriticsOnCharacters, true +} + +// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. +func (o *SettingsResponse) HasKeepDiacriticsOnCharacters() bool { + if o != nil && o.KeepDiacriticsOnCharacters != nil { + return true + } + + return false +} + +// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. +func (o *SettingsResponse) SetKeepDiacriticsOnCharacters(v string) *SettingsResponse { + o.KeepDiacriticsOnCharacters = &v + return o +} + +// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. +func (o *SettingsResponse) GetCustomRanking() []string { + if o == nil || o.CustomRanking == nil { + var ret []string + return ret + } + return o.CustomRanking +} + +// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SettingsResponse) GetCustomRankingOk() ([]string, bool) { + if o == nil || o.CustomRanking == nil { + return nil, false + } + return o.CustomRanking, true +} + +// HasCustomRanking returns a boolean if a field has been set. +func (o *SettingsResponse) HasCustomRanking() bool { + if o != nil && o.CustomRanking != nil { + return true + } + + return false +} + +// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. +func (o *SettingsResponse) SetCustomRanking(v []string) *SettingsResponse { + o.CustomRanking = v + return o +} + // GetAttributesToRetrieve returns the AttributesToRetrieve field value if set, zero value otherwise. func (o *SettingsResponse) GetAttributesToRetrieve() []string { if o == nil || o.AttributesToRetrieve == nil { @@ -1175,39 +1241,6 @@ func (o *SettingsResponse) SetRanking(v []string) *SettingsResponse { return o } -// GetCustomRanking returns the CustomRanking field value if set, zero value otherwise. -func (o *SettingsResponse) GetCustomRanking() []string { - if o == nil || o.CustomRanking == nil { - var ret []string - return ret - } - return o.CustomRanking -} - -// GetCustomRankingOk returns a tuple with the CustomRanking field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsResponse) GetCustomRankingOk() ([]string, bool) { - if o == nil || o.CustomRanking == nil { - return nil, false - } - return o.CustomRanking, true -} - -// HasCustomRanking returns a boolean if a field has been set. -func (o *SettingsResponse) HasCustomRanking() bool { - if o != nil && o.CustomRanking != nil { - return true - } - - return false -} - -// SetCustomRanking gets a reference to the given []string and assigns it to the CustomRanking field. -func (o *SettingsResponse) SetCustomRanking(v []string) *SettingsResponse { - o.CustomRanking = v - return o -} - // GetRelevancyStrictness returns the RelevancyStrictness field value if set, zero value otherwise. func (o *SettingsResponse) GetRelevancyStrictness() int32 { if o == nil || o.RelevancyStrictness == nil { @@ -1703,39 +1736,6 @@ func (o *SettingsResponse) SetRemoveStopWords(v *RemoveStopWords) *SettingsRespo return o } -// GetKeepDiacriticsOnCharacters returns the KeepDiacriticsOnCharacters field value if set, zero value otherwise. -func (o *SettingsResponse) GetKeepDiacriticsOnCharacters() string { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - var ret string - return ret - } - return *o.KeepDiacriticsOnCharacters -} - -// GetKeepDiacriticsOnCharactersOk returns a tuple with the KeepDiacriticsOnCharacters field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SettingsResponse) GetKeepDiacriticsOnCharactersOk() (*string, bool) { - if o == nil || o.KeepDiacriticsOnCharacters == nil { - return nil, false - } - return o.KeepDiacriticsOnCharacters, true -} - -// HasKeepDiacriticsOnCharacters returns a boolean if a field has been set. -func (o *SettingsResponse) HasKeepDiacriticsOnCharacters() bool { - if o != nil && o.KeepDiacriticsOnCharacters != nil { - return true - } - - return false -} - -// SetKeepDiacriticsOnCharacters gets a reference to the given string and assigns it to the KeepDiacriticsOnCharacters field. -func (o *SettingsResponse) SetKeepDiacriticsOnCharacters(v string) *SettingsResponse { - o.KeepDiacriticsOnCharacters = &v - return o -} - // GetQueryLanguages returns the QueryLanguages field value if set, zero value otherwise. func (o *SettingsResponse) GetQueryLanguages() []SupportedLanguage { if o == nil || o.QueryLanguages == nil { @@ -2628,15 +2628,18 @@ func (o SettingsResponse) MarshalJSON() ([]byte, error) { if o.MaxFacetHits != nil { toSerialize["maxFacetHits"] = o.MaxFacetHits } + if o.KeepDiacriticsOnCharacters != nil { + toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters + } + if o.CustomRanking != nil { + toSerialize["customRanking"] = o.CustomRanking + } if o.AttributesToRetrieve != nil { toSerialize["attributesToRetrieve"] = o.AttributesToRetrieve } if o.Ranking != nil { toSerialize["ranking"] = o.Ranking } - if o.CustomRanking != nil { - toSerialize["customRanking"] = o.CustomRanking - } if o.RelevancyStrictness != nil { toSerialize["relevancyStrictness"] = o.RelevancyStrictness } @@ -2682,9 +2685,6 @@ func (o SettingsResponse) MarshalJSON() ([]byte, error) { if o.RemoveStopWords != nil { toSerialize["removeStopWords"] = o.RemoveStopWords } - if o.KeepDiacriticsOnCharacters != nil { - toSerialize["keepDiacriticsOnCharacters"] = o.KeepDiacriticsOnCharacters - } if o.QueryLanguages != nil { toSerialize["queryLanguages"] = o.QueryLanguages } @@ -2788,9 +2788,10 @@ func (o SettingsResponse) String() string { out += fmt.Sprintf(" customNormalization=%v\n", o.CustomNormalization) out += fmt.Sprintf(" attributeForDistinct=%v\n", o.AttributeForDistinct) out += fmt.Sprintf(" maxFacetHits=%v\n", o.MaxFacetHits) + out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) + out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" attributesToRetrieve=%v\n", o.AttributesToRetrieve) out += fmt.Sprintf(" ranking=%v\n", o.Ranking) - out += fmt.Sprintf(" customRanking=%v\n", o.CustomRanking) out += fmt.Sprintf(" relevancyStrictness=%v\n", o.RelevancyStrictness) out += fmt.Sprintf(" attributesToHighlight=%v\n", o.AttributesToHighlight) out += fmt.Sprintf(" attributesToSnippet=%v\n", o.AttributesToSnippet) @@ -2806,7 +2807,6 @@ func (o SettingsResponse) String() string { out += fmt.Sprintf(" disableTypoToleranceOnAttributes=%v\n", o.DisableTypoToleranceOnAttributes) out += fmt.Sprintf(" ignorePlurals=%v\n", o.IgnorePlurals) out += fmt.Sprintf(" removeStopWords=%v\n", o.RemoveStopWords) - out += fmt.Sprintf(" keepDiacriticsOnCharacters=%v\n", o.KeepDiacriticsOnCharacters) out += fmt.Sprintf(" queryLanguages=%v\n", o.QueryLanguages) out += fmt.Sprintf(" decompoundQuery=%v\n", o.DecompoundQuery) out += fmt.Sprintf(" enableRules=%v\n", o.EnableRules) diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FallbackParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FallbackParams.java index aeb54c6286..63dc4f3562 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FallbackParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/FallbackParams.java @@ -155,6 +155,12 @@ public class FallbackParams { @JsonProperty("maxFacetHits") private Integer maxFacetHits; + @JsonProperty("keepDiacriticsOnCharacters") + private String keepDiacriticsOnCharacters; + + @JsonProperty("customRanking") + private List customRanking; + @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -1121,6 +1127,51 @@ public Integer getMaxFacetHits() { return maxFacetHits; } + public FallbackParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { + this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public String getKeepDiacriticsOnCharacters() { + return keepDiacriticsOnCharacters; + } + + public FallbackParams setCustomRanking(List customRanking) { + this.customRanking = customRanking; + return this; + } + + public FallbackParams addCustomRanking(String customRankingItem) { + if (this.customRanking == null) { + this.customRanking = new ArrayList<>(); + } + this.customRanking.add(customRankingItem); + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public List getCustomRanking() { + return customRanking; + } + public FallbackParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -1821,6 +1872,8 @@ public boolean equals(Object o) { Objects.equals(this.customNormalization, fallbackParams.customNormalization) && Objects.equals(this.attributeForDistinct, fallbackParams.attributeForDistinct) && Objects.equals(this.maxFacetHits, fallbackParams.maxFacetHits) && + Objects.equals(this.keepDiacriticsOnCharacters, fallbackParams.keepDiacriticsOnCharacters) && + Objects.equals(this.customRanking, fallbackParams.customRanking) && Objects.equals(this.attributesToRetrieve, fallbackParams.attributesToRetrieve) && Objects.equals(this.ranking, fallbackParams.ranking) && Objects.equals(this.relevancyStrictness, fallbackParams.relevancyStrictness) && @@ -1912,6 +1965,8 @@ public int hashCode() { customNormalization, attributeForDistinct, maxFacetHits, + keepDiacriticsOnCharacters, + customRanking, attributesToRetrieve, ranking, relevancyStrictness, @@ -2004,6 +2059,8 @@ public String toString() { sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); + sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); + sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendSearchParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendSearchParams.java index 49e066f21e..b7b464d2c0 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendSearchParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/recommend/RecommendSearchParams.java @@ -155,6 +155,12 @@ public class RecommendSearchParams { @JsonProperty("maxFacetHits") private Integer maxFacetHits; + @JsonProperty("keepDiacriticsOnCharacters") + private String keepDiacriticsOnCharacters; + + @JsonProperty("customRanking") + private List customRanking; + @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @@ -1121,6 +1127,51 @@ public Integer getMaxFacetHits() { return maxFacetHits; } + public RecommendSearchParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { + this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public String getKeepDiacriticsOnCharacters() { + return keepDiacriticsOnCharacters; + } + + public RecommendSearchParams setCustomRanking(List customRanking) { + this.customRanking = customRanking; + return this; + } + + public RecommendSearchParams addCustomRanking(String customRankingItem) { + if (this.customRanking == null) { + this.customRanking = new ArrayList<>(); + } + this.customRanking.add(customRankingItem); + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public List getCustomRanking() { + return customRanking; + } + public RecommendSearchParams setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -1821,6 +1872,8 @@ public boolean equals(Object o) { Objects.equals(this.customNormalization, recommendSearchParams.customNormalization) && Objects.equals(this.attributeForDistinct, recommendSearchParams.attributeForDistinct) && Objects.equals(this.maxFacetHits, recommendSearchParams.maxFacetHits) && + Objects.equals(this.keepDiacriticsOnCharacters, recommendSearchParams.keepDiacriticsOnCharacters) && + Objects.equals(this.customRanking, recommendSearchParams.customRanking) && Objects.equals(this.attributesToRetrieve, recommendSearchParams.attributesToRetrieve) && Objects.equals(this.ranking, recommendSearchParams.ranking) && Objects.equals(this.relevancyStrictness, recommendSearchParams.relevancyStrictness) && @@ -1912,6 +1965,8 @@ public int hashCode() { customNormalization, attributeForDistinct, maxFacetHits, + keepDiacriticsOnCharacters, + customRanking, attributesToRetrieve, ranking, relevancyStrictness, @@ -2004,6 +2059,8 @@ public String toString() { sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); + sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); + sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java index 064fb2b718..6c23968d48 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/BrowseParamsObject.java @@ -115,9 +115,6 @@ public class BrowseParamsObject implements BrowseParams { @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -163,9 +160,6 @@ public class BrowseParamsObject implements BrowseParams { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -780,36 +774,6 @@ public List getRanking() { return ranking; } - public BrowseParamsObject setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public BrowseParamsObject addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public BrowseParamsObject setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -1042,21 +1006,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public BrowseParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public BrowseParamsObject setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1503,7 +1452,6 @@ public boolean equals(Object o) { Objects.equals(this.enableABTest, browseParamsObject.enableABTest) && Objects.equals(this.attributesToRetrieve, browseParamsObject.attributesToRetrieve) && Objects.equals(this.ranking, browseParamsObject.ranking) && - Objects.equals(this.customRanking, browseParamsObject.customRanking) && Objects.equals(this.relevancyStrictness, browseParamsObject.relevancyStrictness) && Objects.equals(this.attributesToHighlight, browseParamsObject.attributesToHighlight) && Objects.equals(this.attributesToSnippet, browseParamsObject.attributesToSnippet) && @@ -1519,7 +1467,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, browseParamsObject.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, browseParamsObject.ignorePlurals) && Objects.equals(this.removeStopWords, browseParamsObject.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, browseParamsObject.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, browseParamsObject.queryLanguages) && Objects.equals(this.decompoundQuery, browseParamsObject.decompoundQuery) && Objects.equals(this.enableRules, browseParamsObject.enableRules) && @@ -1585,7 +1532,6 @@ public int hashCode() { enableABTest, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1601,7 +1547,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1668,7 +1613,6 @@ public String toString() { sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1684,7 +1628,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java index f0fa96ce59..fa33fec149 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/ConsequenceParams.java @@ -111,9 +111,6 @@ public class ConsequenceParams { @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -159,9 +156,6 @@ public class ConsequenceParams { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -771,36 +765,6 @@ public List getRanking() { return ranking; } - public ConsequenceParams setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public ConsequenceParams addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public ConsequenceParams setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -1033,21 +997,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public ConsequenceParams setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public ConsequenceParams setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1511,7 +1460,6 @@ public boolean equals(Object o) { Objects.equals(this.enableABTest, consequenceParams.enableABTest) && Objects.equals(this.attributesToRetrieve, consequenceParams.attributesToRetrieve) && Objects.equals(this.ranking, consequenceParams.ranking) && - Objects.equals(this.customRanking, consequenceParams.customRanking) && Objects.equals(this.relevancyStrictness, consequenceParams.relevancyStrictness) && Objects.equals(this.attributesToHighlight, consequenceParams.attributesToHighlight) && Objects.equals(this.attributesToSnippet, consequenceParams.attributesToSnippet) && @@ -1527,7 +1475,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, consequenceParams.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, consequenceParams.ignorePlurals) && Objects.equals(this.removeStopWords, consequenceParams.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, consequenceParams.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, consequenceParams.queryLanguages) && Objects.equals(this.decompoundQuery, consequenceParams.decompoundQuery) && Objects.equals(this.enableRules, consequenceParams.enableRules) && @@ -1594,7 +1541,6 @@ public int hashCode() { enableABTest, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1610,7 +1556,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1678,7 +1623,6 @@ public String toString() { sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1694,7 +1638,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java index efc4f6ab12..acd535d93a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/IndexSettings.java @@ -68,15 +68,18 @@ public class IndexSettings { @JsonProperty("maxFacetHits") private Integer maxFacetHits; + @JsonProperty("keepDiacriticsOnCharacters") + private String keepDiacriticsOnCharacters; + + @JsonProperty("customRanking") + private List customRanking; + @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -122,9 +125,6 @@ public class IndexSettings { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -600,6 +600,51 @@ public Integer getMaxFacetHits() { return maxFacetHits; } + public IndexSettings setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { + this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public String getKeepDiacriticsOnCharacters() { + return keepDiacriticsOnCharacters; + } + + public IndexSettings setCustomRanking(List customRanking) { + this.customRanking = customRanking; + return this; + } + + public IndexSettings addCustomRanking(String customRankingItem) { + if (this.customRanking == null) { + this.customRanking = new ArrayList<>(); + } + this.customRanking.add(customRankingItem); + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public List getCustomRanking() { + return customRanking; + } + public IndexSettings setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -657,36 +702,6 @@ public List getRanking() { return ranking; } - public IndexSettings setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public IndexSettings addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public IndexSettings setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -919,21 +934,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public IndexSettings setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public IndexSettings setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1349,9 +1349,10 @@ public boolean equals(Object o) { Objects.equals(this.customNormalization, indexSettings.customNormalization) && Objects.equals(this.attributeForDistinct, indexSettings.attributeForDistinct) && Objects.equals(this.maxFacetHits, indexSettings.maxFacetHits) && + Objects.equals(this.keepDiacriticsOnCharacters, indexSettings.keepDiacriticsOnCharacters) && + Objects.equals(this.customRanking, indexSettings.customRanking) && Objects.equals(this.attributesToRetrieve, indexSettings.attributesToRetrieve) && Objects.equals(this.ranking, indexSettings.ranking) && - Objects.equals(this.customRanking, indexSettings.customRanking) && Objects.equals(this.relevancyStrictness, indexSettings.relevancyStrictness) && Objects.equals(this.attributesToHighlight, indexSettings.attributesToHighlight) && Objects.equals(this.attributesToSnippet, indexSettings.attributesToSnippet) && @@ -1367,7 +1368,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, indexSettings.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, indexSettings.ignorePlurals) && Objects.equals(this.removeStopWords, indexSettings.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, indexSettings.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, indexSettings.queryLanguages) && Objects.equals(this.decompoundQuery, indexSettings.decompoundQuery) && Objects.equals(this.enableRules, indexSettings.enableRules) && @@ -1416,9 +1416,10 @@ public int hashCode() { customNormalization, attributeForDistinct, maxFacetHits, + keepDiacriticsOnCharacters, + customRanking, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1434,7 +1435,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1484,9 +1484,10 @@ public String toString() { sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); + sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); + sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1502,7 +1503,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java index 4dedde99c8..3f5c1a601a 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForFacets.java @@ -118,9 +118,6 @@ public class SearchForFacets implements SearchQuery { @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -166,9 +163,6 @@ public class SearchForFacets implements SearchQuery { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -806,36 +800,6 @@ public List getRanking() { return ranking; } - public SearchForFacets setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchForFacets addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public SearchForFacets setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -1068,21 +1032,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public SearchForFacets setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public SearchForFacets setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1574,7 +1523,6 @@ public boolean equals(Object o) { Objects.equals(this.enableABTest, searchForFacets.enableABTest) && Objects.equals(this.attributesToRetrieve, searchForFacets.attributesToRetrieve) && Objects.equals(this.ranking, searchForFacets.ranking) && - Objects.equals(this.customRanking, searchForFacets.customRanking) && Objects.equals(this.relevancyStrictness, searchForFacets.relevancyStrictness) && Objects.equals(this.attributesToHighlight, searchForFacets.attributesToHighlight) && Objects.equals(this.attributesToSnippet, searchForFacets.attributesToSnippet) && @@ -1590,7 +1538,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, searchForFacets.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, searchForFacets.ignorePlurals) && Objects.equals(this.removeStopWords, searchForFacets.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchForFacets.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, searchForFacets.queryLanguages) && Objects.equals(this.decompoundQuery, searchForFacets.decompoundQuery) && Objects.equals(this.enableRules, searchForFacets.enableRules) && @@ -1661,7 +1608,6 @@ public int hashCode() { enableABTest, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1677,7 +1623,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1749,7 +1694,6 @@ public String toString() { sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1765,7 +1709,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java index b6267de8d8..19725ffe38 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchForHits.java @@ -118,9 +118,6 @@ public class SearchForHits implements SearchQuery { @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -166,9 +163,6 @@ public class SearchForHits implements SearchQuery { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -797,36 +791,6 @@ public List getRanking() { return ranking; } - public SearchForHits setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchForHits addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public SearchForHits setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -1059,21 +1023,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public SearchForHits setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public SearchForHits setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1528,7 +1477,6 @@ public boolean equals(Object o) { Objects.equals(this.enableABTest, searchForHits.enableABTest) && Objects.equals(this.attributesToRetrieve, searchForHits.attributesToRetrieve) && Objects.equals(this.ranking, searchForHits.ranking) && - Objects.equals(this.customRanking, searchForHits.customRanking) && Objects.equals(this.relevancyStrictness, searchForHits.relevancyStrictness) && Objects.equals(this.attributesToHighlight, searchForHits.attributesToHighlight) && Objects.equals(this.attributesToSnippet, searchForHits.attributesToSnippet) && @@ -1544,7 +1492,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, searchForHits.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, searchForHits.ignorePlurals) && Objects.equals(this.removeStopWords, searchForHits.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchForHits.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, searchForHits.queryLanguages) && Objects.equals(this.decompoundQuery, searchForHits.decompoundQuery) && Objects.equals(this.enableRules, searchForHits.enableRules) && @@ -1612,7 +1559,6 @@ public int hashCode() { enableABTest, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1628,7 +1574,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1697,7 +1642,6 @@ public String toString() { sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1713,7 +1657,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java index be6c9e4963..e4b92970f4 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SearchParamsObject.java @@ -115,9 +115,6 @@ public class SearchParamsObject implements SearchParams { @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -163,9 +160,6 @@ public class SearchParamsObject implements SearchParams { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -777,36 +771,6 @@ public List getRanking() { return ranking; } - public SearchParamsObject setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SearchParamsObject addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public SearchParamsObject setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -1039,21 +1003,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public SearchParamsObject setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public SearchParamsObject setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1485,7 +1434,6 @@ public boolean equals(Object o) { Objects.equals(this.enableABTest, searchParamsObject.enableABTest) && Objects.equals(this.attributesToRetrieve, searchParamsObject.attributesToRetrieve) && Objects.equals(this.ranking, searchParamsObject.ranking) && - Objects.equals(this.customRanking, searchParamsObject.customRanking) && Objects.equals(this.relevancyStrictness, searchParamsObject.relevancyStrictness) && Objects.equals(this.attributesToHighlight, searchParamsObject.attributesToHighlight) && Objects.equals(this.attributesToSnippet, searchParamsObject.attributesToSnippet) && @@ -1501,7 +1449,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, searchParamsObject.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, searchParamsObject.ignorePlurals) && Objects.equals(this.removeStopWords, searchParamsObject.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, searchParamsObject.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, searchParamsObject.queryLanguages) && Objects.equals(this.decompoundQuery, searchParamsObject.decompoundQuery) && Objects.equals(this.enableRules, searchParamsObject.enableRules) && @@ -1566,7 +1513,6 @@ public int hashCode() { enableABTest, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1582,7 +1528,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1648,7 +1593,6 @@ public String toString() { sb.append(" enableABTest: ").append(toIndentedString(enableABTest)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1664,7 +1608,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SettingsResponse.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SettingsResponse.java index afcc2cdbcc..3be3e31535 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SettingsResponse.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/SettingsResponse.java @@ -68,15 +68,18 @@ public class SettingsResponse { @JsonProperty("maxFacetHits") private Integer maxFacetHits; + @JsonProperty("keepDiacriticsOnCharacters") + private String keepDiacriticsOnCharacters; + + @JsonProperty("customRanking") + private List customRanking; + @JsonProperty("attributesToRetrieve") private List attributesToRetrieve; @JsonProperty("ranking") private List ranking; - @JsonProperty("customRanking") - private List customRanking; - @JsonProperty("relevancyStrictness") private Integer relevancyStrictness; @@ -122,9 +125,6 @@ public class SettingsResponse { @JsonProperty("removeStopWords") private RemoveStopWords removeStopWords; - @JsonProperty("keepDiacriticsOnCharacters") - private String keepDiacriticsOnCharacters; - @JsonProperty("queryLanguages") private List queryLanguages; @@ -603,6 +603,51 @@ public Integer getMaxFacetHits() { return maxFacetHits; } + public SettingsResponse setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { + this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public String getKeepDiacriticsOnCharacters() { + return keepDiacriticsOnCharacters; + } + + public SettingsResponse setCustomRanking(List customRanking) { + this.customRanking = customRanking; + return this; + } + + public SettingsResponse addCustomRanking(String customRankingItem) { + if (this.customRanking == null) { + this.customRanking = new ArrayList<>(); + } + this.customRanking.add(customRankingItem); + return this; + } + + /** + * 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. + */ + @javax.annotation.Nullable + public List getCustomRanking() { + return customRanking; + } + public SettingsResponse setAttributesToRetrieve(List attributesToRetrieve) { this.attributesToRetrieve = attributesToRetrieve; return this; @@ -660,36 +705,6 @@ public List getRanking() { return ranking; } - public SettingsResponse setCustomRanking(List customRanking) { - this.customRanking = customRanking; - return this; - } - - public SettingsResponse addCustomRanking(String customRankingItem) { - if (this.customRanking == null) { - this.customRanking = new ArrayList<>(); - } - this.customRanking.add(customRankingItem); - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public List getCustomRanking() { - return customRanking; - } - public SettingsResponse setRelevancyStrictness(Integer relevancyStrictness) { this.relevancyStrictness = relevancyStrictness; return this; @@ -922,21 +937,6 @@ public RemoveStopWords getRemoveStopWords() { return removeStopWords; } - public SettingsResponse setKeepDiacriticsOnCharacters(String keepDiacriticsOnCharacters) { - this.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters; - return this; - } - - /** - * 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. - */ - @javax.annotation.Nullable - public String getKeepDiacriticsOnCharacters() { - return keepDiacriticsOnCharacters; - } - public SettingsResponse setQueryLanguages(List queryLanguages) { this.queryLanguages = queryLanguages; return this; @@ -1363,9 +1363,10 @@ public boolean equals(Object o) { Objects.equals(this.customNormalization, settingsResponse.customNormalization) && Objects.equals(this.attributeForDistinct, settingsResponse.attributeForDistinct) && Objects.equals(this.maxFacetHits, settingsResponse.maxFacetHits) && + Objects.equals(this.keepDiacriticsOnCharacters, settingsResponse.keepDiacriticsOnCharacters) && + Objects.equals(this.customRanking, settingsResponse.customRanking) && Objects.equals(this.attributesToRetrieve, settingsResponse.attributesToRetrieve) && Objects.equals(this.ranking, settingsResponse.ranking) && - Objects.equals(this.customRanking, settingsResponse.customRanking) && Objects.equals(this.relevancyStrictness, settingsResponse.relevancyStrictness) && Objects.equals(this.attributesToHighlight, settingsResponse.attributesToHighlight) && Objects.equals(this.attributesToSnippet, settingsResponse.attributesToSnippet) && @@ -1381,7 +1382,6 @@ public boolean equals(Object o) { Objects.equals(this.disableTypoToleranceOnAttributes, settingsResponse.disableTypoToleranceOnAttributes) && Objects.equals(this.ignorePlurals, settingsResponse.ignorePlurals) && Objects.equals(this.removeStopWords, settingsResponse.removeStopWords) && - Objects.equals(this.keepDiacriticsOnCharacters, settingsResponse.keepDiacriticsOnCharacters) && Objects.equals(this.queryLanguages, settingsResponse.queryLanguages) && Objects.equals(this.decompoundQuery, settingsResponse.decompoundQuery) && Objects.equals(this.enableRules, settingsResponse.enableRules) && @@ -1431,9 +1431,10 @@ public int hashCode() { customNormalization, attributeForDistinct, maxFacetHits, + keepDiacriticsOnCharacters, + customRanking, attributesToRetrieve, ranking, - customRanking, relevancyStrictness, attributesToHighlight, attributesToSnippet, @@ -1449,7 +1450,6 @@ public int hashCode() { disableTypoToleranceOnAttributes, ignorePlurals, removeStopWords, - keepDiacriticsOnCharacters, queryLanguages, decompoundQuery, enableRules, @@ -1500,9 +1500,10 @@ public String toString() { sb.append(" customNormalization: ").append(toIndentedString(customNormalization)).append("\n"); sb.append(" attributeForDistinct: ").append(toIndentedString(attributeForDistinct)).append("\n"); sb.append(" maxFacetHits: ").append(toIndentedString(maxFacetHits)).append("\n"); + sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); + sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" attributesToRetrieve: ").append(toIndentedString(attributesToRetrieve)).append("\n"); sb.append(" ranking: ").append(toIndentedString(ranking)).append("\n"); - sb.append(" customRanking: ").append(toIndentedString(customRanking)).append("\n"); sb.append(" relevancyStrictness: ").append(toIndentedString(relevancyStrictness)).append("\n"); sb.append(" attributesToHighlight: ").append(toIndentedString(attributesToHighlight)).append("\n"); sb.append(" attributesToSnippet: ").append(toIndentedString(attributesToSnippet)).append("\n"); @@ -1518,7 +1519,6 @@ public String toString() { sb.append(" disableTypoToleranceOnAttributes: ").append(toIndentedString(disableTypoToleranceOnAttributes)).append("\n"); sb.append(" ignorePlurals: ").append(toIndentedString(ignorePlurals)).append("\n"); sb.append(" removeStopWords: ").append(toIndentedString(removeStopWords)).append("\n"); - sb.append(" keepDiacriticsOnCharacters: ").append(toIndentedString(keepDiacriticsOnCharacters)).append("\n"); sb.append(" queryLanguages: ").append(toIndentedString(queryLanguages)).append("\n"); sb.append(" decompoundQuery: ").append(toIndentedString(decompoundQuery)).append("\n"); sb.append(" enableRules: ").append(toIndentedString(enableRules)).append("\n"); diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts index 3e69db00bd..770e946690 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/baseIndexSettings.ts @@ -92,4 +92,14 @@ export type BaseIndexSettings = { * 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). */ maxFacetHits?: number; + + /** + * 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. + */ + keepDiacriticsOnCharacters?: string; + + /** + * 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. + */ + customRanking?: Array; }; diff --git a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts index 265011d891..d506189f28 100644 --- a/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts +++ b/clients/algoliasearch-client-javascript/packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts @@ -27,11 +27,6 @@ export type IndexSettingsAsSearchParams = { */ ranking?: Array; - /** - * 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. - */ - customRanking?: Array; - /** * 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. */ @@ -98,11 +93,6 @@ export type IndexSettingsAsSearchParams = { removeStopWords?: RemoveStopWords; - /** - * 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. - */ - keepDiacriticsOnCharacters?: string; - /** * 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/). */ diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts index 3e69db00bd..770e946690 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/baseIndexSettings.ts @@ -92,4 +92,14 @@ export type BaseIndexSettings = { * 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). */ maxFacetHits?: number; + + /** + * 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. + */ + keepDiacriticsOnCharacters?: string; + + /** + * 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. + */ + customRanking?: Array; }; diff --git a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts index 265011d891..d506189f28 100644 --- a/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts +++ b/clients/algoliasearch-client-javascript/packages/client-search/model/indexSettingsAsSearchParams.ts @@ -27,11 +27,6 @@ export type IndexSettingsAsSearchParams = { */ ranking?: Array; - /** - * 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. - */ - customRanking?: Array; - /** * 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. */ @@ -98,11 +93,6 @@ export type IndexSettingsAsSearchParams = { removeStopWords?: RemoveStopWords; - /** - * 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. - */ - keepDiacriticsOnCharacters?: string; - /** * 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/). */ diff --git a/clients/algoliasearch-client-javascript/packages/recommend/model/baseIndexSettings.ts b/clients/algoliasearch-client-javascript/packages/recommend/model/baseIndexSettings.ts index 3e69db00bd..770e946690 100644 --- a/clients/algoliasearch-client-javascript/packages/recommend/model/baseIndexSettings.ts +++ b/clients/algoliasearch-client-javascript/packages/recommend/model/baseIndexSettings.ts @@ -92,4 +92,14 @@ export type BaseIndexSettings = { * 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). */ maxFacetHits?: number; + + /** + * 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. + */ + keepDiacriticsOnCharacters?: string; + + /** + * 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. + */ + customRanking?: Array; }; diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FallbackParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FallbackParams.kt index 17ab76ba5c..43ec118b00 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FallbackParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/FallbackParams.kt @@ -54,6 +54,8 @@ import kotlinx.serialization.json.* * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * @param maxFacetHits 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). + * @param keepDiacriticsOnCharacters 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. + * @param customRanking 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. * @param attributesToRetrieve 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. * @param ranking 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/). * @param relevancyStrictness 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. @@ -230,6 +232,12 @@ public data 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). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, + /** 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. */ + @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, + + /** 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. */ + @SerialName(value = "customRanking") val customRanking: List? = null, + /** 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. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendSearchParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendSearchParams.kt index c455829f1e..3345d18301 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendSearchParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/recommend/RecommendSearchParams.kt @@ -54,6 +54,8 @@ import kotlinx.serialization.json.* * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * @param maxFacetHits 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). + * @param keepDiacriticsOnCharacters 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. + * @param customRanking 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. * @param attributesToRetrieve 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. * @param ranking 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/). * @param relevancyStrictness 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. @@ -230,6 +232,12 @@ public data 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). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, + /** 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. */ + @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, + + /** 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. */ + @SerialName(value = "customRanking") val customRanking: List? = null, + /** 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. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt index 2089cc5886..7c72636ae8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/BrowseParamsObject.kt @@ -41,7 +41,6 @@ import kotlinx.serialization.json.* * @param enableABTest Whether to enable A/B testing for this search. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -57,7 +56,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -182,9 +180,6 @@ public data 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -227,9 +222,6 @@ public data class BrowseParamsObject( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt index dac1711052..7d2038b4b8 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/ConsequenceParams.kt @@ -40,7 +40,6 @@ import kotlinx.serialization.json.* * @param enableABTest Whether to enable A/B testing for this search. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -56,7 +55,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -180,9 +178,6 @@ public data 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -225,9 +220,6 @@ public data class ConsequenceParams( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt index 6af5f87ff1..7046b0a849 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/IndexSettings.kt @@ -25,9 +25,10 @@ import kotlinx.serialization.json.* * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * @param maxFacetHits 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). + * @param keepDiacriticsOnCharacters 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. + * @param customRanking 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. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -43,7 +44,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -126,15 +126,18 @@ public data 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). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, + /** 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. */ + @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, + + /** 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. */ + @SerialName(value = "customRanking") val customRanking: List? = null, + /** 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. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, /** 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -177,9 +180,6 @@ public data class IndexSettings( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt index 87c440015f..0d3795a996 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForFacets.kt @@ -45,7 +45,6 @@ import kotlinx.serialization.json.* * @param enableABTest Whether to enable A/B testing for this search. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -61,7 +60,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -198,9 +196,6 @@ public data 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -243,9 +238,6 @@ public data class SearchForFacets( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt index 208d459a77..022251e322 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchForHits.kt @@ -43,7 +43,6 @@ import kotlinx.serialization.json.* * @param enableABTest Whether to enable A/B testing for this search. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -59,7 +58,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -190,9 +188,6 @@ public data 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -235,9 +230,6 @@ public data class SearchForHits( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt index 05ef814726..125eb62717 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SearchParamsObject.kt @@ -41,7 +41,6 @@ import kotlinx.serialization.json.* * @param enableABTest Whether to enable A/B testing for this search. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -57,7 +56,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -181,9 +179,6 @@ public data 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -226,9 +221,6 @@ public data class SearchParamsObject( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SettingsResponse.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SettingsResponse.kt index 6dbd2bca6e..378b593fbb 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SettingsResponse.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/SettingsResponse.kt @@ -25,9 +25,10 @@ import kotlinx.serialization.json.* * @param customNormalization Characters and their normalized replacements. This overrides Algolia's default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). * @param attributeForDistinct Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. * @param maxFacetHits 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). + * @param keepDiacriticsOnCharacters 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. + * @param customRanking 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. * @param attributesToRetrieve 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. * @param ranking 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/). - * @param customRanking 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. * @param relevancyStrictness 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. * @param attributesToHighlight Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/). * @param attributesToSnippet Attributes for which to enable snippets. Attribute names are case-sensitive. 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. @@ -43,7 +44,6 @@ import kotlinx.serialization.json.* * @param disableTypoToleranceOnAttributes Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. * @param ignorePlurals * @param removeStopWords - * @param keepDiacriticsOnCharacters 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. * @param queryLanguages 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/). * @param decompoundQuery Whether to split compound words in the query 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. Decompounding doesn't work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won't be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). * @param enableRules Whether to enable rules. @@ -127,15 +127,18 @@ public data 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). */ @SerialName(value = "maxFacetHits") val maxFacetHits: Int? = null, + /** 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. */ + @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, + + /** 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. */ + @SerialName(value = "customRanking") val customRanking: List? = null, + /** 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. */ @SerialName(value = "attributesToRetrieve") val attributesToRetrieve: List? = null, /** 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/). */ @SerialName(value = "ranking") val ranking: List? = null, - /** 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. */ - @SerialName(value = "customRanking") val customRanking: List? = null, - /** 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. */ @SerialName(value = "relevancyStrictness") val relevancyStrictness: Int? = null, @@ -178,9 +181,6 @@ public data class SettingsResponse( @SerialName(value = "removeStopWords") val removeStopWords: RemoveStopWords? = null, - /** 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. */ - @SerialName(value = "keepDiacriticsOnCharacters") val keepDiacriticsOnCharacters: String? = null, - /** 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/). */ @SerialName(value = "queryLanguages") val queryLanguages: List? = null, diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/FallbackParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/FallbackParams.php index 24c0ab8d87..c52e64d812 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/FallbackParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/FallbackParams.php @@ -67,6 +67,8 @@ class FallbackParams extends AbstractModel implements ModelInterface, \ArrayAcce 'customNormalization' => 'array>', 'attributeForDistinct' => 'string', 'maxFacetHits' => 'int', + 'keepDiacriticsOnCharacters' => 'string', + 'customRanking' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'relevancyStrictness' => 'int', @@ -160,6 +162,8 @@ class FallbackParams extends AbstractModel implements ModelInterface, \ArrayAcce 'customNormalization' => null, 'attributeForDistinct' => null, 'maxFacetHits' => null, + 'keepDiacriticsOnCharacters' => null, + 'customRanking' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'relevancyStrictness' => null, @@ -254,6 +258,8 @@ class FallbackParams extends AbstractModel implements ModelInterface, \ArrayAcce 'customNormalization' => 'customNormalization', 'attributeForDistinct' => 'attributeForDistinct', 'maxFacetHits' => 'maxFacetHits', + 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', + 'customRanking' => 'customRanking', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'relevancyStrictness' => 'relevancyStrictness', @@ -347,6 +353,8 @@ class FallbackParams extends AbstractModel implements ModelInterface, \ArrayAcce 'customNormalization' => 'setCustomNormalization', 'attributeForDistinct' => 'setAttributeForDistinct', 'maxFacetHits' => 'setMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', + 'customRanking' => 'setCustomRanking', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'relevancyStrictness' => 'setRelevancyStrictness', @@ -440,6 +448,8 @@ class FallbackParams extends AbstractModel implements ModelInterface, \ArrayAcce 'customNormalization' => 'getCustomNormalization', 'attributeForDistinct' => 'getAttributeForDistinct', 'maxFacetHits' => 'getMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', + 'customRanking' => 'getCustomRanking', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'relevancyStrictness' => 'getRelevancyStrictness', @@ -635,6 +645,12 @@ public function __construct(?array $data = null) if (isset($data['maxFacetHits'])) { $this->container['maxFacetHits'] = $data['maxFacetHits']; } + if (isset($data['keepDiacriticsOnCharacters'])) { + $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; + } + if (isset($data['customRanking'])) { + $this->container['customRanking'] = $data['customRanking']; + } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -1951,6 +1967,54 @@ public function setMaxFacetHits($maxFacetHits) return $this; } + /** + * Gets keepDiacriticsOnCharacters. + * + * @return null|string + */ + public function getKeepDiacriticsOnCharacters() + { + return $this->container['keepDiacriticsOnCharacters'] ?? null; + } + + /** + * Sets keepDiacriticsOnCharacters. + * + * @param null|string $keepDiacriticsOnCharacters 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. + * + * @return self + */ + public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) + { + $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; + + return $this; + } + + /** + * Gets customRanking. + * + * @return null|string[] + */ + public function getCustomRanking() + { + return $this->container['customRanking'] ?? null; + } + + /** + * Sets customRanking. + * + * @param null|string[] $customRanking 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. + * + * @return self + */ + public function setCustomRanking($customRanking) + { + $this->container['customRanking'] = $customRanking; + + return $this; + } + /** * Gets attributesToRetrieve. * diff --git a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendSearchParams.php b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendSearchParams.php index a32d7d408b..a3d1fcef2f 100644 --- a/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendSearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Recommend/RecommendSearchParams.php @@ -69,6 +69,8 @@ class RecommendSearchParams extends AbstractModel implements ModelInterface, \Ar 'customNormalization' => 'array>', 'attributeForDistinct' => 'string', 'maxFacetHits' => 'int', + 'keepDiacriticsOnCharacters' => 'string', + 'customRanking' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', 'relevancyStrictness' => 'int', @@ -162,6 +164,8 @@ class RecommendSearchParams extends AbstractModel implements ModelInterface, \Ar 'customNormalization' => null, 'attributeForDistinct' => null, 'maxFacetHits' => null, + 'keepDiacriticsOnCharacters' => null, + 'customRanking' => null, 'attributesToRetrieve' => null, 'ranking' => null, 'relevancyStrictness' => null, @@ -256,6 +260,8 @@ class RecommendSearchParams extends AbstractModel implements ModelInterface, \Ar 'customNormalization' => 'customNormalization', 'attributeForDistinct' => 'attributeForDistinct', 'maxFacetHits' => 'maxFacetHits', + 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', + 'customRanking' => 'customRanking', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', 'relevancyStrictness' => 'relevancyStrictness', @@ -349,6 +355,8 @@ class RecommendSearchParams extends AbstractModel implements ModelInterface, \Ar 'customNormalization' => 'setCustomNormalization', 'attributeForDistinct' => 'setAttributeForDistinct', 'maxFacetHits' => 'setMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', + 'customRanking' => 'setCustomRanking', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', 'relevancyStrictness' => 'setRelevancyStrictness', @@ -442,6 +450,8 @@ class RecommendSearchParams extends AbstractModel implements ModelInterface, \Ar 'customNormalization' => 'getCustomNormalization', 'attributeForDistinct' => 'getAttributeForDistinct', 'maxFacetHits' => 'getMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', + 'customRanking' => 'getCustomRanking', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', 'relevancyStrictness' => 'getRelevancyStrictness', @@ -637,6 +647,12 @@ public function __construct(?array $data = null) if (isset($data['maxFacetHits'])) { $this->container['maxFacetHits'] = $data['maxFacetHits']; } + if (isset($data['keepDiacriticsOnCharacters'])) { + $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; + } + if (isset($data['customRanking'])) { + $this->container['customRanking'] = $data['customRanking']; + } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } @@ -1953,6 +1969,54 @@ public function setMaxFacetHits($maxFacetHits) return $this; } + /** + * Gets keepDiacriticsOnCharacters. + * + * @return null|string + */ + public function getKeepDiacriticsOnCharacters() + { + return $this->container['keepDiacriticsOnCharacters'] ?? null; + } + + /** + * Sets keepDiacriticsOnCharacters. + * + * @param null|string $keepDiacriticsOnCharacters 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. + * + * @return self + */ + public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) + { + $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; + + return $this; + } + + /** + * Gets customRanking. + * + * @return null|string[] + */ + public function getCustomRanking() + { + return $this->container['customRanking'] ?? null; + } + + /** + * Sets customRanking. + * + * @param null|string[] $customRanking 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. + * + * @return self + */ + public function setCustomRanking($customRanking) + { + $this->container['customRanking'] = $customRanking; + + return $this; + } + /** * Gets attributesToRetrieve. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php index fef8b568d4..a5522e2cb1 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParams.php @@ -55,7 +55,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -71,7 +70,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -140,7 +138,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -156,7 +153,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -226,7 +222,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -242,7 +237,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -311,7 +305,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -327,7 +320,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -396,7 +388,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -412,7 +403,6 @@ class BrowseParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -559,9 +549,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -607,9 +594,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1599,30 +1583,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1983,30 +1943,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php index 6a3d37a25e..442970f8e7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/BrowseParamsObject.php @@ -54,7 +54,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -70,7 +69,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -138,7 +136,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -154,7 +151,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -223,7 +219,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -239,7 +234,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -307,7 +301,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -323,7 +316,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -391,7 +383,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -407,7 +398,6 @@ class BrowseParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -551,9 +541,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -599,9 +586,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1567,30 +1551,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1951,30 +1911,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php index 9c60d751c8..67c95365a5 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/ConsequenceParams.php @@ -53,7 +53,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -69,7 +68,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -138,7 +136,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -154,7 +151,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -224,7 +220,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -240,7 +235,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -309,7 +303,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -325,7 +318,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -394,7 +386,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -410,7 +401,6 @@ class ConsequenceParams extends AbstractModel implements ModelInterface, \ArrayA 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -553,9 +543,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -601,9 +588,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1551,30 +1535,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1935,30 +1895,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php index a82482af60..9206d8f623 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/IndexSettings.php @@ -40,9 +40,10 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'customNormalization' => 'array>', 'attributeForDistinct' => 'string', 'maxFacetHits' => 'int', + 'keepDiacriticsOnCharacters' => 'string', + 'customRanking' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -58,7 +59,6 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -109,9 +109,10 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'customNormalization' => null, 'attributeForDistinct' => null, 'maxFacetHits' => null, + 'keepDiacriticsOnCharacters' => null, + 'customRanking' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -127,7 +128,6 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -179,9 +179,10 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'customNormalization' => 'customNormalization', 'attributeForDistinct' => 'attributeForDistinct', 'maxFacetHits' => 'maxFacetHits', + 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', + 'customRanking' => 'customRanking', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -197,7 +198,6 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -248,9 +248,10 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'customNormalization' => 'setCustomNormalization', 'attributeForDistinct' => 'setAttributeForDistinct', 'maxFacetHits' => 'setMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', + 'customRanking' => 'setCustomRanking', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -266,7 +267,6 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -317,9 +317,10 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'customNormalization' => 'getCustomNormalization', 'attributeForDistinct' => 'getAttributeForDistinct', 'maxFacetHits' => 'getMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', + 'customRanking' => 'getCustomRanking', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -335,7 +336,6 @@ class IndexSettings extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -430,15 +430,18 @@ public function __construct(?array $data = null) if (isset($data['maxFacetHits'])) { $this->container['maxFacetHits'] = $data['maxFacetHits']; } + if (isset($data['keepDiacriticsOnCharacters'])) { + $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; + } + if (isset($data['customRanking'])) { + $this->container['customRanking'] = $data['customRanking']; + } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -484,9 +487,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1066,73 +1066,97 @@ public function setMaxFacetHits($maxFacetHits) } /** - * Gets attributesToRetrieve. + * Gets keepDiacriticsOnCharacters. + * + * @return null|string + */ + public function getKeepDiacriticsOnCharacters() + { + return $this->container['keepDiacriticsOnCharacters'] ?? null; + } + + /** + * Sets keepDiacriticsOnCharacters. + * + * @param null|string $keepDiacriticsOnCharacters 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. + * + * @return self + */ + public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) + { + $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; + + return $this; + } + + /** + * Gets customRanking. * * @return null|string[] */ - public function getAttributesToRetrieve() + public function getCustomRanking() { - return $this->container['attributesToRetrieve'] ?? null; + return $this->container['customRanking'] ?? null; } /** - * Sets attributesToRetrieve. + * Sets customRanking. * - * @param null|string[] $attributesToRetrieve 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. + * @param null|string[] $customRanking 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. * * @return self */ - public function setAttributesToRetrieve($attributesToRetrieve) + public function setCustomRanking($customRanking) { - $this->container['attributesToRetrieve'] = $attributesToRetrieve; + $this->container['customRanking'] = $customRanking; return $this; } /** - * Gets ranking. + * Gets attributesToRetrieve. * * @return null|string[] */ - public function getRanking() + public function getAttributesToRetrieve() { - return $this->container['ranking'] ?? null; + return $this->container['attributesToRetrieve'] ?? null; } /** - * Sets ranking. + * Sets attributesToRetrieve. * - * @param null|string[] $ranking 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/). + * @param null|string[] $attributesToRetrieve 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. * * @return self */ - public function setRanking($ranking) + public function setAttributesToRetrieve($attributesToRetrieve) { - $this->container['ranking'] = $ranking; + $this->container['attributesToRetrieve'] = $attributesToRetrieve; return $this; } /** - * Gets customRanking. + * Gets ranking. * * @return null|string[] */ - public function getCustomRanking() + public function getRanking() { - return $this->container['customRanking'] ?? null; + return $this->container['ranking'] ?? null; } /** - * Sets customRanking. + * Sets ranking. * - * @param null|string[] $customRanking 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. + * @param null|string[] $ranking 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/). * * @return self */ - public function setCustomRanking($customRanking) + public function setRanking($ranking) { - $this->container['customRanking'] = $customRanking; + $this->container['ranking'] = $ranking; return $this; } @@ -1497,30 +1521,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php index d2f758476c..87d41dc829 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForFacets.php @@ -55,7 +55,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -71,7 +70,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -144,7 +142,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -160,7 +157,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -234,7 +230,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -250,7 +245,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -323,7 +317,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -339,7 +332,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -412,7 +404,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -428,7 +419,6 @@ class SearchForFacets extends AbstractModel implements ModelInterface, \ArrayAcc 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -579,9 +569,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -627,9 +614,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1643,30 +1627,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -2027,30 +1987,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php index 053b2820be..3e60bfdac7 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchForHits.php @@ -55,7 +55,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -71,7 +70,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -141,7 +139,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -157,7 +154,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -228,7 +224,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -244,7 +239,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -314,7 +308,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -330,7 +323,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -400,7 +392,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -416,7 +407,6 @@ class SearchForHits extends AbstractModel implements ModelInterface, \ArrayAcces 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -564,9 +554,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -612,9 +599,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1613,30 +1597,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1997,30 +1957,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php index a0a60d7368..e7ccdc183e 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParams.php @@ -55,7 +55,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -71,7 +70,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -139,7 +137,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -155,7 +152,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -224,7 +220,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -240,7 +235,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -308,7 +302,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -324,7 +317,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -392,7 +384,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -408,7 +399,6 @@ class SearchParams extends AbstractModel implements ModelInterface, \ArrayAccess 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -554,9 +544,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -602,9 +589,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1591,30 +1575,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1975,30 +1935,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php index a52ea64f92..9eaf57636b 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchParamsObject.php @@ -56,7 +56,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -72,7 +71,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -139,7 +137,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -155,7 +152,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -223,7 +219,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -239,7 +234,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -306,7 +300,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -322,7 +315,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -389,7 +381,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -405,7 +396,6 @@ class SearchParamsObject extends AbstractModel implements ModelInterface, \Array 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -548,9 +538,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -596,9 +583,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1561,30 +1545,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -1945,30 +1905,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php b/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php index fd900e5c16..41d73c0c36 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SearchQuery.php @@ -55,7 +55,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'enableABTest' => 'bool', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -71,7 +70,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -144,7 +142,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'enableABTest' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -160,7 +157,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -234,7 +230,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'enableABTest' => 'enableABTest', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -250,7 +245,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -323,7 +317,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'enableABTest' => 'setEnableABTest', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -339,7 +332,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -412,7 +404,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'enableABTest' => 'getEnableABTest', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -428,7 +419,6 @@ class SearchQuery extends AbstractModel implements ModelInterface, \ArrayAccess, 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -579,9 +569,6 @@ public function __construct(?array $data = null) if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -627,9 +614,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1643,30 +1627,6 @@ public function setRanking($ranking) return $this; } - /** - * Gets customRanking. - * - * @return null|string[] - */ - public function getCustomRanking() - { - return $this->container['customRanking'] ?? null; - } - - /** - * Sets customRanking. - * - * @param null|string[] $customRanking 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. - * - * @return self - */ - public function setCustomRanking($customRanking) - { - $this->container['customRanking'] = $customRanking; - - return $this; - } - /** * Gets relevancyStrictness. * @@ -2027,30 +1987,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-php/lib/Model/Search/SettingsResponse.php b/clients/algoliasearch-client-php/lib/Model/Search/SettingsResponse.php index 718d9cce95..81bf5cb0ff 100644 --- a/clients/algoliasearch-client-php/lib/Model/Search/SettingsResponse.php +++ b/clients/algoliasearch-client-php/lib/Model/Search/SettingsResponse.php @@ -38,9 +38,10 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'customNormalization' => 'array>', 'attributeForDistinct' => 'string', 'maxFacetHits' => 'int', + 'keepDiacriticsOnCharacters' => 'string', + 'customRanking' => 'string[]', 'attributesToRetrieve' => 'string[]', 'ranking' => 'string[]', - 'customRanking' => 'string[]', 'relevancyStrictness' => 'int', 'attributesToHighlight' => 'string[]', 'attributesToSnippet' => 'string[]', @@ -56,7 +57,6 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'disableTypoToleranceOnAttributes' => 'string[]', 'ignorePlurals' => '\Algolia\AlgoliaSearch\Model\Search\IgnorePlurals', 'removeStopWords' => '\Algolia\AlgoliaSearch\Model\Search\RemoveStopWords', - 'keepDiacriticsOnCharacters' => 'string', 'queryLanguages' => '\Algolia\AlgoliaSearch\Model\Search\SupportedLanguage[]', 'decompoundQuery' => 'bool', 'enableRules' => 'bool', @@ -108,9 +108,10 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'customNormalization' => null, 'attributeForDistinct' => null, 'maxFacetHits' => null, + 'keepDiacriticsOnCharacters' => null, + 'customRanking' => null, 'attributesToRetrieve' => null, 'ranking' => null, - 'customRanking' => null, 'relevancyStrictness' => null, 'attributesToHighlight' => null, 'attributesToSnippet' => null, @@ -126,7 +127,6 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'disableTypoToleranceOnAttributes' => null, 'ignorePlurals' => null, 'removeStopWords' => null, - 'keepDiacriticsOnCharacters' => null, 'queryLanguages' => null, 'decompoundQuery' => null, 'enableRules' => null, @@ -179,9 +179,10 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'customNormalization' => 'customNormalization', 'attributeForDistinct' => 'attributeForDistinct', 'maxFacetHits' => 'maxFacetHits', + 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', + 'customRanking' => 'customRanking', 'attributesToRetrieve' => 'attributesToRetrieve', 'ranking' => 'ranking', - 'customRanking' => 'customRanking', 'relevancyStrictness' => 'relevancyStrictness', 'attributesToHighlight' => 'attributesToHighlight', 'attributesToSnippet' => 'attributesToSnippet', @@ -197,7 +198,6 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'disableTypoToleranceOnAttributes' => 'disableTypoToleranceOnAttributes', 'ignorePlurals' => 'ignorePlurals', 'removeStopWords' => 'removeStopWords', - 'keepDiacriticsOnCharacters' => 'keepDiacriticsOnCharacters', 'queryLanguages' => 'queryLanguages', 'decompoundQuery' => 'decompoundQuery', 'enableRules' => 'enableRules', @@ -249,9 +249,10 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'customNormalization' => 'setCustomNormalization', 'attributeForDistinct' => 'setAttributeForDistinct', 'maxFacetHits' => 'setMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', + 'customRanking' => 'setCustomRanking', 'attributesToRetrieve' => 'setAttributesToRetrieve', 'ranking' => 'setRanking', - 'customRanking' => 'setCustomRanking', 'relevancyStrictness' => 'setRelevancyStrictness', 'attributesToHighlight' => 'setAttributesToHighlight', 'attributesToSnippet' => 'setAttributesToSnippet', @@ -267,7 +268,6 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'disableTypoToleranceOnAttributes' => 'setDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'setIgnorePlurals', 'removeStopWords' => 'setRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'setKeepDiacriticsOnCharacters', 'queryLanguages' => 'setQueryLanguages', 'decompoundQuery' => 'setDecompoundQuery', 'enableRules' => 'setEnableRules', @@ -319,9 +319,10 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'customNormalization' => 'getCustomNormalization', 'attributeForDistinct' => 'getAttributeForDistinct', 'maxFacetHits' => 'getMaxFacetHits', + 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', + 'customRanking' => 'getCustomRanking', 'attributesToRetrieve' => 'getAttributesToRetrieve', 'ranking' => 'getRanking', - 'customRanking' => 'getCustomRanking', 'relevancyStrictness' => 'getRelevancyStrictness', 'attributesToHighlight' => 'getAttributesToHighlight', 'attributesToSnippet' => 'getAttributesToSnippet', @@ -337,7 +338,6 @@ class SettingsResponse extends AbstractModel implements ModelInterface, \ArrayAc 'disableTypoToleranceOnAttributes' => 'getDisableTypoToleranceOnAttributes', 'ignorePlurals' => 'getIgnorePlurals', 'removeStopWords' => 'getRemoveStopWords', - 'keepDiacriticsOnCharacters' => 'getKeepDiacriticsOnCharacters', 'queryLanguages' => 'getQueryLanguages', 'decompoundQuery' => 'getDecompoundQuery', 'enableRules' => 'getEnableRules', @@ -433,15 +433,18 @@ public function __construct(?array $data = null) if (isset($data['maxFacetHits'])) { $this->container['maxFacetHits'] = $data['maxFacetHits']; } + if (isset($data['keepDiacriticsOnCharacters'])) { + $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; + } + if (isset($data['customRanking'])) { + $this->container['customRanking'] = $data['customRanking']; + } if (isset($data['attributesToRetrieve'])) { $this->container['attributesToRetrieve'] = $data['attributesToRetrieve']; } if (isset($data['ranking'])) { $this->container['ranking'] = $data['ranking']; } - if (isset($data['customRanking'])) { - $this->container['customRanking'] = $data['customRanking']; - } if (isset($data['relevancyStrictness'])) { $this->container['relevancyStrictness'] = $data['relevancyStrictness']; } @@ -487,9 +490,6 @@ public function __construct(?array $data = null) if (isset($data['removeStopWords'])) { $this->container['removeStopWords'] = $data['removeStopWords']; } - if (isset($data['keepDiacriticsOnCharacters'])) { - $this->container['keepDiacriticsOnCharacters'] = $data['keepDiacriticsOnCharacters']; - } if (isset($data['queryLanguages'])) { $this->container['queryLanguages'] = $data['queryLanguages']; } @@ -1072,73 +1072,97 @@ public function setMaxFacetHits($maxFacetHits) } /** - * Gets attributesToRetrieve. + * Gets keepDiacriticsOnCharacters. + * + * @return null|string + */ + public function getKeepDiacriticsOnCharacters() + { + return $this->container['keepDiacriticsOnCharacters'] ?? null; + } + + /** + * Sets keepDiacriticsOnCharacters. + * + * @param null|string $keepDiacriticsOnCharacters 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. + * + * @return self + */ + public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) + { + $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; + + return $this; + } + + /** + * Gets customRanking. * * @return null|string[] */ - public function getAttributesToRetrieve() + public function getCustomRanking() { - return $this->container['attributesToRetrieve'] ?? null; + return $this->container['customRanking'] ?? null; } /** - * Sets attributesToRetrieve. + * Sets customRanking. * - * @param null|string[] $attributesToRetrieve 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. + * @param null|string[] $customRanking 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. * * @return self */ - public function setAttributesToRetrieve($attributesToRetrieve) + public function setCustomRanking($customRanking) { - $this->container['attributesToRetrieve'] = $attributesToRetrieve; + $this->container['customRanking'] = $customRanking; return $this; } /** - * Gets ranking. + * Gets attributesToRetrieve. * * @return null|string[] */ - public function getRanking() + public function getAttributesToRetrieve() { - return $this->container['ranking'] ?? null; + return $this->container['attributesToRetrieve'] ?? null; } /** - * Sets ranking. + * Sets attributesToRetrieve. * - * @param null|string[] $ranking 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/). + * @param null|string[] $attributesToRetrieve 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. * * @return self */ - public function setRanking($ranking) + public function setAttributesToRetrieve($attributesToRetrieve) { - $this->container['ranking'] = $ranking; + $this->container['attributesToRetrieve'] = $attributesToRetrieve; return $this; } /** - * Gets customRanking. + * Gets ranking. * * @return null|string[] */ - public function getCustomRanking() + public function getRanking() { - return $this->container['customRanking'] ?? null; + return $this->container['ranking'] ?? null; } /** - * Sets customRanking. + * Sets ranking. * - * @param null|string[] $customRanking 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. + * @param null|string[] $ranking 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/). * * @return self */ - public function setCustomRanking($customRanking) + public function setRanking($ranking) { - $this->container['customRanking'] = $customRanking; + $this->container['ranking'] = $ranking; return $this; } @@ -1503,30 +1527,6 @@ public function setRemoveStopWords($removeStopWords) return $this; } - /** - * Gets keepDiacriticsOnCharacters. - * - * @return null|string - */ - public function getKeepDiacriticsOnCharacters() - { - return $this->container['keepDiacriticsOnCharacters'] ?? null; - } - - /** - * Sets keepDiacriticsOnCharacters. - * - * @param null|string $keepDiacriticsOnCharacters 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. - * - * @return self - */ - public function setKeepDiacriticsOnCharacters($keepDiacriticsOnCharacters) - { - $this->container['keepDiacriticsOnCharacters'] = $keepDiacriticsOnCharacters; - - return $this; - } - /** * Gets queryLanguages. * diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/fallback_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/fallback_params.py index 2e0678cd8d..1c84a06aeb 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/fallback_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/fallback_params.py @@ -93,6 +93,8 @@ "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", @@ -230,6 +232,10 @@ class FallbackParams(BaseModel): """ Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. """ max_facet_hits: Optional[int] = None """ 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). """ + keep_diacritics_on_characters: Optional[str] = None + """ 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. """ + custom_ranking: Optional[List[str]] = None + """ 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. """ attributes_to_retrieve: Optional[List[str]] = None """ 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. """ ranking: Optional[List[str]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_search_params.py b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_search_params.py index 1b3fde00bf..2a6b87f8c5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_search_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/recommend/models/recommend_search_params.py @@ -93,6 +93,8 @@ "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", @@ -230,6 +232,10 @@ class RecommendSearchParams(BaseModel): """ Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. """ max_facet_hits: Optional[int] = None """ 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). """ + keep_diacritics_on_characters: Optional[str] = None + """ 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. """ + custom_ranking: Optional[List[str]] = None + """ 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. """ attributes_to_retrieve: Optional[List[str]] = None """ 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. """ ranking: Optional[List[str]] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py index 982663646e..f13934f6e0 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/browse_params_object.py @@ -80,7 +80,6 @@ "enable_ab_test": "enableABTest", "attributes_to_retrieve": "attributesToRetrieve", "ranking": "ranking", - "custom_ranking": "customRanking", "relevancy_strictness": "relevancyStrictness", "attributes_to_highlight": "attributesToHighlight", "attributes_to_snippet": "attributesToSnippet", @@ -96,7 +95,6 @@ "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", @@ -195,8 +193,6 @@ class BrowseParamsObject(BaseModel): """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -224,8 +220,6 @@ class BrowseParamsObject(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py index d6c3e3237c..18f237cec0 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/consequence_params.py @@ -81,7 +81,6 @@ "enable_ab_test": "enableABTest", "attributes_to_retrieve": "attributesToRetrieve", "ranking": "ranking", - "custom_ranking": "customRanking", "relevancy_strictness": "relevancyStrictness", "attributes_to_highlight": "attributesToHighlight", "attributes_to_snippet": "attributesToSnippet", @@ -97,7 +96,6 @@ "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", @@ -196,8 +194,6 @@ class ConsequenceParams(BaseModel): """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -225,8 +221,6 @@ class ConsequenceParams(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py index 04e6137c79..0580601167 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/index_settings.py @@ -57,9 +57,10 @@ "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", @@ -75,7 +76,6 @@ "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", @@ -148,12 +148,14 @@ class IndexSettings(BaseModel): """ Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. """ max_facet_hits: Optional[int] = None """ 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). """ + keep_diacritics_on_characters: Optional[str] = None + """ 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. """ + custom_ranking: Optional[List[str]] = None + """ 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. """ attributes_to_retrieve: Optional[List[str]] = None """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -181,8 +183,6 @@ class IndexSettings(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py index 5c1fa13b7f..9455f9880c 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_facets.py @@ -82,7 +82,6 @@ "enable_ab_test": "enableABTest", "attributes_to_retrieve": "attributesToRetrieve", "ranking": "ranking", - "custom_ranking": "customRanking", "relevancy_strictness": "relevancyStrictness", "attributes_to_highlight": "attributesToHighlight", "attributes_to_snippet": "attributesToSnippet", @@ -98,7 +97,6 @@ "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", @@ -203,8 +201,6 @@ class SearchForFacets(BaseModel): """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -232,8 +228,6 @@ class SearchForFacets(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py index 552de623f9..cbf2d6b5c5 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_for_hits.py @@ -82,7 +82,6 @@ "enable_ab_test": "enableABTest", "attributes_to_retrieve": "attributesToRetrieve", "ranking": "ranking", - "custom_ranking": "customRanking", "relevancy_strictness": "relevancyStrictness", "attributes_to_highlight": "attributesToHighlight", "attributes_to_snippet": "attributesToSnippet", @@ -98,7 +97,6 @@ "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", @@ -200,8 +198,6 @@ class SearchForHits(BaseModel): """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -229,8 +225,6 @@ class SearchForHits(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py index d26d85dc9a..38b6bae6d8 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/search_params_object.py @@ -80,7 +80,6 @@ "enable_ab_test": "enableABTest", "attributes_to_retrieve": "attributesToRetrieve", "ranking": "ranking", - "custom_ranking": "customRanking", "relevancy_strictness": "relevancyStrictness", "attributes_to_highlight": "attributesToHighlight", "attributes_to_snippet": "attributesToSnippet", @@ -96,7 +95,6 @@ "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", @@ -194,8 +192,6 @@ class SearchParamsObject(BaseModel): """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -223,8 +219,6 @@ class SearchParamsObject(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-python/algoliasearch/search/models/settings_response.py b/clients/algoliasearch-client-python/algoliasearch/search/models/settings_response.py index a99b200d3d..286b40bd7f 100644 --- a/clients/algoliasearch-client-python/algoliasearch/search/models/settings_response.py +++ b/clients/algoliasearch-client-python/algoliasearch/search/models/settings_response.py @@ -57,9 +57,10 @@ "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", @@ -75,7 +76,6 @@ "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", @@ -149,12 +149,14 @@ class SettingsResponse(BaseModel): """ Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts. """ max_facet_hits: Optional[int] = None """ 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). """ + keep_diacritics_on_characters: Optional[str] = None + """ 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. """ + custom_ranking: Optional[List[str]] = None + """ 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. """ attributes_to_retrieve: Optional[List[str]] = None """ 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. """ ranking: Optional[List[str]] = None """ 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/). """ - custom_ranking: Optional[List[str]] = None - """ 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. """ relevancy_strictness: Optional[int] = None """ 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. """ attributes_to_highlight: Optional[List[str]] = None @@ -182,8 +184,6 @@ class SettingsResponse(BaseModel): """ Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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. """ ignore_plurals: Optional[IgnorePlurals] = None remove_stop_words: Optional[RemoveStopWords] = None - keep_diacritics_on_characters: Optional[str] = None - """ 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. """ query_languages: Optional[List[SupportedLanguage]] = None """ 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/). """ decompound_query: Optional[bool] = None diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/fallback_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/fallback_params.rb index a7fe097381..15e25af93d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/fallback_params.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_search_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_search_params.rb index 26008c1b28..0c47a66a9d 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/recommend/recommend_search_params.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb index 62bee75dd7..4aefa4cbbe 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/browse_params_object.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb index e7428906ca..b0488071a6 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/consequence_params.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb index 7ee89a0359..d718f12047 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/index_settings.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb index 645f54107a..1101a2a149 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_facets.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb index 06b5a50fe7..b145219c57 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_for_hits.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb index 90651df92b..c5afaf48d3 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/search_params_object.rb +++ b/clients/algoliasearch-client-ruby/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/clients/algoliasearch-client-ruby/lib/algolia/models/search/settings_response.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/search/settings_response.rb index f0514e5a8d..65f00fb556 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/search/settings_response.rb +++ b/clients/algoliasearch-client-ruby/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, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseIndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseIndexSettings.scala index e89b07b400..412c7671b6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseIndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/BaseIndexSettings.scala @@ -138,6 +138,20 @@ import algoliasearch.recommend.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. */ case class BaseIndexSettings( attributesForFaceting: Option[Seq[String]] = scala.None, @@ -157,5 +171,7 @@ case class BaseIndexSettings( userData: Option[Any] = scala.None, customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, - maxFacetHits: Option[Int] = scala.None + maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FallbackParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FallbackParams.scala index edf18bfedc..889de0a6f1 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FallbackParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/FallbackParams.scala @@ -228,6 +228,20 @@ import algoliasearch.recommend.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. * @param attributesToRetrieve * 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 @@ -416,6 +430,8 @@ case class FallbackParams( customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendIndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendIndexSettings.scala index fc05c1c087..0a732ce8f4 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendIndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendIndexSettings.scala @@ -143,6 +143,20 @@ import algoliasearch.recommend.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. * @param attributesToRetrieve * 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 @@ -302,6 +316,8 @@ case class RecommendIndexSettings( customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendSearchParams.scala index 98659acd93..c05914b77d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/recommend/RecommendSearchParams.scala @@ -228,6 +228,20 @@ import algoliasearch.recommend.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. * @param attributesToRetrieve * 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 @@ -416,6 +430,8 @@ case class RecommendSearchParams( customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala index 9a34e7775d..95b2883644 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BaseIndexSettings.scala @@ -142,6 +142,20 @@ import algoliasearch.search.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. */ case class BaseIndexSettings( attributesForFaceting: Option[Seq[String]] = scala.None, @@ -161,5 +175,7 @@ case class BaseIndexSettings( userData: Option[Any] = scala.None, customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, - maxFacetHits: Option[Int] = scala.None + maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None ) diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala index 88cf02d83e..89d7f245ce 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/BrowseParamsObject.scala @@ -150,16 +150,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -205,10 +195,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -328,7 +314,6 @@ case class BrowseParamsObject( enableABTest: Option[Boolean] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -344,7 +329,6 @@ case class BrowseParamsObject( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala index 5146e004d0..e39a2f7946 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/ConsequenceParams.scala @@ -148,16 +148,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -203,10 +193,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -322,7 +308,6 @@ case class ConsequenceParams( enableABTest: Option[Boolean] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -338,7 +323,6 @@ case class ConsequenceParams( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala index ab8805399f..8c42dbaf25 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettings.scala @@ -148,6 +148,20 @@ import algoliasearch.search.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. * @param attributesToRetrieve * 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 @@ -164,16 +178,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -219,10 +223,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -323,9 +323,10 @@ case class IndexSettings( customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -341,7 +342,6 @@ case class IndexSettings( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala index 37e5dce5d5..3cd73e9b59 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/IndexSettingsAsSearchParams.scala @@ -59,16 +59,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -114,10 +104,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -202,7 +188,6 @@ import algoliasearch.search.SupportedLanguage._ case class IndexSettingsAsSearchParams( attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -218,7 +203,6 @@ case class IndexSettingsAsSearchParams( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala index 027e4523d6..df50b1795d 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForFacets.scala @@ -153,16 +153,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -208,10 +198,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -338,7 +324,6 @@ case class SearchForFacets( enableABTest: Option[Boolean] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -354,7 +339,6 @@ case class SearchForFacets( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala index d6ce31350c..17b3cb51e7 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchForHits.scala @@ -153,16 +153,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -208,10 +198,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -331,7 +317,6 @@ case class SearchForHits( enableABTest: Option[Boolean] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -347,7 +332,6 @@ case class SearchForHits( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala index 5b39457395..6d9c9b2970 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SearchParamsObject.scala @@ -150,16 +150,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -205,10 +195,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -325,7 +311,6 @@ case class SearchParamsObject( enableABTest: Option[Boolean] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -341,7 +326,6 @@ case class SearchParamsObject( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SettingsResponse.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SettingsResponse.scala index 807e57732b..54208804aa 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SettingsResponse.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/search/SettingsResponse.scala @@ -148,6 +148,20 @@ import algoliasearch.search.SupportedLanguage._ * @param maxFacetHits * 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). + * @param keepDiacriticsOnCharacters + * 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. + * @param customRanking + * 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. * @param attributesToRetrieve * 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 @@ -164,16 +178,6 @@ import algoliasearch.search.SupportedLanguage._ * 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/). - * @param customRanking - * 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. * @param relevancyStrictness * Relevancy threshold below which less relevant results aren't included in the results. You can only set * `relevancyStrictness` on [virtual replica @@ -219,10 +223,6 @@ import algoliasearch.search.SupportedLanguage._ * \- 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. - * @param keepDiacriticsOnCharacters - * 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. * @param queryLanguages * 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` @@ -325,9 +325,10 @@ case class SettingsResponse( customNormalization: Option[Map[String, Map[String, String]]] = scala.None, attributeForDistinct: Option[String] = scala.None, maxFacetHits: Option[Int] = scala.None, + keepDiacriticsOnCharacters: Option[String] = scala.None, + customRanking: Option[Seq[String]] = scala.None, attributesToRetrieve: Option[Seq[String]] = scala.None, ranking: Option[Seq[String]] = scala.None, - customRanking: Option[Seq[String]] = scala.None, relevancyStrictness: Option[Int] = scala.None, attributesToHighlight: Option[Seq[String]] = scala.None, attributesToSnippet: Option[Seq[String]] = scala.None, @@ -343,7 +344,6 @@ case class SettingsResponse( disableTypoToleranceOnAttributes: Option[Seq[String]] = scala.None, ignorePlurals: Option[IgnorePlurals] = scala.None, removeStopWords: Option[RemoveStopWords] = scala.None, - keepDiacriticsOnCharacters: Option[String] = scala.None, queryLanguages: Option[Seq[SupportedLanguage]] = scala.None, decompoundQuery: Option[Boolean] = scala.None, enableRules: Option[Boolean] = scala.None, diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift index 2e03f82494..3346a175ae 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/FallbackParams.swift @@ -189,6 +189,19 @@ public struct FallbackParams: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? /// 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 @@ -375,6 +388,8 @@ public struct FallbackParams: Codable, JSONEncodable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, relevancyStrictness: Int? = nil, @@ -461,6 +476,8 @@ public struct FallbackParams: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.relevancyStrictness = relevancyStrictness @@ -549,6 +566,8 @@ public struct FallbackParams: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking case attributesToRetrieve case ranking case relevancyStrictness @@ -640,6 +659,8 @@ public struct FallbackParams: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) @@ -736,6 +757,8 @@ extension FallbackParams: Equatable { lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && lhs.relevancyStrictness == rhs.relevancyStrictness && @@ -826,6 +849,8 @@ extension FallbackParams: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift index ddfbca558c..66bc1dcee3 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendBaseIndexSettings.swift @@ -102,6 +102,19 @@ public struct RecommendBaseIndexSettings: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? public init( attributesForFaceting: [String]? = nil, @@ -121,7 +134,9 @@ public struct RecommendBaseIndexSettings: Codable, JSONEncodable { userData: AnyCodable? = nil, customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, - maxFacetHits: Int? = nil + maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil ) { self.attributesForFaceting = attributesForFaceting self.replicas = replicas @@ -141,6 +156,8 @@ public struct RecommendBaseIndexSettings: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -162,6 +179,8 @@ public struct RecommendBaseIndexSettings: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking } // Encodable protocol methods @@ -186,6 +205,8 @@ public struct RecommendBaseIndexSettings: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) } } @@ -208,7 +229,9 @@ extension RecommendBaseIndexSettings: Equatable { lhs.userData == rhs.userData && lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && - lhs.maxFacetHits == rhs.maxFacetHits + lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking } } @@ -232,5 +255,7 @@ extension RecommendBaseIndexSettings: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) } } diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift index da261b6387..654fc2861c 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendIndexSettings.swift @@ -103,6 +103,19 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? /// 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 @@ -260,6 +273,8 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, relevancyStrictness: Int? = nil, @@ -317,6 +332,8 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.relevancyStrictness = relevancyStrictness @@ -376,6 +393,8 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking case attributesToRetrieve case ranking case relevancyStrictness @@ -438,6 +457,8 @@ public struct RecommendIndexSettings: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) @@ -505,6 +526,8 @@ extension RecommendIndexSettings: Equatable { lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && lhs.relevancyStrictness == rhs.relevancyStrictness && @@ -566,6 +589,8 @@ extension RecommendIndexSettings: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift index 418e42a91e..5b7bac4a05 100644 --- a/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Recommend/Models/RecommendSearchParams.swift @@ -190,6 +190,19 @@ public struct RecommendSearchParams: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? /// 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 @@ -376,6 +389,8 @@ public struct RecommendSearchParams: Codable, JSONEncodable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, relevancyStrictness: Int? = nil, @@ -462,6 +477,8 @@ public struct RecommendSearchParams: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking self.relevancyStrictness = relevancyStrictness @@ -550,6 +567,8 @@ public struct RecommendSearchParams: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking case attributesToRetrieve case ranking case relevancyStrictness @@ -641,6 +660,8 @@ public struct RecommendSearchParams: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) @@ -737,6 +758,8 @@ extension RecommendSearchParams: Equatable { lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && lhs.relevancyStrictness == rhs.relevancyStrictness && @@ -827,6 +850,8 @@ extension RecommendSearchParams: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift index f88a96f176..e445333377 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/BrowseParamsObject.swift @@ -115,15 +115,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -167,10 +158,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -293,7 +280,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { enableABTest: Bool? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -309,7 +295,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -370,7 +355,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { self.enableABTest = enableABTest self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -386,7 +370,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -449,7 +432,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { case enableABTest case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -465,7 +447,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -531,7 +512,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -550,7 +530,6 @@ public struct BrowseParamsObject: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -618,7 +597,6 @@ extension BrowseParamsObject: Equatable { lhs.enableABTest == rhs.enableABTest && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -634,7 +612,6 @@ extension BrowseParamsObject: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -699,7 +676,6 @@ extension BrowseParamsObject: Hashable { hasher.combine(self.enableABTest?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -715,7 +691,6 @@ extension BrowseParamsObject: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift index bf47185d0c..2468552aae 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/IndexSettings.swift @@ -103,6 +103,19 @@ public struct IndexSettings: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? /// 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 @@ -118,15 +131,6 @@ public struct IndexSettings: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -170,10 +174,6 @@ public struct IndexSettings: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -277,9 +277,10 @@ public struct IndexSettings: Codable, JSONEncodable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -295,7 +296,6 @@ public struct IndexSettings: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -339,9 +339,10 @@ public struct IndexSettings: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -357,7 +358,6 @@ public struct IndexSettings: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -403,9 +403,10 @@ public struct IndexSettings: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -421,7 +422,6 @@ public struct IndexSettings: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -470,9 +470,10 @@ public struct IndexSettings: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -491,7 +492,6 @@ public struct IndexSettings: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -542,9 +542,10 @@ extension IndexSettings: Equatable { lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -560,7 +561,6 @@ extension IndexSettings: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -608,9 +608,10 @@ extension IndexSettings: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -626,7 +627,6 @@ extension IndexSettings: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift index 0756547f20..98f0d3755f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchBaseIndexSettings.swift @@ -102,6 +102,19 @@ public struct SearchBaseIndexSettings: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? public init( attributesForFaceting: [String]? = nil, @@ -121,7 +134,9 @@ public struct SearchBaseIndexSettings: Codable, JSONEncodable { userData: AnyCodable? = nil, customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, - maxFacetHits: Int? = nil + maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil ) { self.attributesForFaceting = attributesForFaceting self.replicas = replicas @@ -141,6 +156,8 @@ public struct SearchBaseIndexSettings: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking } public enum CodingKeys: String, CodingKey, CaseIterable { @@ -162,6 +179,8 @@ public struct SearchBaseIndexSettings: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking } // Encodable protocol methods @@ -186,6 +205,8 @@ public struct SearchBaseIndexSettings: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) } } @@ -208,7 +229,9 @@ extension SearchBaseIndexSettings: Equatable { lhs.userData == rhs.userData && lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && - lhs.maxFacetHits == rhs.maxFacetHits + lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking } } @@ -232,5 +255,7 @@ extension SearchBaseIndexSettings: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) } } diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift index 8c933b0211..496df23f7a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchConsequenceParams.swift @@ -113,15 +113,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -165,10 +156,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -290,7 +277,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { enableABTest: Bool? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -306,7 +292,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -368,7 +353,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { self.enableABTest = enableABTest self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -384,7 +368,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -448,7 +431,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { case enableABTest case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -464,7 +446,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -531,7 +512,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -550,7 +530,6 @@ public struct SearchConsequenceParams: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -619,7 +598,6 @@ extension SearchConsequenceParams: Equatable { lhs.enableABTest == rhs.enableABTest && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -635,7 +613,6 @@ extension SearchConsequenceParams: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -701,7 +678,6 @@ extension SearchConsequenceParams: Hashable { hasher.combine(self.enableABTest?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -717,7 +693,6 @@ extension SearchConsequenceParams: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift index b1e7889d84..0abda5489f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForFacets.swift @@ -117,15 +117,6 @@ public struct SearchForFacets: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -169,10 +160,6 @@ public struct SearchForFacets: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -303,7 +290,6 @@ public struct SearchForFacets: Codable, JSONEncodable { enableABTest: Bool? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -319,7 +305,6 @@ public struct SearchForFacets: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -385,7 +370,6 @@ public struct SearchForFacets: Codable, JSONEncodable { self.enableABTest = enableABTest self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -401,7 +385,6 @@ public struct SearchForFacets: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -469,7 +452,6 @@ public struct SearchForFacets: Codable, JSONEncodable { case enableABTest case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -485,7 +467,6 @@ public struct SearchForFacets: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -556,7 +537,6 @@ public struct SearchForFacets: Codable, JSONEncodable { try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -575,7 +555,6 @@ public struct SearchForFacets: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -648,7 +627,6 @@ extension SearchForFacets: Equatable { lhs.enableABTest == rhs.enableABTest && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -664,7 +642,6 @@ extension SearchForFacets: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -734,7 +711,6 @@ extension SearchForFacets: Hashable { hasher.combine(self.enableABTest?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -750,7 +726,6 @@ extension SearchForFacets: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift index ddb526c04b..14cc2964c2 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchForHits.swift @@ -117,15 +117,6 @@ public struct SearchForHits: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -169,10 +160,6 @@ public struct SearchForHits: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -296,7 +283,6 @@ public struct SearchForHits: Codable, JSONEncodable { enableABTest: Bool? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -312,7 +298,6 @@ public struct SearchForHits: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -375,7 +360,6 @@ public struct SearchForHits: Codable, JSONEncodable { self.enableABTest = enableABTest self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -391,7 +375,6 @@ public struct SearchForHits: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -456,7 +439,6 @@ public struct SearchForHits: Codable, JSONEncodable { case enableABTest case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -472,7 +454,6 @@ public struct SearchForHits: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -540,7 +521,6 @@ public struct SearchForHits: Codable, JSONEncodable { try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -559,7 +539,6 @@ public struct SearchForHits: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -629,7 +608,6 @@ extension SearchForHits: Equatable { lhs.enableABTest == rhs.enableABTest && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -645,7 +623,6 @@ extension SearchForHits: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -712,7 +689,6 @@ extension SearchForHits: Hashable { hasher.combine(self.enableABTest?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -728,7 +704,6 @@ extension SearchForHits: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift index 712303902d..115337b48a 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchIndexSettingsAsSearchParams.swift @@ -22,15 +22,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -74,10 +65,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -165,7 +152,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { public init( attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -181,7 +167,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -209,7 +194,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { ) { self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -225,7 +209,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -255,7 +238,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { public enum CodingKeys: String, CodingKey, CaseIterable { case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -271,7 +253,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -304,7 +285,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -323,7 +303,6 @@ public struct SearchIndexSettingsAsSearchParams: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -358,7 +337,6 @@ extension SearchIndexSettingsAsSearchParams: Equatable { public static func ==(lhs: SearchIndexSettingsAsSearchParams, rhs: SearchIndexSettingsAsSearchParams) -> Bool { lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -374,7 +352,6 @@ extension SearchIndexSettingsAsSearchParams: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -406,7 +383,6 @@ extension SearchIndexSettingsAsSearchParams: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -422,7 +398,6 @@ extension SearchIndexSettingsAsSearchParams: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift index 508eaead90..987f3bb548 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SearchSearchParamsObject.swift @@ -116,15 +116,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -168,10 +159,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -291,7 +278,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { enableABTest: Bool? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -307,7 +293,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -367,7 +352,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { self.enableABTest = enableABTest self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -383,7 +367,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -445,7 +428,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { case enableABTest case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -461,7 +443,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -526,7 +507,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { try container.encodeIfPresent(self.enableABTest, forKey: .enableABTest) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -545,7 +525,6 @@ public struct SearchSearchParamsObject: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -612,7 +591,6 @@ extension SearchSearchParamsObject: Equatable { lhs.enableABTest == rhs.enableABTest && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -628,7 +606,6 @@ extension SearchSearchParamsObject: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -692,7 +669,6 @@ extension SearchSearchParamsObject: Hashable { hasher.combine(self.enableABTest?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -708,7 +684,6 @@ extension SearchSearchParamsObject: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift b/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift index 48cccc2b39..4cbf72364f 100644 --- a/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift +++ b/clients/algoliasearch-client-swift/Sources/Search/Models/SettingsResponse.swift @@ -102,6 +102,19 @@ public struct SettingsResponse: Codable, JSONEncodable { /// 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). public var maxFacetHits: Int? + /// 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. + public var keepDiacriticsOnCharacters: String? + /// 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. + public var customRanking: [String]? /// 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 @@ -117,15 +130,6 @@ public struct SettingsResponse: Codable, JSONEncodable { /// 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/). public var ranking: [String]? - /// 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. - public var customRanking: [String]? /// 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. @@ -169,10 +173,6 @@ public struct SettingsResponse: Codable, JSONEncodable { public var disableTypoToleranceOnAttributes: [String]? public var ignorePlurals: SearchIgnorePlurals? public var removeStopWords: SearchRemoveStopWords? - /// 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. - public var keepDiacriticsOnCharacters: String? /// 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) @@ -278,9 +278,10 @@ public struct SettingsResponse: Codable, JSONEncodable { customNormalization: [String: [String: String]]? = nil, attributeForDistinct: String? = nil, maxFacetHits: Int? = nil, + keepDiacriticsOnCharacters: String? = nil, + customRanking: [String]? = nil, attributesToRetrieve: [String]? = nil, ranking: [String]? = nil, - customRanking: [String]? = nil, relevancyStrictness: Int? = nil, attributesToHighlight: [String]? = nil, attributesToSnippet: [String]? = nil, @@ -296,7 +297,6 @@ public struct SettingsResponse: Codable, JSONEncodable { disableTypoToleranceOnAttributes: [String]? = nil, ignorePlurals: SearchIgnorePlurals? = nil, removeStopWords: SearchRemoveStopWords? = nil, - keepDiacriticsOnCharacters: String? = nil, queryLanguages: [SearchSupportedLanguage]? = nil, decompoundQuery: Bool? = nil, enableRules: Bool? = nil, @@ -341,9 +341,10 @@ public struct SettingsResponse: Codable, JSONEncodable { self.customNormalization = customNormalization self.attributeForDistinct = attributeForDistinct self.maxFacetHits = maxFacetHits + self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters + self.customRanking = customRanking self.attributesToRetrieve = attributesToRetrieve self.ranking = ranking - self.customRanking = customRanking self.relevancyStrictness = relevancyStrictness self.attributesToHighlight = attributesToHighlight self.attributesToSnippet = attributesToSnippet @@ -359,7 +360,6 @@ public struct SettingsResponse: Codable, JSONEncodable { self.disableTypoToleranceOnAttributes = disableTypoToleranceOnAttributes self.ignorePlurals = ignorePlurals self.removeStopWords = removeStopWords - self.keepDiacriticsOnCharacters = keepDiacriticsOnCharacters self.queryLanguages = queryLanguages self.decompoundQuery = decompoundQuery self.enableRules = enableRules @@ -406,9 +406,10 @@ public struct SettingsResponse: Codable, JSONEncodable { case customNormalization case attributeForDistinct case maxFacetHits + case keepDiacriticsOnCharacters + case customRanking case attributesToRetrieve case ranking - case customRanking case relevancyStrictness case attributesToHighlight case attributesToSnippet @@ -424,7 +425,6 @@ public struct SettingsResponse: Codable, JSONEncodable { case disableTypoToleranceOnAttributes case ignorePlurals case removeStopWords - case keepDiacriticsOnCharacters case queryLanguages case decompoundQuery case enableRules @@ -474,9 +474,10 @@ public struct SettingsResponse: Codable, JSONEncodable { try container.encodeIfPresent(self.customNormalization, forKey: .customNormalization) try container.encodeIfPresent(self.attributeForDistinct, forKey: .attributeForDistinct) try container.encodeIfPresent(self.maxFacetHits, forKey: .maxFacetHits) + try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) + try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.attributesToRetrieve, forKey: .attributesToRetrieve) try container.encodeIfPresent(self.ranking, forKey: .ranking) - try container.encodeIfPresent(self.customRanking, forKey: .customRanking) try container.encodeIfPresent(self.relevancyStrictness, forKey: .relevancyStrictness) try container.encodeIfPresent(self.attributesToHighlight, forKey: .attributesToHighlight) try container.encodeIfPresent(self.attributesToSnippet, forKey: .attributesToSnippet) @@ -495,7 +496,6 @@ public struct SettingsResponse: Codable, JSONEncodable { try container.encodeIfPresent(self.disableTypoToleranceOnAttributes, forKey: .disableTypoToleranceOnAttributes) try container.encodeIfPresent(self.ignorePlurals, forKey: .ignorePlurals) try container.encodeIfPresent(self.removeStopWords, forKey: .removeStopWords) - try container.encodeIfPresent(self.keepDiacriticsOnCharacters, forKey: .keepDiacriticsOnCharacters) try container.encodeIfPresent(self.queryLanguages, forKey: .queryLanguages) try container.encodeIfPresent(self.decompoundQuery, forKey: .decompoundQuery) try container.encodeIfPresent(self.enableRules, forKey: .enableRules) @@ -547,9 +547,10 @@ extension SettingsResponse: Equatable { lhs.customNormalization == rhs.customNormalization && lhs.attributeForDistinct == rhs.attributeForDistinct && lhs.maxFacetHits == rhs.maxFacetHits && + lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && + lhs.customRanking == rhs.customRanking && lhs.attributesToRetrieve == rhs.attributesToRetrieve && lhs.ranking == rhs.ranking && - lhs.customRanking == rhs.customRanking && lhs.relevancyStrictness == rhs.relevancyStrictness && lhs.attributesToHighlight == rhs.attributesToHighlight && lhs.attributesToSnippet == rhs.attributesToSnippet && @@ -565,7 +566,6 @@ extension SettingsResponse: Equatable { lhs.disableTypoToleranceOnAttributes == rhs.disableTypoToleranceOnAttributes && lhs.ignorePlurals == rhs.ignorePlurals && lhs.removeStopWords == rhs.removeStopWords && - lhs.keepDiacriticsOnCharacters == rhs.keepDiacriticsOnCharacters && lhs.queryLanguages == rhs.queryLanguages && lhs.decompoundQuery == rhs.decompoundQuery && lhs.enableRules == rhs.enableRules && @@ -614,9 +614,10 @@ extension SettingsResponse: Hashable { hasher.combine(self.customNormalization?.hashValue) hasher.combine(self.attributeForDistinct?.hashValue) hasher.combine(self.maxFacetHits?.hashValue) + hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) + hasher.combine(self.customRanking?.hashValue) hasher.combine(self.attributesToRetrieve?.hashValue) hasher.combine(self.ranking?.hashValue) - hasher.combine(self.customRanking?.hashValue) hasher.combine(self.relevancyStrictness?.hashValue) hasher.combine(self.attributesToHighlight?.hashValue) hasher.combine(self.attributesToSnippet?.hashValue) @@ -632,7 +633,6 @@ extension SettingsResponse: Hashable { hasher.combine(self.disableTypoToleranceOnAttributes?.hashValue) hasher.combine(self.ignorePlurals?.hashValue) hasher.combine(self.removeStopWords?.hashValue) - hasher.combine(self.keepDiacriticsOnCharacters?.hashValue) hasher.combine(self.queryLanguages?.hashValue) hasher.combine(self.decompoundQuery?.hashValue) hasher.combine(self.enableRules?.hashValue) diff --git a/docs/bundled/crawler.yml b/docs/bundled/crawler.yml index 231d2d4af6..c7d5b8da96 100644 --- a/docs/bundled/crawler.yml +++ b/docs/bundled/crawler.yml @@ -1542,6 +1542,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking hitsPerPage: type: integer description: Number of hits per page. @@ -2101,49 +2156,6 @@ components: - custom x-categories: - Ranking - customRanking: - type: array - items: - type: string - example: - - desc(popularity) - - asc(price) - description: > - 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. - default: [] - x-categories: - - Ranking relevancyStrictness: type: integer example: 90 @@ -2316,18 +2328,6 @@ components: $ref: '#/components/schemas/ignorePlurals' removeStopWords: $ref: '#/components/schemas/removeStopWords' - keepDiacriticsOnCharacters: - type: string - example: øé - description: | - 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. - default: '' - x-categories: - - Languages queryLanguages: type: array items: diff --git a/docs/bundled/recommend.yml b/docs/bundled/recommend.yml index 3adceb7c0b..1d8d6fce2b 100644 --- a/docs/bundled/recommend.yml +++ b/docs/bundled/recommend.yml @@ -1485,7 +1485,7 @@ paths: --header 'content-type: application/json' \ --header 'x-algolia-api-key: ALGOLIA_API_KEY' \ --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \ - --data '{"requests":[{"indexName":"products","threshold":0,"maxRecommendations":30,"queryParameters":{"similarQuery":"comedy drama crime Macy Buscemi","filters":"(category:Book OR category:Ebook) AND _tags:published","facetFilters":[["category:Book","category:-Movie"],"author:John Doe"],"optionalFilters":["category:Book","author:John Doe"],"numericFilters":[["inStock = 1","deliveryDate < 1441755506"],"price < 1000"],"tagFilters":[["Book","Movie"],"SciFi"],"sumOrFiltersScores":false,"restrictSearchableAttributes":["title","author"],"facets":["*"],"facetingAfterDistinct":false,"aroundLatLng":"40.71,-74.01","aroundLatLngViaIP":false,"aroundRadius":1,"aroundPrecision":10,"minimumAroundRadius":1,"insideBoundingBox":"lorem","insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"naturalLanguages":[],"ruleContexts":["mobile"],"personalizationImpact":100,"userToken":"test-user-123","getRankingInfo":false,"synonyms":true,"clickAnalytics":false,"analytics":true,"analyticsTags":[],"percentileComputation":true,"enableABTest":true,"query":"","attributesForFaceting":["author","filterOnly(isbn)","searchable(edition)","afterDistinct(category)","afterDistinct(searchable(publisher))"],"replicas":["virtual(prod_products_price_asc)","dev_products_replica"],"paginationLimitedTo":100,"unretrievableAttributes":["total_sales"],"disableTypoToleranceOnWords":["wheel","1X2BCD"],"attributesToTransliterate":["name","description"],"camelCaseAttributes":["description"],"decompoundedAttributes":{"de":["name"]},"indexLanguages":["ja"],"disablePrefixOnAttributes":["sku"],"allowCompressionOfIntegerArray":false,"numericAttributesForFiltering":["equalOnly(quantity)","popularity"],"separatorsToIndex":"+#","searchableAttributes":["title,alternative_title","author","unordered(text)","emails.personal"],"userData":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"},"customNormalization":{"default":{"ä":"ae","ü":"ue"}},"attributeForDistinct":"url","maxFacetHits":10,"attributesToRetrieve":["author","title","content"],"ranking":["typo","geo","words","filters","proximity","attribute","exact","custom"],"relevancyStrictness":90,"attributesToHighlight":["author","title","conten","content"],"attributesToSnippet":["content:80","description"],"highlightPreTag":"","highlightPostTag":"","snippetEllipsisText":"…","restrictHighlightAndSnippetArrays":false,"minWordSizefor1Typo":4,"minWordSizefor2Typos":8,"typoTolerance":true,"allowTyposOnNumericTokens":true,"disableTypoToleranceOnAttributes":["sku"],"ignorePlurals":["ca","es"],"removeStopWords":["ca","es"],"queryLanguages":["es"],"decompoundQuery":true,"enableRules":true,"enablePersonalization":false,"queryType":"prefixLast","removeWordsIfNoResults":"firstWords","advancedSyntax":false,"optionalWords":"lorem","disableExactOnAttributes":["description"],"exactOnSingleWordQuery":"attribute","alternativesAsExact":["ignorePlurals","singleWordSynonym"],"advancedSyntaxFeatures":["exactPhrase","excludeWords"],"distinct":1,"replaceSynonymsInHighlight":false,"minProximity":1,"responseFields":["*"],"maxValuesPerFacet":100,"sortFacetValuesBy":"count","attributeCriteriaComputedByMinProximity":false,"renderingContent":{"facetOrdering":{"facets":{"order":["lorem"]},"values":{"property1":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]},"property2":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]}}},"redirect":{"url":"lorem"},"widgets":{"banners":[{"image":{"urls":[{"url":"lorem"}],"title":"lorem"},"link":{"url":"lorem"}}]}},"enableReRanking":true,"reRankingApplyFilter":[[]]},"model":"bought-together","objectID":"test-record-123"}]}' + --data '{"requests":[{"indexName":"products","threshold":0,"maxRecommendations":30,"queryParameters":{"similarQuery":"comedy drama crime Macy Buscemi","filters":"(category:Book OR category:Ebook) AND _tags:published","facetFilters":[["category:Book","category:-Movie"],"author:John Doe"],"optionalFilters":["category:Book","author:John Doe"],"numericFilters":[["inStock = 1","deliveryDate < 1441755506"],"price < 1000"],"tagFilters":[["Book","Movie"],"SciFi"],"sumOrFiltersScores":false,"restrictSearchableAttributes":["title","author"],"facets":["*"],"facetingAfterDistinct":false,"aroundLatLng":"40.71,-74.01","aroundLatLngViaIP":false,"aroundRadius":1,"aroundPrecision":10,"minimumAroundRadius":1,"insideBoundingBox":"lorem","insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"naturalLanguages":[],"ruleContexts":["mobile"],"personalizationImpact":100,"userToken":"test-user-123","getRankingInfo":false,"synonyms":true,"clickAnalytics":false,"analytics":true,"analyticsTags":[],"percentileComputation":true,"enableABTest":true,"query":"","attributesForFaceting":["author","filterOnly(isbn)","searchable(edition)","afterDistinct(category)","afterDistinct(searchable(publisher))"],"replicas":["virtual(prod_products_price_asc)","dev_products_replica"],"paginationLimitedTo":100,"unretrievableAttributes":["total_sales"],"disableTypoToleranceOnWords":["wheel","1X2BCD"],"attributesToTransliterate":["name","description"],"camelCaseAttributes":["description"],"decompoundedAttributes":{"de":["name"]},"indexLanguages":["ja"],"disablePrefixOnAttributes":["sku"],"allowCompressionOfIntegerArray":false,"numericAttributesForFiltering":["equalOnly(quantity)","popularity"],"separatorsToIndex":"+#","searchableAttributes":["title,alternative_title","author","unordered(text)","emails.personal"],"userData":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"},"customNormalization":{"default":{"ä":"ae","ü":"ue"}},"attributeForDistinct":"url","maxFacetHits":10,"keepDiacriticsOnCharacters":"øé","customRanking":["desc(popularity)","asc(price)"],"attributesToRetrieve":["author","title","content"],"ranking":["typo","geo","words","filters","proximity","attribute","exact","custom"],"relevancyStrictness":90,"attributesToHighlight":["author","title","conten","content"],"attributesToSnippet":["content:80","description"],"highlightPreTag":"","highlightPostTag":"","snippetEllipsisText":"…","restrictHighlightAndSnippetArrays":false,"minWordSizefor1Typo":4,"minWordSizefor2Typos":8,"typoTolerance":true,"allowTyposOnNumericTokens":true,"disableTypoToleranceOnAttributes":["sku"],"ignorePlurals":["ca","es"],"removeStopWords":["ca","es"],"queryLanguages":["es"],"decompoundQuery":true,"enableRules":true,"enablePersonalization":false,"queryType":"prefixLast","removeWordsIfNoResults":"firstWords","advancedSyntax":false,"optionalWords":"lorem","disableExactOnAttributes":["description"],"exactOnSingleWordQuery":"attribute","alternativesAsExact":["ignorePlurals","singleWordSynonym"],"advancedSyntaxFeatures":["exactPhrase","excludeWords"],"distinct":1,"replaceSynonymsInHighlight":false,"minProximity":1,"responseFields":["*"],"maxValuesPerFacet":100,"sortFacetValuesBy":"count","attributeCriteriaComputedByMinProximity":false,"renderingContent":{"facetOrdering":{"facets":{"order":["lorem"]},"values":{"property1":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]},"property2":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]}}},"redirect":{"url":"lorem"},"widgets":{"banners":[{"image":{"urls":[{"url":"lorem"}],"title":"lorem"},"link":{"url":"lorem"}}]}},"enableReRanking":true,"reRankingApplyFilter":[[]]},"model":"bought-together","objectID":"test-record-123"}]}' /1/indexes/{indexName}/{model}/recommend/rules/{objectID}: get: tags: @@ -3885,6 +3885,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking attributesToRetrieve: type: array items: diff --git a/docs/bundled/search.yml b/docs/bundled/search.yml index 683f8e9f1c..486b65ad0d 100644 --- a/docs/bundled/search.yml +++ b/docs/bundled/search.yml @@ -9606,7 +9606,7 @@ paths: --header 'content-type: application/json' \ --header 'x-algolia-api-key: ALGOLIA_API_KEY' \ --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \ - --data '[{"objectID":"lorem","conditions":[{"pattern":"{facet:genre}","anchoring":"is","alternatives":false,"context":"mobile","filters":"genre:comedy"}],"consequence":{"params":{"similarQuery":"comedy drama crime Macy Buscemi","filters":"(category:Book OR category:Ebook) AND _tags:published","facetFilters":[["category:Book","category:-Movie"],"author:John Doe"],"optionalFilters":["category:Book","author:John Doe"],"numericFilters":[["inStock = 1","deliveryDate < 1441755506"],"price < 1000"],"tagFilters":[["Book","Movie"],"SciFi"],"sumOrFiltersScores":false,"restrictSearchableAttributes":["title","author"],"facets":["*"],"facetingAfterDistinct":false,"page":0,"offset":42,"length":0,"aroundLatLng":"40.71,-74.01","aroundLatLngViaIP":false,"aroundRadius":1,"aroundPrecision":10,"minimumAroundRadius":1,"insideBoundingBox":"lorem","insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"naturalLanguages":[],"ruleContexts":["mobile"],"personalizationImpact":100,"userToken":"test-user-123","getRankingInfo":false,"synonyms":true,"clickAnalytics":false,"analytics":true,"analyticsTags":[],"percentileComputation":true,"enableABTest":true,"attributesToRetrieve":["author","title","content"],"ranking":["typo","geo","words","filters","proximity","attribute","exact","custom"],"customRanking":["desc(popularity)","asc(price)"],"relevancyStrictness":90,"attributesToHighlight":["author","title","conten","content"],"attributesToSnippet":["content:80","description"],"highlightPreTag":"","highlightPostTag":"","snippetEllipsisText":"…","restrictHighlightAndSnippetArrays":false,"hitsPerPage":20,"minWordSizefor1Typo":4,"minWordSizefor2Typos":8,"typoTolerance":true,"allowTyposOnNumericTokens":true,"disableTypoToleranceOnAttributes":["sku"],"ignorePlurals":["ca","es"],"removeStopWords":["ca","es"],"keepDiacriticsOnCharacters":"øé","queryLanguages":["es"],"decompoundQuery":true,"enableRules":true,"enablePersonalization":false,"queryType":"prefixLast","removeWordsIfNoResults":"firstWords","mode":"keywordSearch","semanticSearch":{"eventSources":["lorem"]},"advancedSyntax":false,"optionalWords":"lorem","disableExactOnAttributes":["description"],"exactOnSingleWordQuery":"attribute","alternativesAsExact":["ignorePlurals","singleWordSynonym"],"advancedSyntaxFeatures":["exactPhrase","excludeWords"],"distinct":1,"replaceSynonymsInHighlight":false,"minProximity":1,"responseFields":["*"],"maxValuesPerFacet":100,"sortFacetValuesBy":"count","attributeCriteriaComputedByMinProximity":false,"renderingContent":{"facetOrdering":{"facets":{"order":["lorem"]},"values":{"property1":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]},"property2":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]}}},"redirect":{"url":"lorem"},"widgets":{"banners":[{"image":{"urls":[{"url":"lorem"}],"title":"lorem"},"link":{"url":"lorem"}}]}},"enableReRanking":true,"reRankingApplyFilter":[[]],"query":{"remove":["lorem"],"edits":[{"type":"remove","delete":"lorem","insert":"lorem"}]},"automaticFacetFilters":[{"facet":"lorem","score":1,"disjunctive":false}],"automaticOptionalFacetFilters":[{"facet":"lorem","score":1,"disjunctive":false}]},"promote":[{"objectIDs":["test-record-123"],"position":0}],"filterPromotes":false,"hide":[{"objectID":"test-record-123"}],"userData":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"}},"description":"Display a promotional banner","enabled":true,"validity":[{"from":42,"until":42}]}]' + --data '[{"objectID":"lorem","conditions":[{"pattern":"{facet:genre}","anchoring":"is","alternatives":false,"context":"mobile","filters":"genre:comedy"}],"consequence":{"params":{"similarQuery":"comedy drama crime Macy Buscemi","filters":"(category:Book OR category:Ebook) AND _tags:published","facetFilters":[["category:Book","category:-Movie"],"author:John Doe"],"optionalFilters":["category:Book","author:John Doe"],"numericFilters":[["inStock = 1","deliveryDate < 1441755506"],"price < 1000"],"tagFilters":[["Book","Movie"],"SciFi"],"sumOrFiltersScores":false,"restrictSearchableAttributes":["title","author"],"facets":["*"],"facetingAfterDistinct":false,"page":0,"offset":42,"length":0,"aroundLatLng":"40.71,-74.01","aroundLatLngViaIP":false,"aroundRadius":1,"aroundPrecision":10,"minimumAroundRadius":1,"insideBoundingBox":"lorem","insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"naturalLanguages":[],"ruleContexts":["mobile"],"personalizationImpact":100,"userToken":"test-user-123","getRankingInfo":false,"synonyms":true,"clickAnalytics":false,"analytics":true,"analyticsTags":[],"percentileComputation":true,"enableABTest":true,"attributesToRetrieve":["author","title","content"],"ranking":["typo","geo","words","filters","proximity","attribute","exact","custom"],"relevancyStrictness":90,"attributesToHighlight":["author","title","conten","content"],"attributesToSnippet":["content:80","description"],"highlightPreTag":"","highlightPostTag":"","snippetEllipsisText":"…","restrictHighlightAndSnippetArrays":false,"hitsPerPage":20,"minWordSizefor1Typo":4,"minWordSizefor2Typos":8,"typoTolerance":true,"allowTyposOnNumericTokens":true,"disableTypoToleranceOnAttributes":["sku"],"ignorePlurals":["ca","es"],"removeStopWords":["ca","es"],"queryLanguages":["es"],"decompoundQuery":true,"enableRules":true,"enablePersonalization":false,"queryType":"prefixLast","removeWordsIfNoResults":"firstWords","mode":"keywordSearch","semanticSearch":{"eventSources":["lorem"]},"advancedSyntax":false,"optionalWords":"lorem","disableExactOnAttributes":["description"],"exactOnSingleWordQuery":"attribute","alternativesAsExact":["ignorePlurals","singleWordSynonym"],"advancedSyntaxFeatures":["exactPhrase","excludeWords"],"distinct":1,"replaceSynonymsInHighlight":false,"minProximity":1,"responseFields":["*"],"maxValuesPerFacet":100,"sortFacetValuesBy":"count","attributeCriteriaComputedByMinProximity":false,"renderingContent":{"facetOrdering":{"facets":{"order":["lorem"]},"values":{"property1":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]},"property2":{"order":["lorem"],"sortRemainingBy":"count","hide":["lorem"]}}},"redirect":{"url":"lorem"},"widgets":{"banners":[{"image":{"urls":[{"url":"lorem"}],"title":"lorem"},"link":{"url":"lorem"}}]}},"enableReRanking":true,"reRankingApplyFilter":[[]],"query":{"remove":["lorem"],"edits":[{"type":"remove","delete":"lorem","insert":"lorem"}]},"automaticFacetFilters":[{"facet":"lorem","score":1,"disjunctive":false}],"automaticOptionalFacetFilters":[{"facet":"lorem","score":1,"disjunctive":false}]},"promote":[{"objectIDs":["test-record-123"],"position":0}],"filterPromotes":false,"hide":[{"objectID":"test-record-123"}],"userData":{"settingID":"f2a7b51e3503acc6a39b3784ffb84300","pluginVersion":"1.6.0"}},"description":"Display a promotional banner","enabled":true,"validity":[{"from":42,"until":42}]}]' /1/indexes/{indexName}/rules/clear: post: tags: @@ -18128,49 +18128,6 @@ components: - custom x-categories: - Ranking - customRanking: - type: array - items: - type: string - example: - - desc(popularity) - - asc(price) - description: > - 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. - default: [] - x-categories: - - Ranking relevancyStrictness: type: integer example: 90 @@ -18343,18 +18300,6 @@ components: $ref: '#/components/schemas/ignorePlurals' removeStopWords: $ref: '#/components/schemas/removeStopWords' - keepDiacriticsOnCharacters: - type: string - example: øé - description: | - 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. - default: '' - x-categories: - - Languages queryLanguages: type: array items: @@ -19899,6 +19844,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking indexSettings: description: Index settings. allOf: diff --git a/specs/bundled/algoliasearch.yml b/specs/bundled/algoliasearch.yml index a5b740b8e8..12c5c348af 100644 --- a/specs/bundled/algoliasearch.yml +++ b/specs/bundled/algoliasearch.yml @@ -1741,49 +1741,6 @@ components: - custom x-categories: - Ranking - customRanking: - type: array - items: - type: string - example: - - desc(popularity) - - asc(price) - description: > - 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. - default: [] - x-categories: - - Ranking relevancyStrictness: type: integer example: 90 @@ -1956,18 +1913,6 @@ components: $ref: '#/components/schemas/ignorePlurals' removeStopWords: $ref: '#/components/schemas/removeStopWords' - keepDiacriticsOnCharacters: - type: string - example: øé - description: | - 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. - default: '' - x-categories: - - Languages queryLanguages: type: array items: @@ -3381,6 +3326,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking indexSettings: description: Index settings. allOf: diff --git a/specs/bundled/crawler.yml b/specs/bundled/crawler.yml index 7b6384e7dc..37c4f27241 100644 --- a/specs/bundled/crawler.yml +++ b/specs/bundled/crawler.yml @@ -1542,6 +1542,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking hitsPerPage: type: integer description: Number of hits per page. @@ -2101,49 +2156,6 @@ components: - custom x-categories: - Ranking - customRanking: - type: array - items: - type: string - example: - - desc(popularity) - - asc(price) - description: > - 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. - default: [] - x-categories: - - Ranking relevancyStrictness: type: integer example: 90 @@ -2316,18 +2328,6 @@ components: $ref: '#/components/schemas/ignorePlurals' removeStopWords: $ref: '#/components/schemas/removeStopWords' - keepDiacriticsOnCharacters: - type: string - example: øé - description: | - 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. - default: '' - x-categories: - - Languages queryLanguages: type: array items: diff --git a/specs/bundled/recommend.yml b/specs/bundled/recommend.yml index eab1a7884c..2732effed0 100644 --- a/specs/bundled/recommend.yml +++ b/specs/bundled/recommend.yml @@ -1791,6 +1791,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking attributesToRetrieve: type: array items: diff --git a/specs/bundled/search.yml b/specs/bundled/search.yml index 405c621975..0e072510d0 100644 --- a/specs/bundled/search.yml +++ b/specs/bundled/search.yml @@ -5095,49 +5095,6 @@ components: - custom x-categories: - Ranking - customRanking: - type: array - items: - type: string - example: - - desc(popularity) - - asc(price) - description: > - 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. - default: [] - x-categories: - - Ranking relevancyStrictness: type: integer example: 90 @@ -5310,18 +5267,6 @@ components: $ref: '#/components/schemas/ignorePlurals' removeStopWords: $ref: '#/components/schemas/removeStopWords' - keepDiacriticsOnCharacters: - type: string - example: øé - description: | - 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. - default: '' - x-categories: - - Languages queryLanguages: type: array items: @@ -6866,6 +6811,61 @@ components: type: string maxFacetHits: $ref: '#/components/schemas/maxFacetHits' + keepDiacriticsOnCharacters: + type: string + example: øé + description: | + 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. + default: '' + x-categories: + - Languages + customRanking: + type: array + items: + type: string + example: + - desc(popularity) + - asc(price) + description: > + 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. + default: [] + x-categories: + - Ranking indexSettings: description: Index settings. allOf: diff --git a/tests/output/csharp/src/generated/requests/Search.test.cs b/tests/output/csharp/src/generated/requests/Search.test.cs index 21bbe26732..93bf8e996e 100644 --- a/tests/output/csharp/src/generated/requests/Search.test.cs +++ b/tests/output/csharp/src/generated/requests/Search.test.cs @@ -2715,7 +2715,6 @@ await client.SearchAsync( AttributesToRetrieve = new List { "" }, AttributesToSnippet = new List { "" }, ClickAnalytics = true, - CustomRanking = new List { "" }, DecompoundQuery = true, DisableExactOnAttributes = new List { "" }, DisableTypoToleranceOnAttributes = new List { "" }, @@ -2747,7 +2746,6 @@ await client.SearchAsync( new List { 47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9 }, new List { 40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104 }, }, - KeepDiacriticsOnCharacters = "", Length = 1, MaxValuesPerFacet = 0, MinProximity = 1, @@ -2824,7 +2822,7 @@ await client.SearchAsync( Assert.Equal("/1/indexes/*/queries", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", req.Body, new JsonDiffConfig(false) ); diff --git a/tests/output/dart/test/requests/algoliasearch_test.dart b/tests/output/dart/test/requests/algoliasearch_test.dart index 67a0411f5c..c4ec633f90 100644 --- a/tests/output/dart/test/requests/algoliasearch_test.dart +++ b/tests/output/dart/test/requests/algoliasearch_test.dart @@ -1243,9 +1243,6 @@ void main() { "", ], clickAnalytics: true, - customRanking: [ - "", - ], decompoundQuery: true, disableExactOnAttributes: [ "", @@ -1306,7 +1303,6 @@ void main() { 2.0104, ], ], - keepDiacriticsOnCharacters: "", length: 1, maxValuesPerFacet: 0, minProximity: 1, @@ -1392,7 +1388,7 @@ void main() { expectPath(request.path, '/1/indexes/*/queries'); expect(request.method, 'post'); expectBody(request.body, - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); }, ), ); diff --git a/tests/output/dart/test/requests/search_test.dart b/tests/output/dart/test/requests/search_test.dart index 6bb4dec7bc..6f231ef34f 100644 --- a/tests/output/dart/test/requests/search_test.dart +++ b/tests/output/dart/test/requests/search_test.dart @@ -3076,9 +3076,6 @@ void main() { "", ], clickAnalytics: true, - customRanking: [ - "", - ], decompoundQuery: true, disableExactOnAttributes: [ "", @@ -3139,7 +3136,6 @@ void main() { 2.0104, ], ], - keepDiacriticsOnCharacters: "", length: 1, maxValuesPerFacet: 0, minProximity: 1, @@ -3225,7 +3221,7 @@ void main() { expectPath(request.path, '/1/indexes/*/queries'); expect(request.method, 'post'); expectBody(request.body, - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}"""); }, ), ); diff --git a/tests/output/go/tests/requests/search_test.go b/tests/output/go/tests/requests/search_test.go index 13cfdc7c0c..c379900727 100644 --- a/tests/output/go/tests/requests/search_test.go +++ b/tests/output/go/tests/requests/search_test.go @@ -1924,8 +1924,7 @@ func TestSearch_Search(t *testing.T) { []string{""}).SetAroundLatLng("").SetAroundLatLngViaIP(true).SetAroundPrecision(search.Int32AsAroundPrecision(0)).SetAroundRadius(search.AroundRadiusAllAsAroundRadius(search.AroundRadiusAll("all"))).SetAttributeCriteriaComputedByMinProximity(true).SetAttributesToHighlight( []string{""}).SetAttributesToRetrieve( []string{""}).SetAttributesToSnippet( - []string{""}).SetClickAnalytics(true).SetCustomRanking( - []string{""}).SetDecompoundQuery(true).SetDisableExactOnAttributes( + []string{""}).SetClickAnalytics(true).SetDecompoundQuery(true).SetDisableExactOnAttributes( []string{""}).SetDisableTypoToleranceOnAttributes( []string{""}).SetDistinct(search.Int32AsDistinct(0)).SetEnableABTest(true).SetEnablePersonalization(true).SetEnableReRanking(true).SetEnableRules(true).SetExactOnSingleWordQuery(search.ExactOnSingleWordQuery("attribute")).SetFacetFilters(search.ArrayOfFacetFiltersAsFacetFilters( []search.FacetFilters{*search.StringAsFacetFilters("")})).SetFacetingAfterDistinct(true).SetFacets( @@ -1935,7 +1934,7 @@ func TestSearch_Search(t *testing.T) { []float64{40.9234, 2.1185, 38.643, 1.9916}})).SetInsidePolygon( [][]float64{ []float64{47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9}, - []float64{40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104}}).SetKeepDiacriticsOnCharacters("").SetLength(1).SetMaxValuesPerFacet(0).SetMinProximity(1).SetMinWordSizefor1Typo(0).SetMinWordSizefor2Typos(0).SetMinimumAroundRadius(1).SetNaturalLanguages( + []float64{40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104}}).SetLength(1).SetMaxValuesPerFacet(0).SetMinProximity(1).SetMinWordSizefor1Typo(0).SetMinWordSizefor2Typos(0).SetMinimumAroundRadius(1).SetNaturalLanguages( []search.SupportedLanguage{search.SupportedLanguage("fr")}).SetNumericFilters(search.ArrayOfNumericFiltersAsNumericFilters( []search.NumericFilters{*search.StringAsNumericFilters("")})).SetOffset(0).SetOptionalFilters(search.ArrayOfOptionalFiltersAsOptionalFilters( []search.OptionalFilters{*search.StringAsOptionalFilters("")})).SetOptionalWords(search.ArrayOfStringAsOptionalWords( @@ -1959,7 +1958,7 @@ func TestSearch_Search(t *testing.T) { require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}`) + ja.Assertf(*echo.Body, `{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}`) }) } diff --git a/tests/output/java/src/test/java/com/algolia/requests/Search.test.java b/tests/output/java/src/test/java/com/algolia/requests/Search.test.java index a2df055671..1e3267f990 100644 --- a/tests/output/java/src/test/java/com/algolia/requests/Search.test.java +++ b/tests/output/java/src/test/java/com/algolia/requests/Search.test.java @@ -2765,7 +2765,6 @@ void searchTest15() { .setAttributesToRetrieve(Arrays.asList("")) .setAttributesToSnippet(Arrays.asList("")) .setClickAnalytics(true) - .setCustomRanking(Arrays.asList("")) .setDecompoundQuery(true) .setDisableExactOnAttributes(Arrays.asList("")) .setDisableTypoToleranceOnAttributes(Arrays.asList("")) @@ -2796,7 +2795,6 @@ void searchTest15() { Arrays.asList(40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104) ) ) - .setKeepDiacriticsOnCharacters("") .setLength(1) .setMaxValuesPerFacet(0) .setMinProximity(1) @@ -2857,7 +2855,7 @@ void searchTest15() { assertEquals("POST", req.method); assertDoesNotThrow(() -> JSONAssert.assertEquals( - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}", req.body, JSONCompareMode.STRICT ) diff --git a/tests/output/javascript/src/requests/algoliasearch.test.ts b/tests/output/javascript/src/requests/algoliasearch.test.ts index 15794d2e5f..935035da2b 100644 --- a/tests/output/javascript/src/requests/algoliasearch.test.ts +++ b/tests/output/javascript/src/requests/algoliasearch.test.ts @@ -718,7 +718,6 @@ describe('search', () => { attributesToRetrieve: [''], attributesToSnippet: [''], clickAnalytics: true, - customRanking: [''], decompoundQuery: true, disableExactOnAttributes: [''], disableTypoToleranceOnAttributes: [''], @@ -746,7 +745,6 @@ describe('search', () => { [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104], ], - keepDiacriticsOnCharacters: '', length: 1, maxValuesPerFacet: 0, minProximity: 1, @@ -810,7 +808,6 @@ describe('search', () => { attributesToRetrieve: [''], attributesToSnippet: [''], clickAnalytics: true, - customRanking: [''], decompoundQuery: true, disableExactOnAttributes: [''], disableTypoToleranceOnAttributes: [''], @@ -838,7 +835,6 @@ describe('search', () => { [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104], ], - keepDiacriticsOnCharacters: '', length: 1, maxValuesPerFacet: 0, minProximity: 1, diff --git a/tests/output/javascript/src/requests/search.test.ts b/tests/output/javascript/src/requests/search.test.ts index d1e004d218..680d3a8ad6 100644 --- a/tests/output/javascript/src/requests/search.test.ts +++ b/tests/output/javascript/src/requests/search.test.ts @@ -1708,7 +1708,6 @@ describe('search', () => { attributesToRetrieve: [''], attributesToSnippet: [''], clickAnalytics: true, - customRanking: [''], decompoundQuery: true, disableExactOnAttributes: [''], disableTypoToleranceOnAttributes: [''], @@ -1736,7 +1735,6 @@ describe('search', () => { [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104], ], - keepDiacriticsOnCharacters: '', length: 1, maxValuesPerFacet: 0, minProximity: 1, @@ -1800,7 +1798,6 @@ describe('search', () => { attributesToRetrieve: [''], attributesToSnippet: [''], clickAnalytics: true, - customRanking: [''], decompoundQuery: true, disableExactOnAttributes: [''], disableTypoToleranceOnAttributes: [''], @@ -1828,7 +1825,6 @@ describe('search', () => { [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104], ], - keepDiacriticsOnCharacters: '', length: 1, maxValuesPerFacet: 0, minProximity: 1, diff --git a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt index 153e7cf0d4..d4a92923f8 100644 --- a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt +++ b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/SearchTest.kt @@ -2639,7 +2639,6 @@ class SearchTest { attributesToRetrieve = listOf(""), attributesToSnippet = listOf(""), clickAnalytics = true, - customRanking = listOf(""), decompoundQuery = true, disableExactOnAttributes = listOf(""), disableTypoToleranceOnAttributes = listOf(""), @@ -2661,7 +2660,6 @@ class SearchTest { indexName = "theIndexName", insideBoundingBox = InsideBoundingBox.of(listOf(listOf(47.3165, 4.9665, 47.3424, 5.0201), listOf(40.9234, 2.1185, 38.643, 1.9916))), insidePolygon = listOf(listOf(47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9), listOf(40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104)), - keepDiacriticsOnCharacters = "", length = 1, maxValuesPerFacet = 0, minProximity = 1, @@ -2719,7 +2717,7 @@ class SearchTest { intercept = { assertEquals("/1/indexes/*/queries".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""", it.body) + assertJsonBody("""{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""", it.body) }, ) } diff --git a/tests/output/php/src/requests/SearchTest.php b/tests/output/php/src/requests/SearchTest.php index 14e0318561..95e26c8351 100644 --- a/tests/output/php/src/requests/SearchTest.php +++ b/tests/output/php/src/requests/SearchTest.php @@ -2579,9 +2579,6 @@ public function testSearch15(): void '', ], 'clickAnalytics' => true, - 'customRanking' => [ - '', - ], 'decompoundQuery' => true, 'disableExactOnAttributes' => [ '', @@ -2659,7 +2656,6 @@ public function testSearch15(): void 2.0104, ], ], - 'keepDiacriticsOnCharacters' => '', 'length' => 1, 'maxValuesPerFacet' => 0, 'minProximity' => 1, @@ -2741,7 +2737,7 @@ public function testSearch15(): void [ 'path' => '/1/indexes/*/queries', 'method' => 'POST', - 'body' => json_decode('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), + 'body' => json_decode('{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}'), ], ]); } diff --git a/tests/output/python/tests/requests/search_test.py b/tests/output/python/tests/requests/search_test.py index f5622290ff..4c3a06faa8 100644 --- a/tests/output/python/tests/requests/search_test.py +++ b/tests/output/python/tests/requests/search_test.py @@ -2435,9 +2435,6 @@ async def test_search_15(self): "", ], "clickAnalytics": True, - "customRanking": [ - "", - ], "decompoundQuery": True, "disableExactOnAttributes": [ "", @@ -2497,7 +2494,6 @@ async def test_search_15(self): 2.0104, ], ], - "keepDiacriticsOnCharacters": "", "length": 1, "maxValuesPerFacet": 0, "minProximity": 1, @@ -2584,7 +2580,7 @@ async def test_search_15(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" ) async def test_search_dictionary_entries_(self): @@ -5661,9 +5657,6 @@ def test_search_15(self): "", ], "clickAnalytics": True, - "customRanking": [ - "", - ], "decompoundQuery": True, "disableExactOnAttributes": [ "", @@ -5723,7 +5716,6 @@ def test_search_15(self): 2.0104, ], ], - "keepDiacriticsOnCharacters": "", "length": 1, "maxValuesPerFacet": 0, "minProximity": 1, @@ -5810,7 +5802,7 @@ def test_search_15(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" ) def test_search_dictionary_entries_(self): diff --git a/tests/output/ruby/test/requests/search_test.rb b/tests/output/ruby/test/requests/search_test.rb index 9a1aed9700..4ae6bad013 100644 --- a/tests/output/ruby/test/requests/search_test.rb +++ b/tests/output/ruby/test/requests/search_test.rb @@ -1904,7 +1904,6 @@ def test_search15 attributes_to_retrieve: [""], attributes_to_snippet: [""], click_analytics: true, - custom_ranking: [""], decompound_query: true, disable_exact_on_attributes: [""], disable_typo_tolerance_on_attributes: [""], @@ -1929,7 +1928,6 @@ def test_search15 [47.3165, 4.9665, 47.3424, 5.0201, 47.32, 4.9], [40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104] ], - keep_diacritics_on_characters: "", length: 1, max_values_per_facet: 0, min_proximity: 1, @@ -1983,7 +1981,7 @@ def test_search15 assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( JSON.parse( - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" ), JSON.parse(req.body) ) diff --git a/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala b/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala index 39b02fb6f7..3804a0a7a4 100644 --- a/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala +++ b/tests/output/scala/src/test/scala/algoliasearch/requests/SearchTest.scala @@ -2640,7 +2640,6 @@ class SearchTest extends AnyFunSuite { attributesToRetrieve = Some(Seq("")), attributesToSnippet = Some(Seq("")), clickAnalytics = Some(true), - customRanking = Some(Seq("")), decompoundQuery = Some(true), disableExactOnAttributes = Some(Seq("")), disableTypoToleranceOnAttributes = Some(Seq("")), @@ -2668,7 +2667,6 @@ class SearchTest extends AnyFunSuite { Seq(40.9234, 2.1185, 38.643, 1.9916, 39.2587, 2.0104) ) ), - keepDiacriticsOnCharacters = Some(""), length = Some(1), maxValuesPerFacet = Some(0), minProximity = Some(1), @@ -2737,7 +2735,7 @@ class SearchTest extends AnyFunSuite { assert(res.path == "/1/indexes/*/queries") assert(res.method == "POST") val expectedBody = parse( - """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"customRanking":[""],"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"keepDiacriticsOnCharacters":"","length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" + """{"requests":[{"advancedSyntax":true,"advancedSyntaxFeatures":["exactPhrase"],"allowTyposOnNumericTokens":true,"alternativesAsExact":["multiWordsSynonym"],"analytics":true,"analyticsTags":[""],"aroundLatLng":"","aroundLatLngViaIP":true,"aroundPrecision":0,"aroundRadius":"all","attributeCriteriaComputedByMinProximity":true,"attributesToHighlight":[""],"attributesToRetrieve":[""],"attributesToSnippet":[""],"clickAnalytics":true,"decompoundQuery":true,"disableExactOnAttributes":[""],"disableTypoToleranceOnAttributes":[""],"distinct":0,"enableABTest":true,"enablePersonalization":true,"enableReRanking":true,"enableRules":true,"exactOnSingleWordQuery":"attribute","facetFilters":[""],"facetingAfterDistinct":true,"facets":[""],"filters":"","getRankingInfo":true,"highlightPostTag":"","highlightPreTag":"","hitsPerPage":1,"ignorePlurals":false,"indexName":"theIndexName","insideBoundingBox":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],"insidePolygon":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],"length":1,"maxValuesPerFacet":0,"minProximity":1,"minWordSizefor1Typo":0,"minWordSizefor2Typos":0,"minimumAroundRadius":1,"naturalLanguages":["fr"],"numericFilters":[""],"offset":0,"optionalFilters":[""],"optionalWords":[""],"page":0,"percentileComputation":true,"personalizationImpact":0,"query":"","queryLanguages":["fr"],"queryType":"prefixAll","ranking":[""],"reRankingApplyFilter":[""],"relevancyStrictness":0,"removeStopWords":true,"removeWordsIfNoResults":"allOptional","renderingContent":{"facetOrdering":{"facets":{"order":["a","b"]},"values":{"a":{"order":["b"],"sortRemainingBy":"count"}}}},"replaceSynonymsInHighlight":true,"responseFields":[""],"restrictHighlightAndSnippetArrays":true,"restrictSearchableAttributes":[""],"ruleContexts":[""],"similarQuery":"","snippetEllipsisText":"","sortFacetValuesBy":"","sumOrFiltersScores":true,"synonyms":true,"tagFilters":[""],"type":"default","typoTolerance":"min","userToken":""}]}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) diff --git a/tests/output/swift/Tests/requests/SearchTests.swift b/tests/output/swift/Tests/requests/SearchTests.swift index 5db57c754d..b17835454c 100644 --- a/tests/output/swift/Tests/requests/SearchTests.swift +++ b/tests/output/swift/Tests/requests/SearchTests.swift @@ -3561,7 +3561,6 @@ final class SearchClientRequestsTests: XCTestCase { enableABTest: true, attributesToRetrieve: [""], ranking: [""], - customRanking: [""], relevancyStrictness: 0, attributesToHighlight: [""], attributesToSnippet: [""], @@ -3577,7 +3576,6 @@ final class SearchClientRequestsTests: XCTestCase { disableTypoToleranceOnAttributes: [""], ignorePlurals: SearchIgnorePlurals.bool(false), removeStopWords: SearchRemoveStopWords.bool(true), - keepDiacriticsOnCharacters: "", queryLanguages: [SearchSupportedLanguage.fr], decompoundQuery: true, enableRules: true, @@ -3615,7 +3613,7 @@ final class SearchClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"customRanking\":[\"\"],\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"keepDiacriticsOnCharacters\":\"\",\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" + "{\"requests\":[{\"advancedSyntax\":true,\"advancedSyntaxFeatures\":[\"exactPhrase\"],\"allowTyposOnNumericTokens\":true,\"alternativesAsExact\":[\"multiWordsSynonym\"],\"analytics\":true,\"analyticsTags\":[\"\"],\"aroundLatLng\":\"\",\"aroundLatLngViaIP\":true,\"aroundPrecision\":0,\"aroundRadius\":\"all\",\"attributeCriteriaComputedByMinProximity\":true,\"attributesToHighlight\":[\"\"],\"attributesToRetrieve\":[\"\"],\"attributesToSnippet\":[\"\"],\"clickAnalytics\":true,\"decompoundQuery\":true,\"disableExactOnAttributes\":[\"\"],\"disableTypoToleranceOnAttributes\":[\"\"],\"distinct\":0,\"enableABTest\":true,\"enablePersonalization\":true,\"enableReRanking\":true,\"enableRules\":true,\"exactOnSingleWordQuery\":\"attribute\",\"facetFilters\":[\"\"],\"facetingAfterDistinct\":true,\"facets\":[\"\"],\"filters\":\"\",\"getRankingInfo\":true,\"highlightPostTag\":\"\",\"highlightPreTag\":\"\",\"hitsPerPage\":1,\"ignorePlurals\":false,\"indexName\":\"theIndexName\",\"insideBoundingBox\":[[47.3165,4.9665,47.3424,5.0201],[40.9234,2.1185,38.643,1.9916]],\"insidePolygon\":[[47.3165,4.9665,47.3424,5.0201,47.32,4.9],[40.9234,2.1185,38.643,1.9916,39.2587,2.0104]],\"length\":1,\"maxValuesPerFacet\":0,\"minProximity\":1,\"minWordSizefor1Typo\":0,\"minWordSizefor2Typos\":0,\"minimumAroundRadius\":1,\"naturalLanguages\":[\"fr\"],\"numericFilters\":[\"\"],\"offset\":0,\"optionalFilters\":[\"\"],\"optionalWords\":[\"\"],\"page\":0,\"percentileComputation\":true,\"personalizationImpact\":0,\"query\":\"\",\"queryLanguages\":[\"fr\"],\"queryType\":\"prefixAll\",\"ranking\":[\"\"],\"reRankingApplyFilter\":[\"\"],\"relevancyStrictness\":0,\"removeStopWords\":true,\"removeWordsIfNoResults\":\"allOptional\",\"renderingContent\":{\"facetOrdering\":{\"facets\":{\"order\":[\"a\",\"b\"]},\"values\":{\"a\":{\"order\":[\"b\"],\"sortRemainingBy\":\"count\"}}}},\"replaceSynonymsInHighlight\":true,\"responseFields\":[\"\"],\"restrictHighlightAndSnippetArrays\":true,\"restrictSearchableAttributes\":[\"\"],\"ruleContexts\":[\"\"],\"similarQuery\":\"\",\"snippetEllipsisText\":\"\",\"sortFacetValuesBy\":\"\",\"sumOrFiltersScores\":true,\"synonyms\":true,\"tagFilters\":[\"\"],\"type\":\"default\",\"typoTolerance\":\"min\",\"userToken\":\"\"}]}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) @@ -4487,9 +4485,10 @@ final class SearchClientRequestsTests: XCTestCase { customNormalization: ["algolia": ["aloglia": "aglolia"]], attributeForDistinct: "test", maxFacetHits: 20, + keepDiacriticsOnCharacters: "abc", + customRanking: ["algolia"], attributesToRetrieve: ["algolia"], ranking: ["geo"], - customRanking: ["algolia"], relevancyStrictness: 10, attributesToHighlight: ["algolia"], attributesToSnippet: ["algolia"], @@ -4505,7 +4504,6 @@ final class SearchClientRequestsTests: XCTestCase { disableTypoToleranceOnAttributes: ["algolia"], ignorePlurals: SearchIgnorePlurals.bool(false), removeStopWords: SearchRemoveStopWords.bool(false), - keepDiacriticsOnCharacters: "abc", queryLanguages: [SearchSupportedLanguage.fr], decompoundQuery: false, enableRules: true,