algolia 3.0.0.alpha.12 → 3.0.0.alpha.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +1 -0
  3. data/CHANGELOG.md +6 -0
  4. data/Gemfile.lock +4 -4
  5. data/lib/algolia/api/abtesting_client.rb +8 -4
  6. data/lib/algolia/api/analytics_client.rb +146 -282
  7. data/lib/algolia/api/ingestion_client.rb +4 -4
  8. data/lib/algolia/api/insights_client.rb +7 -7
  9. data/lib/algolia/api/recommend_client.rb +12 -12
  10. data/lib/algolia/api/search_client.rb +242 -242
  11. data/lib/algolia/models/abtesting/ab_test_response.rb +1 -1
  12. data/lib/algolia/models/analytics/search_no_result_event.rb +1 -1
  13. data/lib/algolia/models/analytics/top_search.rb +1 -1
  14. data/lib/algolia/models/analytics/top_search_with_analytics.rb +1 -1
  15. data/lib/algolia/models/ingestion/action_type.rb +2 -1
  16. data/lib/algolia/models/ingestion/source_ga4_big_query_export.rb +223 -0
  17. data/lib/algolia/models/ingestion/source_input.rb +1 -0
  18. data/lib/algolia/models/ingestion/source_type.rb +2 -1
  19. data/lib/algolia/models/ingestion/source_update_input.rb +1 -0
  20. data/lib/algolia/models/ingestion/streaming_trigger.rb +221 -0
  21. data/lib/algolia/models/ingestion/streaming_trigger_type.rb +32 -0
  22. data/lib/algolia/models/ingestion/streaming_utils_input.rb +199 -0
  23. data/lib/algolia/models/ingestion/task_create_trigger.rb +1 -0
  24. data/lib/algolia/models/ingestion/task_input.rb +2 -1
  25. data/lib/algolia/models/ingestion/trigger.rb +1 -0
  26. data/lib/algolia/models/ingestion/trigger_type.rb +2 -1
  27. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +6 -6
  28. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +6 -6
  29. data/lib/algolia/models/insights/clicked_filters.rb +6 -6
  30. data/lib/algolia/models/insights/clicked_object_ids.rb +6 -6
  31. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +7 -7
  32. data/lib/algolia/models/insights/converted_filters.rb +6 -6
  33. data/lib/algolia/models/insights/converted_object_ids.rb +6 -6
  34. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +6 -6
  35. data/lib/algolia/models/insights/discount.rb +1 -1
  36. data/lib/algolia/models/insights/insights_events.rb +1 -1
  37. data/lib/algolia/models/insights/object_data.rb +1 -1
  38. data/lib/algolia/models/insights/object_data_after_search.rb +1 -1
  39. data/lib/algolia/models/insights/price.rb +1 -1
  40. data/lib/algolia/models/insights/purchased_object_ids.rb +6 -6
  41. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +6 -6
  42. data/lib/algolia/models/insights/viewed_filters.rb +6 -6
  43. data/lib/algolia/models/insights/viewed_object_ids.rb +6 -6
  44. data/lib/algolia/models/recommend/around_precision.rb +1 -1
  45. data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +3 -0
  46. data/lib/algolia/models/recommend/around_radius.rb +1 -1
  47. data/lib/algolia/models/recommend/automatic_facet_filter.rb +4 -4
  48. data/lib/algolia/models/recommend/automatic_facet_filters.rb +1 -1
  49. data/lib/algolia/models/recommend/base_recommend_request.rb +1 -1
  50. data/lib/algolia/models/recommend/base_recommendations_query.rb +1 -1
  51. data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +1 -1
  52. data/lib/algolia/models/recommend/base_search_params.rb +58 -38
  53. data/lib/algolia/models/recommend/base_search_params_without_query.rb +57 -37
  54. data/lib/algolia/models/recommend/base_search_response.rb +20 -6
  55. data/lib/algolia/models/recommend/condition.rb +32 -7
  56. data/lib/algolia/models/recommend/consequence.rb +33 -5
  57. data/lib/algolia/models/recommend/consequence_hide.rb +2 -2
  58. data/lib/algolia/models/recommend/consequence_params.rb +101 -79
  59. data/lib/algolia/models/recommend/consequence_query.rb +1 -1
  60. data/lib/algolia/models/recommend/consequence_query_object.rb +2 -2
  61. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  62. data/lib/algolia/models/recommend/distinct.rb +1 -1
  63. data/lib/algolia/models/recommend/edit.rb +1 -1
  64. data/lib/algolia/models/recommend/facet_filters.rb +1 -1
  65. data/lib/algolia/models/recommend/facet_ordering.rb +2 -2
  66. data/lib/algolia/models/recommend/facets.rb +2 -2
  67. data/lib/algolia/models/recommend/highlight_result_option.rb +3 -3
  68. data/lib/algolia/models/recommend/ignore_plurals.rb +1 -1
  69. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +46 -44
  70. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  71. data/lib/algolia/models/recommend/optional_filters.rb +1 -1
  72. data/lib/algolia/models/recommend/params.rb +1 -1
  73. data/lib/algolia/models/recommend/promote_object_id.rb +2 -2
  74. data/lib/algolia/models/recommend/promote_object_ids.rb +16 -2
  75. data/lib/algolia/models/recommend/ranking_info.rb +120 -7
  76. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  77. data/lib/algolia/models/recommend/recommend_hit.rb +3 -3
  78. data/lib/algolia/models/recommend/recommendations_hits.rb +1 -1
  79. data/lib/algolia/models/recommend/recommendations_query.rb +2 -2
  80. data/lib/algolia/models/recommend/recommendations_results.rb +21 -7
  81. data/lib/algolia/models/recommend/recommended_for_you_query.rb +1 -1
  82. data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +102 -80
  83. data/lib/algolia/models/recommend/remove_stop_words.rb +1 -1
  84. data/lib/algolia/models/recommend/rendering_content.rb +1 -1
  85. data/lib/algolia/models/recommend/search_params_object.rb +102 -80
  86. data/lib/algolia/models/recommend/search_params_query.rb +1 -1
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -2
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +17 -3
  89. data/lib/algolia/models/recommend/semantic_search.rb +2 -2
  90. data/lib/algolia/models/recommend/snippet_result_option.rb +2 -2
  91. data/lib/algolia/models/recommend/tag_filters.rb +1 -1
  92. data/lib/algolia/models/recommend/trending_facets_query.rb +1 -1
  93. data/lib/algolia/models/recommend/trending_items_query.rb +1 -1
  94. data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
  95. data/lib/algolia/models/recommend/value.rb +1 -1
  96. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  97. data/lib/algolia/models/search/api_key.rb +8 -8
  98. data/lib/algolia/models/search/around_precision.rb +1 -1
  99. data/lib/algolia/models/search/around_precision_from_value_inner.rb +3 -0
  100. data/lib/algolia/models/search/around_radius.rb +1 -1
  101. data/lib/algolia/models/search/automatic_facet_filter.rb +4 -4
  102. data/lib/algolia/models/search/automatic_facet_filters.rb +1 -1
  103. data/lib/algolia/models/search/base_index_settings.rb +44 -18
  104. data/lib/algolia/models/search/base_search_params.rb +58 -38
  105. data/lib/algolia/models/search/base_search_params_without_query.rb +57 -37
  106. data/lib/algolia/models/search/base_search_response.rb +20 -6
  107. data/lib/algolia/models/search/batch_dictionary_entries_params.rb +3 -3
  108. data/lib/algolia/models/search/batch_response.rb +2 -2
  109. data/lib/algolia/models/search/browse_params_object.rb +103 -81
  110. data/lib/algolia/models/search/browse_response.rb +23 -8
  111. data/lib/algolia/models/search/built_in_operation.rb +2 -2
  112. data/lib/algolia/models/search/condition.rb +32 -7
  113. data/lib/algolia/models/search/consequence.rb +33 -5
  114. data/lib/algolia/models/search/consequence_hide.rb +2 -2
  115. data/lib/algolia/models/search/consequence_params.rb +101 -79
  116. data/lib/algolia/models/search/consequence_query.rb +1 -1
  117. data/lib/algolia/models/search/consequence_query_object.rb +2 -2
  118. data/lib/algolia/models/search/created_at_response.rb +1 -1
  119. data/lib/algolia/models/search/cursor.rb +1 -1
  120. data/lib/algolia/models/search/delete_by_params.rb +4 -4
  121. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  122. data/lib/algolia/models/search/dictionary_entry.rb +5 -5
  123. data/lib/algolia/models/search/dictionary_language.rb +2 -2
  124. data/lib/algolia/models/search/dictionary_settings_params.rb +1 -1
  125. data/lib/algolia/models/search/distinct.rb +1 -1
  126. data/lib/algolia/models/search/edit.rb +1 -1
  127. data/lib/algolia/models/search/facet_filters.rb +1 -1
  128. data/lib/algolia/models/search/facet_hits.rb +2 -2
  129. data/lib/algolia/models/search/facet_ordering.rb +2 -2
  130. data/lib/algolia/models/search/facets.rb +2 -2
  131. data/lib/algolia/models/search/get_api_key_response.rb +8 -8
  132. data/lib/algolia/models/search/get_objects_request.rb +3 -3
  133. data/lib/algolia/models/search/get_objects_response.rb +1 -1
  134. data/lib/algolia/models/search/has_pending_mappings_response.rb +1 -1
  135. data/lib/algolia/models/search/highlight_result_option.rb +3 -3
  136. data/lib/algolia/models/search/hit.rb +4 -4
  137. data/lib/algolia/models/search/ignore_plurals.rb +1 -1
  138. data/lib/algolia/models/search/index_settings.rb +89 -61
  139. data/lib/algolia/models/search/index_settings_as_search_params.rb +46 -44
  140. data/lib/algolia/models/search/log.rb +39 -11
  141. data/lib/algolia/models/search/log_query.rb +1 -1
  142. data/lib/algolia/models/search/multiple_batch_response.rb +2 -2
  143. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  144. data/lib/algolia/models/search/operation_index_params.rb +2 -2
  145. data/lib/algolia/models/search/optional_filters.rb +1 -1
  146. data/lib/algolia/models/search/params.rb +1 -1
  147. data/lib/algolia/models/search/promote_object_id.rb +2 -2
  148. data/lib/algolia/models/search/promote_object_ids.rb +16 -2
  149. data/lib/algolia/models/search/ranking_info.rb +120 -7
  150. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  151. data/lib/algolia/models/search/remove_stop_words.rb +1 -1
  152. data/lib/algolia/models/search/rendering_content.rb +1 -1
  153. data/lib/algolia/models/search/rule.rb +23 -5
  154. data/lib/algolia/models/search/save_object_response.rb +3 -3
  155. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  156. data/lib/algolia/models/search/search_dictionary_entries_params.rb +18 -4
  157. data/lib/algolia/models/search/search_dictionary_entries_response.rb +251 -0
  158. data/lib/algolia/models/search/search_for_facet_values_request.rb +1 -1
  159. data/lib/algolia/models/search/search_for_facet_values_response.rb +1 -0
  160. data/lib/algolia/models/search/search_for_facets.rb +103 -81
  161. data/lib/algolia/models/search/search_for_facets_options.rb +2 -2
  162. data/lib/algolia/models/search/search_for_hits.rb +103 -81
  163. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  164. data/lib/algolia/models/search/search_hits.rb +2 -1
  165. data/lib/algolia/models/search/search_params_object.rb +102 -80
  166. data/lib/algolia/models/search/search_params_query.rb +1 -1
  167. data/lib/algolia/models/search/search_response.rb +22 -7
  168. data/lib/algolia/models/search/search_rules_params.rb +8 -20
  169. data/lib/algolia/models/search/search_rules_response.rb +2 -2
  170. data/lib/algolia/models/search/search_synonyms_params.rb +16 -2
  171. data/lib/algolia/models/search/search_synonyms_response.rb +2 -2
  172. data/lib/algolia/models/search/search_user_ids_params.rb +15 -1
  173. data/lib/algolia/models/search/search_user_ids_response.rb +16 -2
  174. data/lib/algolia/models/search/secured_api_key_restrictions.rb +5 -5
  175. data/lib/algolia/models/search/semantic_search.rb +2 -2
  176. data/lib/algolia/models/search/snippet_result_option.rb +2 -2
  177. data/lib/algolia/models/search/tag_filters.rb +1 -1
  178. data/lib/algolia/models/search/time_range.rb +2 -2
  179. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  180. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  181. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +2 -2
  182. data/lib/algolia/models/search/updated_rule_response.rb +2 -2
  183. data/lib/algolia/models/search/user_hit.rb +1 -1
  184. data/lib/algolia/models/search/user_id.rb +1 -1
  185. data/lib/algolia/models/search/value.rb +1 -1
  186. data/lib/algolia/version.rb +1 -1
  187. metadata +7 -2
