Skip to content

Commit 15cc63e

Browse files
algolia-botmillotp
andcommitted
fix(specs): move customRanking and keepDiacriticsOnCharacters to indexSettings [skip-bc] (generated)
algolia/api-clients-automation#4324 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent c74414c commit 15cc63e

File tree

9 files changed

+24
-42
lines changed

9 files changed

+24
-42
lines changed

algoliasearch/recommend/models/fallback_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
"custom_normalization": "customNormalization",
9494
"attribute_for_distinct": "attributeForDistinct",
9595
"max_facet_hits": "maxFacetHits",
96+
"keep_diacritics_on_characters": "keepDiacriticsOnCharacters",
97+
"custom_ranking": "customRanking",
9698
"attributes_to_retrieve": "attributesToRetrieve",
9799
"ranking": "ranking",
98100
"relevancy_strictness": "relevancyStrictness",
@@ -230,6 +232,10 @@ class FallbackParams(BaseModel):
230232
""" 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. """
231233
max_facet_hits: Optional[int] = None
232234
""" 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). """
235+
keep_diacritics_on_characters: Optional[str] = None
236+
""" 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. """
237+
custom_ranking: Optional[List[str]] = None
238+
""" 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. """
233239
attributes_to_retrieve: Optional[List[str]] = None
234240
""" 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. """
235241
ranking: Optional[List[str]] = None

algoliasearch/recommend/models/recommend_search_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
"custom_normalization": "customNormalization",
9494
"attribute_for_distinct": "attributeForDistinct",
9595
"max_facet_hits": "maxFacetHits",
96+
"keep_diacritics_on_characters": "keepDiacriticsOnCharacters",
97+
"custom_ranking": "customRanking",
9698
"attributes_to_retrieve": "attributesToRetrieve",
9799
"ranking": "ranking",
98100
"relevancy_strictness": "relevancyStrictness",
@@ -230,6 +232,10 @@ class RecommendSearchParams(BaseModel):
230232
""" 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. """
231233
max_facet_hits: Optional[int] = None
232234
""" 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). """
235+
keep_diacritics_on_characters: Optional[str] = None
236+
""" 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. """
237+
custom_ranking: Optional[List[str]] = None
238+
""" 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. """
233239
attributes_to_retrieve: Optional[List[str]] = None
234240
""" 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. """
235241
ranking: Optional[List[str]] = None

algoliasearch/search/models/browse_params_object.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"enable_ab_test": "enableABTest",
8181
"attributes_to_retrieve": "attributesToRetrieve",
8282
"ranking": "ranking",
83-
"custom_ranking": "customRanking",
8483
"relevancy_strictness": "relevancyStrictness",
8584
"attributes_to_highlight": "attributesToHighlight",
8685
"attributes_to_snippet": "attributesToSnippet",
@@ -96,7 +95,6 @@
9695
"disable_typo_tolerance_on_attributes": "disableTypoToleranceOnAttributes",
9796
"ignore_plurals": "ignorePlurals",
9897
"remove_stop_words": "removeStopWords",
99-
"keep_diacritics_on_characters": "keepDiacriticsOnCharacters",
10098
"query_languages": "queryLanguages",
10199
"decompound_query": "decompoundQuery",
102100
"enable_rules": "enableRules",
@@ -195,8 +193,6 @@ class BrowseParamsObject(BaseModel):
195193
""" 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. """
196194
ranking: Optional[List[str]] = None
197195
""" 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/). """
198-
custom_ranking: Optional[List[str]] = None
199-
""" 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. """
200196
relevancy_strictness: Optional[int] = None
201197
""" 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. """
202198
attributes_to_highlight: Optional[List[str]] = None
@@ -224,8 +220,6 @@ class BrowseParamsObject(BaseModel):
224220
""" 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. """
225221
ignore_plurals: Optional[IgnorePlurals] = None
226222
remove_stop_words: Optional[RemoveStopWords] = None
227-
keep_diacritics_on_characters: Optional[str] = None
228-
""" 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. """
229223
query_languages: Optional[List[SupportedLanguage]] = None
230224
""" 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/). """
231225
decompound_query: Optional[bool] = None

algoliasearch/search/models/consequence_params.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"enable_ab_test": "enableABTest",
8282
"attributes_to_retrieve": "attributesToRetrieve",
8383
"ranking": "ranking",
84-
"custom_ranking": "customRanking",
8584
"relevancy_strictness": "relevancyStrictness",
8685
"attributes_to_highlight": "attributesToHighlight",
8786
"attributes_to_snippet": "attributesToSnippet",
@@ -97,7 +96,6 @@
9796
"disable_typo_tolerance_on_attributes": "disableTypoToleranceOnAttributes",
9897
"ignore_plurals": "ignorePlurals",
9998
"remove_stop_words": "removeStopWords",
100-
"keep_diacritics_on_characters": "keepDiacriticsOnCharacters",
10199
"query_languages": "queryLanguages",
102100
"decompound_query": "decompoundQuery",
103101
"enable_rules": "enableRules",
@@ -196,8 +194,6 @@ class ConsequenceParams(BaseModel):
196194
""" 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. """
197195
ranking: Optional[List[str]] = None
198196
""" 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/). """
199-
custom_ranking: Optional[List[str]] = None
200-
""" 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. """
201197
relevancy_strictness: Optional[int] = None
202198
""" 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. """
203199
attributes_to_highlight: Optional[List[str]] = None
@@ -225,8 +221,6 @@ class ConsequenceParams(BaseModel):
225221
""" 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. """
226222
ignore_plurals: Optional[IgnorePlurals] = None
227223
remove_stop_words: Optional[RemoveStopWords] = None
228-
keep_diacritics_on_characters: Optional[str] = None
229-
""" 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. """
230224
query_languages: Optional[List[SupportedLanguage]] = None
231225
""" 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/). """
232226
decompound_query: Optional[bool] = None

0 commit comments

Comments
 (0)