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 bc18ca1 commit 81715b7
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 399 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ public class FallbackParams {
@JsonProperty("maxFacetHits")
private Integer maxFacetHits;

@JsonProperty("keepDiacriticsOnCharacters")
private String keepDiacriticsOnCharacters;

@JsonProperty("customRanking")
private List<String> customRanking;

@JsonProperty("attributesToRetrieve")
private List<String> attributesToRetrieve;

Expand Down Expand Up @@ -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<String> 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<String> getCustomRanking() {
return customRanking;
}

public FallbackParams setAttributesToRetrieve(List<String> attributesToRetrieve) {
this.attributesToRetrieve = attributesToRetrieve;
return this;
Expand Down Expand Up @@ -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) &&
Expand Down Expand Up @@ -1912,6 +1965,8 @@ public int hashCode() {
customNormalization,
attributeForDistinct,
maxFacetHits,
keepDiacriticsOnCharacters,
customRanking,
attributesToRetrieve,
ranking,
relevancyStrictness,
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ public class RecommendSearchParams {
@JsonProperty("maxFacetHits")
private Integer maxFacetHits;

@JsonProperty("keepDiacriticsOnCharacters")
private String keepDiacriticsOnCharacters;

@JsonProperty("customRanking")
private List<String> customRanking;

@JsonProperty("attributesToRetrieve")
private List<String> attributesToRetrieve;

Expand Down Expand Up @@ -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<String> 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<String> getCustomRanking() {
return customRanking;
}

public RecommendSearchParams setAttributesToRetrieve(List<String> attributesToRetrieve) {
this.attributesToRetrieve = attributesToRetrieve;
return this;
Expand Down Expand Up @@ -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) &&
Expand Down Expand Up @@ -1912,6 +1965,8 @@ public int hashCode() {
customNormalization,
attributeForDistinct,
maxFacetHits,
keepDiacriticsOnCharacters,
customRanking,
attributesToRetrieve,
ranking,
relevancyStrictness,
Expand Down Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ public class BrowseParamsObject implements BrowseParams {
@JsonProperty("ranking")
private List<String> ranking;

@JsonProperty("customRanking")
private List<String> customRanking;

@JsonProperty("relevancyStrictness")
private Integer relevancyStrictness;

Expand Down Expand Up @@ -163,9 +160,6 @@ public class BrowseParamsObject implements BrowseParams {
@JsonProperty("removeStopWords")
private RemoveStopWords removeStopWords;

@JsonProperty("keepDiacriticsOnCharacters")
private String keepDiacriticsOnCharacters;

@JsonProperty("queryLanguages")
private List<SupportedLanguage> queryLanguages;

Expand Down Expand Up @@ -780,36 +774,6 @@ public List<String> getRanking() {
return ranking;
}

public BrowseParamsObject setCustomRanking(List<String> 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<String> getCustomRanking() {
return customRanking;
}

public BrowseParamsObject setRelevancyStrictness(Integer relevancyStrictness) {
this.relevancyStrictness = relevancyStrictness;
return this;
Expand Down Expand Up @@ -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<SupportedLanguage> queryLanguages) {
this.queryLanguages = queryLanguages;
return this;
Expand Down Expand Up @@ -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) &&
Expand All @@ -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) &&
Expand Down Expand Up @@ -1585,7 +1532,6 @@ public int hashCode() {
enableABTest,
attributesToRetrieve,
ranking,
customRanking,
relevancyStrictness,
attributesToHighlight,
attributesToSnippet,
Expand All @@ -1601,7 +1547,6 @@ public int hashCode() {
disableTypoToleranceOnAttributes,
ignorePlurals,
removeStopWords,
keepDiacriticsOnCharacters,
queryLanguages,
decompoundQuery,
enableRules,
Expand Down Expand Up @@ -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");
Expand All @@ -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");
Expand Down
Loading

0 comments on commit 81715b7

Please sign in to comment.