@@ -6,13 +6,13 @@ require 'time'
6
6
  module Algolia
7
7
  module Search
8
8
  class BrowseParamsObject
9
- # Text to search for in an index.
9
+ # Search query.
10
10
  attr_accessor :query
11
11
 
12
- # Overrides the query parameter and performs a more generic search.
12
+ # Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
13
13
  attr_accessor :similar_query
14
14
 
15
- # [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters.
15
+ # Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
16
16
  attr_accessor :filters
17
17
 
18
18
  attr_accessor :facet_filters
@@ -23,149 +23,143 @@ module Algolia
23
23
 
24
24
  attr_accessor :tag_filters
25
25
 
26
- # Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed.
26
+ # Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
27
27
  attr_accessor :sum_or_filters_scores
28
28
 
29
- # Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
29
+ # Restricts a search to a subset of your searchable attributes.
30
30
  attr_accessor :restrict_searchable_attributes
31
31
 
32
- # Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.
32
+ # Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
33
33
  attr_accessor :facets
34
34
 
35
- # Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control.
35
+ # Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It's usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
36
36
  attr_accessor :faceting_after_distinct
37
37
 
38
- # Page to retrieve (the first page is `0`, not `1`).
38
+ # Page of search results to retrieve.
39
39
  attr_accessor :page
40
40
 
41
- # Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
41
+ # Position of the first hit to retrieve.
42
42
  attr_accessor :offset
43
43
 
44
- # Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
44
+ # Number of hits to retrieve (used in combination with `offset`).
45
45
  attr_accessor :length
46
46
 
47
- # Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.
47
+ # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
48
48
  attr_accessor :around_lat_lng
49
49
 
50
- # Search for entries around a location. The location is automatically computed from the requester's IP address.
50
+ # Whether to obtain the coordinates from the request's IP address.
51
51
  attr_accessor :around_lat_lng_via_ip
52
52
 
53
53
  attr_accessor :around_radius
54
54
 
55
55
  attr_accessor :around_precision
56
56
 
57
- # Minimum radius (in meters) used for a geographical search when `aroundRadius` isn't set.
57
+ # Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
58
58
  attr_accessor :minimum_around_radius
59
59
 
60
- # Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
60
+ # 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).
61
61
  attr_accessor :inside_bounding_box
62
62
 
63
- # Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
63
+ # 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`.
64
64
  attr_accessor :inside_polygon
65
65
 
66
- # Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.
66
+ # ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
67
67
  attr_accessor :natural_languages
68
68
 
69
- # Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.
69
+ # Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
70
70
  attr_accessor :rule_contexts
71
71
 
72
- # Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
72
+ # Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
73
73
  attr_accessor :personalization_impact
