lib/algolia/models/recommend/recommend_search_params.rb in algolia-3.11.0 vs lib/algolia/models/recommend/recommend_search_params.rb in algolia-3.12.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. require "date" require "time" @@ -139,10 +141,16 @@ attr_accessor :attribute_for_distinct # 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 @@ -293,10 +301,12 @@ :searchable_attributes => :searchableAttributes, :user_data => :userData, :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, :attributes_to_highlight => :attributesToHighlight, :attributes_to_snippet => :attributesToSnippet, @@ -384,10 +394,12 @@ :searchable_attributes => :"Array<String>", :user_data => :"Object", :custom_normalization => :"Hash<String, Hash<String, String>>", :attribute_for_distinct => :"String", :max_facet_hits => :"Integer", + :keep_diacritics_on_characters => :"String", + :custom_ranking => :"Array<String>", :attributes_to_retrieve => :"Array<String>", :ranking => :"Array<String>", :relevancy_strictness => :"Integer", :attributes_to_highlight => :"Array<String>", :attributes_to_snippet => :"Array<String>", @@ -689,10 +701,20 @@ if attributes.key?(:max_facet_hits) 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 end end @@ -914,10 +936,12 @@ searchable_attributes == other.searchable_attributes && user_data == other.user_data && 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 && attributes_to_highlight == other.attributes_to_highlight && attributes_to_snippet == other.attributes_to_snippet && @@ -1011,9 +1035,11 @@ searchable_attributes, user_data, custom_normalization, attribute_for_distinct, max_facet_hits, + keep_diacritics_on_characters, + custom_ranking, attributes_to_retrieve, ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet,