Skip to content

Commit 785dda1

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 d7b2a1b commit 785dda1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+279
-342
lines changed

packages/algoliasearch/lib/src/model/base_index_settings.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ final class BaseIndexSettings {
2828
this.customNormalization,
2929
this.attributeForDistinct,
3030
this.maxFacetHits,
31+
this.keepDiacriticsOnCharacters,
32+
this.customRanking,
3133
});
3234

3335
/// 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 {
104106
@JsonKey(name: r'maxFacetHits')
105107
final int? maxFacetHits;
106108

109+
/// 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.
110+
@JsonKey(name: r'keepDiacriticsOnCharacters')
111+
final String? keepDiacriticsOnCharacters;
112+
113+
/// 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.
114+
@JsonKey(name: r'customRanking')
115+
final List<String>? customRanking;
116+
107117
@override
108118
bool operator ==(Object other) =>
109119
identical(this, other) ||
@@ -127,7 +137,9 @@ final class BaseIndexSettings {
127137
other.userData == userData &&
128138
other.customNormalization == customNormalization &&
129139
other.attributeForDistinct == attributeForDistinct &&
130-
other.maxFacetHits == maxFacetHits;
140+
other.maxFacetHits == maxFacetHits &&
141+
other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters &&
142+
other.customRanking == customRanking;
131143

132144
@override
133145
int get hashCode =>
@@ -148,7 +160,9 @@ final class BaseIndexSettings {
148160
userData.hashCode +
149161
customNormalization.hashCode +
150162
attributeForDistinct.hashCode +
151-
maxFacetHits.hashCode;
163+
maxFacetHits.hashCode +
164+
keepDiacriticsOnCharacters.hashCode +
165+
customRanking.hashCode;
152166

153167
factory BaseIndexSettings.fromJson(Map<String, dynamic> json) =>
154168
_$BaseIndexSettingsFromJson(json);

packages/algoliasearch/lib/src/model/base_index_settings.g.dart

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/algoliasearch/lib/src/model/browse_params_object.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ final class BrowseParamsObject {
5252
this.enableABTest,
5353
this.attributesToRetrieve,
5454
this.ranking,
55-
this.customRanking,
5655
this.relevancyStrictness,
5756
this.attributesToHighlight,
5857
this.attributesToSnippet,
@@ -68,7 +67,6 @@ final class BrowseParamsObject {
6867
this.disableTypoToleranceOnAttributes,
6968
this.ignorePlurals,
7069
this.removeStopWords,
71-
this.keepDiacriticsOnCharacters,
7270
this.queryLanguages,
7371
this.decompoundQuery,
7472
this.enableRules,
@@ -256,10 +254,6 @@ final class BrowseParamsObject {
256254
@JsonKey(name: r'ranking')
257255
final List<String>? ranking;
258256

259-
/// 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.
260-
@JsonKey(name: r'customRanking')
261-
final List<String>? customRanking;
262-
263257
/// 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.
264258
@JsonKey(name: r'relevancyStrictness')
265259
final int? relevancyStrictness;
@@ -329,10 +323,6 @@ final class BrowseParamsObject {
329323
@JsonKey(name: r'removeStopWords')
330324
final dynamic removeStopWords;
331325

332-
/// 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.
333-
@JsonKey(name: r'keepDiacriticsOnCharacters')
334-
final String? keepDiacriticsOnCharacters;
335-
336326
/// 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/).
337327
@JsonKey(name: r'queryLanguages')
338328
final List<SupportedLanguage>? queryLanguages;
@@ -475,7 +465,6 @@ final class BrowseParamsObject {
475465
other.enableABTest == enableABTest &&
476466
other.attributesToRetrieve == attributesToRetrieve &&
477467
other.ranking == ranking &&
478-
other.customRanking == customRanking &&
479468
other.relevancyStrictness == relevancyStrictness &&
480469
other.attributesToHighlight == attributesToHighlight &&
481470
other.attributesToSnippet == attributesToSnippet &&
@@ -493,7 +482,6 @@ final class BrowseParamsObject {
493482
disableTypoToleranceOnAttributes &&
494483
other.ignorePlurals == ignorePlurals &&
495484
other.removeStopWords == removeStopWords &&
496-
other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters &&
497485
other.queryLanguages == queryLanguages &&
498486
other.decompoundQuery == decompoundQuery &&
499487
other.enableRules == enableRules &&
@@ -557,7 +545,6 @@ final class BrowseParamsObject {
557545
enableABTest.hashCode +
558546
attributesToRetrieve.hashCode +
559547
ranking.hashCode +
560-
customRanking.hashCode +
561548
relevancyStrictness.hashCode +
562549
attributesToHighlight.hashCode +
563550
attributesToSnippet.hashCode +
@@ -573,7 +560,6 @@ final class BrowseParamsObject {
573560
disableTypoToleranceOnAttributes.hashCode +
574561
ignorePlurals.hashCode +
575562
removeStopWords.hashCode +
576-
keepDiacriticsOnCharacters.hashCode +
577563
queryLanguages.hashCode +
578564
decompoundQuery.hashCode +
579565
enableRules.hashCode +

packages/algoliasearch/lib/src/model/browse_params_object.g.dart

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/algoliasearch/lib/src/model/consequence_params.dart

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ final class ConsequenceParams {
5151
this.enableABTest,
5252
this.attributesToRetrieve,
5353
this.ranking,
54-
this.customRanking,
5554
this.relevancyStrictness,
5655
this.attributesToHighlight,
5756
this.attributesToSnippet,
@@ -67,7 +66,6 @@ final class ConsequenceParams {
6766
this.disableTypoToleranceOnAttributes,
6867
this.ignorePlurals,
6968
this.removeStopWords,
70-
this.keepDiacriticsOnCharacters,
7169
this.queryLanguages,
7270
this.decompoundQuery,
7371
this.enableRules,
@@ -253,10 +251,6 @@ final class ConsequenceParams {
253251
@JsonKey(name: r'ranking')
254252
final List<String>? ranking;
255253

256-
/// 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.
257-
@JsonKey(name: r'customRanking')
258-
final List<String>? customRanking;
259-
260254
/// 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.
261255
@JsonKey(name: r'relevancyStrictness')
262256
final int? relevancyStrictness;
@@ -326,10 +320,6 @@ final class ConsequenceParams {
326320
@JsonKey(name: r'removeStopWords')
327321
final dynamic removeStopWords;
328322

329-
/// 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.
330-
@JsonKey(name: r'keepDiacriticsOnCharacters')
331-
final String? keepDiacriticsOnCharacters;
332-
333323
/// 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/).
334324
@JsonKey(name: r'queryLanguages')
335325
final List<SupportedLanguage>? queryLanguages;
@@ -485,7 +475,6 @@ final class ConsequenceParams {
485475
other.enableABTest == enableABTest &&
486476
other.attributesToRetrieve == attributesToRetrieve &&
487477
other.ranking == ranking &&
488-
other.customRanking == customRanking &&
489478
other.relevancyStrictness == relevancyStrictness &&
490479
other.attributesToHighlight == attributesToHighlight &&
491480
other.attributesToSnippet == attributesToSnippet &&
@@ -503,7 +492,6 @@ final class ConsequenceParams {
503492
disableTypoToleranceOnAttributes &&
504493
other.ignorePlurals == ignorePlurals &&
505494
other.removeStopWords == removeStopWords &&
506-
other.keepDiacriticsOnCharacters == keepDiacriticsOnCharacters &&
507495
other.queryLanguages == queryLanguages &&
508496
other.decompoundQuery == decompoundQuery &&
509497
other.enableRules == enableRules &&
@@ -568,7 +556,6 @@ final class ConsequenceParams {
568556
enableABTest.hashCode +
569557
attributesToRetrieve.hashCode +
570558
ranking.hashCode +
571-
customRanking.hashCode +
572559
relevancyStrictness.hashCode +
573560
attributesToHighlight.hashCode +
574561
attributesToSnippet.hashCode +
@@ -584,7 +571,6 @@ final class ConsequenceParams {
584571
disableTypoToleranceOnAttributes.hashCode +
585572
ignorePlurals.hashCode +
586573
removeStopWords.hashCode +
587-
keepDiacriticsOnCharacters.hashCode +
588574
queryLanguages.hashCode +
589575
decompoundQuery.hashCode +
590576
enableRules.hashCode +

packages/algoliasearch/lib/src/model/consequence_params.g.dart

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)