74
74
 
75
- # Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
75
+ # Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
76
76
  attr_accessor :user_token
77
77
 
78
- # Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).
78
+ # Whether the search response should include detailed ranking information.
79
79
  attr_accessor :get_ranking_info
80
80
 
81
- # Enriches the API's response with information about how the query was processed.
82
- attr_accessor :explain
83
-
84
- # Whether to take into account an index's synonyms for a particular search.
81
+ # Whether to take into account an index's synonyms for this search.
85
82
  attr_accessor :synonyms
86
83
 
87
- # Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).
84
+ # Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
88
85
  attr_accessor :click_analytics
89
86
 
90
- # Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).
87
+ # Whether this search will be included in Analytics.
91
88
  attr_accessor :analytics
92
89
 
93
90
  # Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
94
91
  attr_accessor :analytics_tags
95
92
 
96
- # Whether to include or exclude a query from the processing-time percentile computation.
93
+ # Whether to include this search when calculating processing-time percentiles.
97
94
  attr_accessor :percentile_computation
98
95
 
99
- # Incidates whether this search will be considered in A/B testing.
96
+ # Whether to enable A/B testing for this search.
100
97
  attr_accessor :enable_ab_test
101
98
 
102
- # Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`.
103
- attr_accessor :attributes_for_faceting
104
-
105
- # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
99
+ # Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. - `*` 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.
106
100
  attr_accessor :attributes_to_retrieve
