lib/algolia/models/search/search_for_hits.rb in algolia-3.8.0 vs lib/algolia/models/search/search_for_hits.rb in algolia-3.8.1

- old
+ new

@@ -58,11 +58,10 @@ attr_accessor :around_precision # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set. attr_accessor :minimum_around_radius - # Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). attr_accessor :inside_bounding_box # Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`. attr_accessor :inside_polygon @@ -174,11 +173,10 @@ attr_accessor :semantic_search # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported. attr_accessor :advanced_syntax - # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words). attr_accessor :optional_words # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking. attr_accessor :disable_exact_on_attributes @@ -199,13 +197,10 @@ attr_accessor :min_proximity # Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can't exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don't exclude properties that you might need in your search UI. attr_accessor :response_fields - # 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 - # Maximum number of facet values to return for each facet. attr_accessor :max_values_per_facet # Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/). attr_accessor :sort_facet_values_by @@ -296,11 +291,10 @@ :advanced_syntax_features => :advancedSyntaxFeatures, :distinct => :distinct, :replace_synonyms_in_highlight => :replaceSynonymsInHighlight, :min_proximity => :minProximity, :response_fields => :responseFields, - :max_facet_hits => :maxFacetHits, :max_values_per_facet => :maxValuesPerFacet, :sort_facet_values_by => :sortFacetValuesBy, :attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity, :rendering_content => :renderingContent, :enable_re_ranking => :enableReRanking, @@ -336,11 +330,11 @@ :around_lat_lng => :"String", :around_lat_lng_via_ip => :"Boolean", :around_radius => :"AroundRadius", :around_precision => :"AroundPrecision", :minimum_around_radius => :"Integer", - :inside_bounding_box => :"Array<Array<Float>>", + :inside_bounding_box => :"InsideBoundingBox", :inside_polygon => :"Array<Array<Float>>", :natural_languages => :"Array<SupportedLanguage>", :rule_contexts => :"Array<String>", :personalization_impact => :"Integer", :user_token => :"String", @@ -377,20 +371,19 @@ :query_type => :"QueryType", :remove_words_if_no_results => :"RemoveWordsIfNoResults", :mode => :"Mode", :semantic_search => :"SemanticSearch", :advanced_syntax => :"Boolean", - :optional_words => :"Array<String>", + :optional_words => :"OptionalWords", :disable_exact_on_attributes => :"Array<String>", :exact_on_single_word_query => :"ExactOnSingleWordQuery", :alternatives_as_exact => :"Array<AlternativesAsExact>", :advanced_syntax_features => :"Array<AdvancedSyntaxFeatures>", :distinct => :"Distinct", :replace_synonyms_in_highlight => :"Boolean", :min_proximity => :"Integer", :response_fields => :"Array<String>", - :max_facet_hits => :"Integer", :max_values_per_facet => :"Integer", :sort_facet_values_by => :"String", :attribute_criteria_computed_by_min_proximity => :"Boolean", :rendering_content => :"RenderingContent", :enable_re_ranking => :"Boolean", @@ -401,11 +394,14 @@ end # List of attributes with nullable: true def self.openapi_nullable Set.new( - [] + [ + :inside_bounding_box, + :optional_words + ] ) end # List of class defined in allOf (OpenAPI v3) def self.openapi_all_of @@ -521,13 +517,11 @@ if attributes.key?(:minimum_around_radius) self.minimum_around_radius = attributes[:minimum_around_radius] end if attributes.key?(:inside_bounding_box) - if (value = attributes[:inside_bounding_box]).is_a?(Array) - self.inside_bounding_box = value - end + self.inside_bounding_box = attributes[:inside_bounding_box] end if attributes.key?(:inside_polygon) if (value = attributes[:inside_polygon]).is_a?(Array) self.inside_polygon = value @@ -709,13 +703,11 @@ if attributes.key?(:advanced_syntax) self.advanced_syntax = attributes[:advanced_syntax] end if attributes.key?(:optional_words) - if (value = attributes[:optional_words]).is_a?(Array) - self.optional_words = value - end + self.optional_words = attributes[:optional_words] end if attributes.key?(:disable_exact_on_attributes) if (value = attributes[:disable_exact_on_attributes]).is_a?(Array) self.disable_exact_on_attributes = value @@ -754,14 +746,10 @@ if (value = attributes[:response_fields]).is_a?(Array) self.response_fields = value end end - if attributes.key?(:max_facet_hits) - self.max_facet_hits = attributes[:max_facet_hits] - end - if attributes.key?(:max_values_per_facet) self.max_values_per_facet = attributes[:max_values_per_facet] end if attributes.key?(:sort_facet_values_by) @@ -868,11 +856,10 @@ advanced_syntax_features == other.advanced_syntax_features && distinct == other.distinct && replace_synonyms_in_highlight == other.replace_synonyms_in_highlight && min_proximity == other.min_proximity && response_fields == other.response_fields && - max_facet_hits == other.max_facet_hits && max_values_per_facet == other.max_values_per_facet && sort_facet_values_by == other.sort_facet_values_by && attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity && rendering_content == other.rendering_content && enable_re_ranking == other.enable_re_ranking && @@ -959,10 +946,9 @@ advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, - max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking,