Skip to content

Commit

Permalink
fix(specs): move customRanking and keepDiacriticsOnCharacters to inde…
Browse files Browse the repository at this point in the history
…xSettings [skip-bc] (generated)

algolia/api-clients-automation#4324

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jan 9, 2025
1 parent c74414c commit 15cc63e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 42 deletions.
6 changes: 6 additions & 0 deletions algoliasearch/recommend/models/fallback_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions algoliasearch/recommend/models/recommend_search_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions algoliasearch/search/models/browse_params_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions algoliasearch/search/models/consequence_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 15cc63e

Please sign in to comment.