107
101
 
108
- # Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
102
+ # 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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/).
109
103
  attr_accessor :ranking
110
104
 
111
- # Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending.
105
+ # Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). 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** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> 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.
112
106
  attr_accessor :custom_ranking
113
107
 
114
- # Relevancy threshold below which less relevant results aren't included in the results.
108
+ # 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.
115
109
  attr_accessor :relevancy_strictness
116
110
 
117
- # Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).
111
+ # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).
118
112
  attr_accessor :attributes_to_highlight
119
113
 
120
- # Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`.
114
+ # Attributes for which to enable snippets. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
121
115
  attr_accessor :attributes_to_snippet
122
116
 
123
- # HTML string to insert before the highlighted parts in all highlight and snippet results.
117
+ # HTML tag to insert before the highlighted parts in all highlighted results and snippets.
124
118
  attr_accessor :highlight_pre_tag
125
119
 
126
- # HTML string to insert after the highlighted parts in all highlight and snippet results.
120
+ # HTML tag to insert after the highlighted parts in all highlighted results and snippets.
127
121
  attr_accessor :highlight_post_tag
128
122
 
129
123
  # String used as an ellipsis indicator when a snippet is truncated.
130
124
  attr_accessor :snippet_ellipsis_text
131
125
 
132
- # Restrict highlighting and snippeting to items that matched the query.
126
+ # Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
133
127
  attr_accessor :restrict_highlight_and_snippet_arrays
134
128
 
135
129
  # Number of hits per page.
136
130
  attr_accessor :hits_per_page
137
131
 
138
- # Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
132
+ # Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
139
133
  attr_accessor :min_word_sizefor1_typo
140
134
 
141
- # Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
135
+ # Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
142
136
  attr_accessor :min_word_sizefor2_typos
143
137
 
144
138
  attr_accessor :typo_tolerance
145
139
 
146
- # Whether to allow typos on numbers (\"numeric tokens\") in the query string.
140
+ # Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
147
141
  attr_accessor :allow_typos_on_numeric_tokens
148
142
 
149
- # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
143
+ # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). 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.
150
144
  attr_accessor :disable_typo_tolerance_on_attributes
151
145
 
152
146
  attr_accessor :ignore_plurals
153
147
 
154
148
  attr_accessor :remove_stop_words
155
149
 
156
- # Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
150
+ # 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.
157
151
  attr_accessor :keep_diacritics_on_characters
158
152
 
159
- # Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [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) word detection.
153
+ # [ISO code](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) for language-specific settings such as plurals, stop words, 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/).
160
154
  attr_accessor :query_languages
161
155
 
162
- # [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query.
156
+ # Whether to split compound words into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian.
163
157
  attr_accessor :decompound_query
164
158
 
165
- # Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.
159
+ # Whether to enable rules.
166
160
  attr_accessor :enable_rules
167
161
 
168
- # Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.
162
+ # Whether to enable Personalization.
169
163
  attr_accessor :enable_personalization
170
164
 
171
165
  attr_accessor :query_type
@@ -176,54 +170,54 @@ module Algolia
176
170
 
177
171
  attr_accessor :semantic_search
178
172
 
179
- # Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
173
+ # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
180
174
  attr_accessor :advanced_syntax
181
175
 
182
- # Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.
176
+ # 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 dividied 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).
183
177
  attr_accessor :optional_words
184
178
 
185
- # 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).
179
+ # 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). This can be useful for attributes with long values, where the likelyhood 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.
186
180
  attr_accessor :disable_exact_on_attributes
187
181
 
188
182
  attr_accessor :exact_on_single_word_query
189
183
 
190
- # Alternatives that should be considered an exact match by [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).
184
+ # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
191
185
  attr_accessor :alternatives_as_exact
192
186
 
193
- # Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.
187
+ # Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
194
188
  attr_accessor :advanced_syntax_features
195
189
 
196
190
  attr_accessor :distinct
197
191
 
198
- # Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
192
+ # Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
199
193
  attr_accessor :replace_synonyms_in_highlight
200
194
 
201
- # Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).
195
+ # Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
202
196
  attr_accessor :min_proximity
203
197
 
204
- # Attributes to include in the API response for search and browse queries.
198
+ # 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.
205
199
  attr_accessor :response_fields
206
200
 
207
- # Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
201
+ # 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).
208
202
  attr_accessor :max_facet_hits
209
203
 
210
204
  # Maximum number of facet values to return for each facet.
211
205
  attr_accessor :max_values_per_facet
212
206
 
213
- # Controls how facet values are fetched.
207
+ # Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> 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/).
214
208
  attr_accessor :sort_facet_values_by
215
209
 
216
- # When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
210
+ # Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
217
211
  attr_accessor :attribute_criteria_computed_by_min_proximity
218
212
 
219
213
  attr_accessor :rendering_content
220
214
 
221
- # Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
215
+ # Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
222
216
  attr_accessor :enable_re_ranking
223
217
 
224
218
  attr_accessor :re_ranking_apply_filter
225
219
 
226
- # Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response.
220
+ # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
227
221
  attr_accessor :cursor
228
222
 
229
223
  class EnumAttributeValidator
@@ -277,14 +271,12 @@ module Algolia
277
271
  :personalization_impact => :personalizationImpact,
278
272
  :user_token => :userToken,
279
273
  :get_ranking_info => :getRankingInfo,
280
- :explain => :explain,
281
274
  :synonyms => :synonyms,
282
275
  :click_analytics => :clickAnalytics,
283
276
  :analytics => :analytics,
284
277
  :analytics_tags => :analyticsTags,
285
278
  :percentile_computation => :percentileComputation,
286
279
  :enable_ab_test => :enableABTest,
287
- :attributes_for_faceting => :attributesForFaceting,
288
280
  :attributes_to_retrieve => :attributesToRetrieve,
289
281
  :ranking => :ranking,
290
282
  :custom_ranking => :customRanking,
@@ -367,14 +359,12 @@ module Algolia
367
359
  :personalization_impact => :Integer,
368
360
  :user_token => :String,
369
361
  :get_ranking_info => :Boolean,
370
- :explain => :'Array<String>',
371
362
  :synonyms => :Boolean,
372
363
  :click_analytics => :Boolean,
373
364
  :analytics => :Boolean,
374
365
  :analytics_tags => :'Array<String>',
375
366
  :percentile_computation => :Boolean,
376
367
  :enable_ab_test => :Boolean,
377
- :attributes_for_faceting => :'Array<String>',
378
368
  :attributes_to_retrieve => :'Array<String>',
379
369
  :ranking => :'Array<String>',
380
370
  :custom_ranking => :'Array<String>',
@@ -571,12 +561,6 @@ module Algolia
571
561
  self.get_ranking_info = attributes[:get_ranking_info]
572
562
  end
573
563
 
574
- if attributes.key?(:explain)
575
- if (value = attributes[:explain]).is_a?(Array)
576
- self.explain = value
577
- end
578
- end
579
-
580
564
  if attributes.key?(:synonyms)
581
565
  self.synonyms = attributes[:synonyms]
582
566
  end
@@ -603,12 +587,6 @@ module Algolia
603
587
  self.enable_ab_test = attributes[:enable_ab_test]
604
588
  end
605
589
 
606
- if attributes.key?(:attributes_for_faceting)
607
- if (value = attributes[:attributes_for_faceting]).is_a?(Array)
608
- self.attributes_for_faceting = value
609
- end
610
- end
611
-
612
590
  if attributes.key?(:attributes_to_retrieve)
613
591
  if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
614
592
  self.attributes_to_retrieve = value
@@ -814,6 +792,20 @@ module Algolia
814
792
  end
815
793
  end
816
794
 
795
+ # Custom attribute writer method with validation
796
+ # @param [Object] page Value to be assigned
797
+ def page=(page)
798
+ if page.nil?
799
+ raise ArgumentError, 'page cannot be nil'
800
+ end
801
+
802
+ if page < 0
803
+ raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.'
804
+ end
805
+
806
+ @page = page
807
+ end
808
+
817
809
  # Custom attribute writer method with validation
818
810
  # @param [Object] length Value to be assigned
819
811
  def length=(length)
@@ -846,6 +838,24 @@ module Algolia
846
838
  @minimum_around_radius = minimum_around_radius
847
839
  end
848
840
 
841
+ # Custom attribute writer method with validation
842
+ # @param [Object] personalization_impact Value to be assigned
843
+ def personalization_impact=(personalization_impact)
844
+ if personalization_impact.nil?
845
+ raise ArgumentError, 'personalization_impact cannot be nil'
846
+ end
847
+
848
+ if personalization_impact > 100
849
+ raise ArgumentError, 'invalid value for "personalization_impact", must be smaller than or equal to 100.'
850
+ end
851
+
852
+ if personalization_impact < 0
853
+ raise ArgumentError, 'invalid value for "personalization_impact", must be greater than or equal to 0.'
854
+ end
855
+
856
+ @personalization_impact = personalization_impact
857
+ end
858
+
849
859
  # Custom attribute writer method with validation
850
860
  # @param [Object] hits_per_page Value to be assigned
851
861
  def hits_per_page=(hits_per_page)
@@ -896,6 +906,20 @@ module Algolia
896
906
  @max_facet_hits = max_facet_hits
897
907
  end
898
908
 
909
+ # Custom attribute writer method with validation
910
+ # @param [Object] max_values_per_facet Value to be assigned
911
+ def max_values_per_facet=(max_values_per_facet)
912
+ if max_values_per_facet.nil?
913
+ raise ArgumentError, 'max_values_per_facet cannot be nil'
914
+ end
915
+
916
+ if max_values_per_facet > 1000
917
+ raise ArgumentError, 'invalid value for "max_values_per_facet", must be smaller than or equal to 1000.'
918
+ end
919
+
920
+ @max_values_per_facet = max_values_per_facet
921
+ end
922
+
899
923
  # Checks equality by comparing each attribute.
900
924
  # @param [Object] Object to be compared
901
925
  def ==(other)
@@ -928,14 +952,12 @@ module Algolia
928
952
  personalization_impact == other.personalization_impact &&
929
953
  user_token == other.user_token &&
930
954
  get_ranking_info == other.get_ranking_info &&
931
- explain == other.explain &&
932
955
  synonyms == other.synonyms &&
933
956
  click_analytics == other.click_analytics &&
934
957
  analytics == other.analytics &&
935
958
  analytics_tags == other.analytics_tags &&
936
959
  percentile_computation == other.percentile_computation &&
937
960
  enable_ab_test == other.enable_ab_test &&
938
- attributes_for_faceting == other.attributes_for_faceting &&
939
961
  attributes_to_retrieve == other.attributes_to_retrieve &&
940
962
  ranking == other.ranking &&
941
963
  custom_ranking == other.custom_ranking &&
@@ -993,7 +1015,7 @@ module Algolia
993
1015
  # @return [Integer] Hash code
994
1016
  def hash
995
1017
  [query, similar_query, filters, facet_filters, optional_filters, numeric_filters, tag_filters, sum_or_filters_scores, restrict_searchable_attributes, facets,
996
- faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, explain, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, 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, re_ranking_apply_filter, cursor].hash
1018
+ faceting_after_distinct, page, offset, length, around_lat_lng, around_lat_lng_via_ip, around_radius, around_precision, minimum_around_radius, inside_bounding_box, inside_polygon, natural_languages, rule_contexts, personalization_impact, user_token, get_ranking_info, synonyms, click_analytics, analytics, analytics_tags, percentile_computation, enable_ab_test, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag, highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, 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, re_ranking_apply_filter, cursor].hash
997
1019
  end
998
1020
 
999
1021
  # Builds the object from hash
@@ -15,7 +15,7 @@ module Algolia
15
15
  # Computed geographical location.
16
16
  attr_accessor :around_lat_lng
17
17
 
18
- # Automatically-computed radius.
18
+ # Distance from a central coordinate provided by `aroundLatLng`.
19
19
  attr_accessor :automatic_radius
20
20
 
21
21
  attr_accessor :exhaustive
@@ -29,7 +29,7 @@ module Algolia
29
29
  # See the `typo` field of the `exhaustive` object in the response.
30
30
  attr_accessor :exhaustive_typo
31
31
 
32
- # Mapping of each facet name to the corresponding facet counts.
32
+ # Facet counts.
33
33
  attr_accessor :facets
34
34
 
35
35
  # Statistics for numerical facets.
@@ -47,16 +47,16 @@ module Algolia
47
47
  # Warnings about the query.
48
48
  attr_accessor :message
49
49
 
50
- # Number of hits the search query matched.
50
+ # Number of results (hits).
51
51
  attr_accessor :nb_hits
52
52
 
53
- # Number of pages of results for the current query.
53
+ # Number of pages of results.
54
54
  attr_accessor :nb_pages
55
55
 
56
56
  # Number of hits selected and sorted by the relevant sort algorithm.
57
57
  attr_accessor :nb_sorted_hits
58
58
 
59
- # Page to retrieve (the first page is `0`, not `1`).
59
+ # Page of search results to retrieve.
60
60
  attr_accessor :page
61
61
 
62
62
  # Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
@@ -81,21 +81,22 @@ module Algolia
81
81
  # Host name of the server that processed the request.
82
82
  attr_accessor :server_used
83
83
 
84
- # Lets you store custom data in your indices.
84
+ # An object with custom data. You can store up to 32&nbsp;kB as custom data.
85
85
  attr_accessor :user_data
86
86
 
87
87
  # Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
88
88
  attr_accessor :query_id
89
89
 
90
+ # Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
90
91
  attr_accessor :hits
91
92
 
92
- # Text to search for in an index.
93
+ # Search query.
93
94
  attr_accessor :query
94
95
 
95
96
  # URL-encoded string of all search parameters.
96
97
  attr_accessor :params
97
98
 
98
- # Cursor indicating the location to resume browsing from. Must match the value returned by the previous call. Pass this value to the subsequent browse call to get the next page of results. When the end of the index has been reached, `cursor` is absent from the response.
99
+ # Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
99
100
  attr_accessor :cursor
100
101
 
101
102
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -408,6 +409,20 @@ module Algolia
408
409
  @hits_per_page = hits_per_page
409
410
  end
410
411
 
412
+ # Custom attribute writer method with validation
413
+ # @param [Object] page Value to be assigned
414
+ def page=(page)
415
+ if page.nil?
416
+ raise ArgumentError, 'page cannot be nil'
417
+ end
418
+
419
+ if page < 0
420
+ raise ArgumentError, 'invalid value for "page", must be greater than or equal to 0.'
421
+ end
422
+
423
+ @page = page
424
+ end
425
+
411
426
  # Checks equality by comparing each attribute.
412
427
  # @param [Object] Object to be compared
413
428
  def ==(other)
@@ -5,11 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Search
8
- # To update an attribute without pushing the entire record, you can use these built-in operations.
8
+ # Update to perform on the attribute.
9
9
  class BuiltInOperation
10
10
  attr_accessor :_operation
11
11
 
12
- # Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value.
12
+ # Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value.
13
13
  attr_accessor :value
14
14
 
15
15
  class EnumAttributeValidator