algolia 3.0.0.alpha.16 → 3.0.0.alpha.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +10 -167
  3. data/CHANGELOG.md +16 -0
  4. data/Gemfile.lock +4 -4
  5. data/lib/algolia/api/abtesting_client.rb +20 -20
  6. data/lib/algolia/api/analytics_client.rb +76 -76
  7. data/lib/algolia/api/personalization_client.rb +12 -12
  8. data/lib/algolia/api/recommend_client.rb +22 -22
  9. data/lib/algolia/api/search_client.rb +8 -8
  10. data/lib/algolia/api/usage_client.rb +329 -0
  11. data/lib/algolia/models/abtesting/ab_test.rb +41 -16
  12. data/lib/algolia/models/abtesting/ab_test_configuration.rb +217 -0
  13. data/lib/algolia/models/abtesting/ab_test_response.rb +2 -2
  14. data/lib/algolia/models/abtesting/ab_tests_variant.rb +21 -3
  15. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +21 -3
  16. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +1 -1
  17. data/lib/algolia/models/abtesting/custom_search_params.rb +1 -1
  18. data/lib/algolia/models/abtesting/effect.rb +35 -0
  19. data/lib/algolia/models/abtesting/empty_search.rb +198 -0
  20. data/lib/algolia/models/abtesting/list_ab_tests_response.rb +1 -1
  21. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +247 -0
  22. data/lib/algolia/models/abtesting/outliers.rb +198 -0
  23. data/lib/algolia/models/abtesting/status.rb +35 -0
  24. data/lib/algolia/models/abtesting/variant.rb +31 -13
  25. data/lib/algolia/models/analytics/get_status_response.rb +1 -1
  26. data/lib/algolia/models/ingestion/auth_algolia_insights.rb +212 -0
  27. data/lib/algolia/models/{recommend/consequence_query_object.rb → ingestion/auth_algolia_insights_partial.rb} +21 -24
  28. data/lib/algolia/models/ingestion/auth_input.rb +1 -0
  29. data/lib/algolia/models/ingestion/auth_input_partial.rb +1 -0
  30. data/lib/algolia/models/ingestion/authentication_type.rb +2 -1
  31. data/lib/algolia/models/ingestion/destination_index_name.rb +1 -1
  32. data/lib/algolia/models/ingestion/shopify_input.rb +212 -0
  33. data/lib/algolia/models/ingestion/shopify_market.rb +227 -0
  34. data/lib/algolia/models/ingestion/shopify_metafield.rb +221 -0
  35. data/lib/algolia/models/ingestion/source_input.rb +2 -1
  36. data/lib/algolia/models/ingestion/source_shopify.rb +278 -0
  37. data/lib/algolia/models/{recommend/base_recommended_for_you_query_parameters.rb → ingestion/source_shopify_base.rb} +14 -14
  38. data/lib/algolia/models/ingestion/source_update_input.rb +2 -1
  39. data/lib/algolia/models/ingestion/source_update_shopify.rb +258 -0
  40. data/lib/algolia/models/ingestion/task_input.rb +1 -0
  41. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +2 -2
  42. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +2 -2
  43. data/lib/algolia/models/insights/clicked_filters.rb +2 -2
  44. data/lib/algolia/models/insights/clicked_object_ids.rb +2 -2
  45. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +2 -2
  46. data/lib/algolia/models/insights/converted_filters.rb +2 -2
  47. data/lib/algolia/models/insights/converted_object_ids.rb +2 -2
  48. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +2 -2
  49. data/lib/algolia/models/insights/purchased_object_ids.rb +2 -2
  50. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +2 -2
  51. data/lib/algolia/models/insights/viewed_filters.rb +2 -2
  52. data/lib/algolia/models/insights/viewed_object_ids.rb +2 -2
  53. data/lib/algolia/models/monitoring/incidents_inner.rb +1 -1
  54. data/lib/algolia/models/monitoring/probes_metric.rb +1 -1
  55. data/lib/algolia/models/monitoring/time_inner.rb +1 -1
  56. data/lib/algolia/models/personalization/delete_user_profile_response.rb +2 -2
  57. data/lib/algolia/models/personalization/event_scoring.rb +25 -4
  58. data/lib/algolia/models/personalization/event_type.rb +34 -0
  59. data/lib/algolia/models/personalization/facet_scoring.rb +2 -2
  60. data/lib/algolia/models/personalization/get_user_token_response.rb +3 -3
  61. data/lib/algolia/models/personalization/personalization_strategy_params.rb +21 -3
  62. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +3 -3
  63. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +1 -1
  64. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +1 -1
  65. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +1 -1
  66. data/lib/algolia/models/query-suggestions/source_index.rb +1 -1
  67. data/lib/algolia/models/recommend/auto_facet_filter.rb +208 -0
  68. data/lib/algolia/models/recommend/base_recommend_request.rb +37 -8
  69. data/lib/algolia/models/recommend/base_search_params.rb +4 -4
  70. data/lib/algolia/models/recommend/base_search_params_without_query.rb +4 -4
  71. data/lib/algolia/models/recommend/bought_together_query.rb +319 -0
  72. data/lib/algolia/models/recommend/condition.rb +12 -62
  73. data/lib/algolia/models/recommend/consequence.rb +32 -54
  74. data/lib/algolia/models/recommend/deleted_at_response.rb +1 -1
  75. data/lib/algolia/models/recommend/{recommended_for_you_query_parameters.rb → fallback_params.rb} +17 -20
  76. data/lib/algolia/models/recommend/{edit_type.rb → fbt_model.rb} +5 -6
  77. data/lib/algolia/models/recommend/{base_trending_facets_query.rb → frequently_bought_together.rb} +20 -18
  78. data/lib/algolia/models/recommend/get_recommendations_params.rb +2 -2
  79. data/lib/algolia/models/recommend/{consequence_hide.rb → hide_consequence_object.rb} +4 -6
  80. data/lib/algolia/models/recommend/index_settings_as_search_params.rb +10 -10
  81. data/lib/algolia/models/recommend/{base_recommendations_query.rb → looking_similar.rb} +6 -15
  82. data/lib/algolia/models/recommend/{anchoring.rb → looking_similar_model.rb} +5 -8
  83. data/lib/algolia/models/recommend/looking_similar_query.rb +328 -0
  84. data/lib/algolia/models/recommend/{params.rb → params_consequence.rb} +26 -28
  85. data/lib/algolia/models/recommend/{promote_object_id.rb → promote_consequence_object.rb} +19 -9
  86. data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +1 -1
  87. data/lib/algolia/models/recommend/{rule_response.rb → recommend_rule.rb} +13 -18
  88. data/lib/algolia/models/recommend/{rule_response_metadata.rb → recommend_rule_metadata.rb} +5 -4
  89. data/lib/algolia/models/recommend/recommendations_hits.rb +4 -24
  90. data/lib/algolia/models/recommend/recommendations_request.rb +3 -1
  91. data/lib/algolia/models/recommend/recommendations_results.rb +4 -24
  92. data/lib/algolia/models/recommend/{base_recommended_for_you_query.rb → recommended_for_you.rb} +5 -14
  93. data/lib/algolia/models/recommend/recommended_for_you_query.rb +36 -16
  94. data/lib/algolia/models/recommend/{recommendation_models.rb → related_model.rb} +4 -5
  95. data/lib/algolia/models/recommend/{edit.rb → related_products.rb} +27 -24
  96. data/lib/algolia/models/recommend/{recommendations_query.rb → related_query.rb} +40 -20
  97. data/lib/algolia/models/recommend/{consequence_params.rb → search_params.rb} +33 -52
  98. data/lib/algolia/models/recommend/search_params_object.rb +15 -14
  99. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +58 -10
  100. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +2 -2
  101. data/lib/algolia/models/recommend/trending_facet_hit.rb +2 -2
  102. data/lib/algolia/models/recommend/trending_facets.rb +243 -0
  103. data/lib/algolia/models/recommend/trending_facets_query.rb +51 -11
  104. data/lib/algolia/models/recommend/{base_trending_items_query.rb → trending_items.rb} +12 -15
  105. data/lib/algolia/models/recommend/trending_items_query.rb +43 -17
  106. data/lib/algolia/models/search/add_api_key_response.rb +1 -1
  107. data/lib/algolia/models/search/base_get_api_key_response.rb +1 -1
  108. data/lib/algolia/models/search/base_index_settings.rb +10 -10
  109. data/lib/algolia/models/search/base_search_params.rb +4 -4
  110. data/lib/algolia/models/search/base_search_params_without_query.rb +4 -4
  111. data/lib/algolia/models/search/browse_params_object.rb +14 -14
  112. data/lib/algolia/models/search/consequence_params.rb +14 -14
  113. data/lib/algolia/models/search/created_at_response.rb +1 -1
  114. data/lib/algolia/models/search/delete_api_key_response.rb +1 -1
  115. data/lib/algolia/models/search/delete_by_params.rb +2 -2
  116. data/lib/algolia/models/search/delete_source_response.rb +1 -1
  117. data/lib/algolia/models/search/deleted_at_response.rb +1 -1
  118. data/lib/algolia/models/search/fetched_index.rb +1 -1
  119. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  120. data/lib/algolia/models/search/index_settings.rb +20 -20
  121. data/lib/algolia/models/search/index_settings_as_search_params.rb +10 -10
  122. data/lib/algolia/models/search/log.rb +1 -1
  123. data/lib/algolia/models/search/multiple_batch_request.rb +1 -1
  124. data/lib/algolia/models/search/operation_index_params.rb +1 -1
  125. data/lib/algolia/models/search/re_ranking_apply_filter.rb +1 -1
  126. data/lib/algolia/models/search/remove_user_id_response.rb +1 -1
  127. data/lib/algolia/models/search/replace_source_response.rb +1 -1
  128. data/lib/algolia/models/search/save_object_response.rb +1 -1
  129. data/lib/algolia/models/search/save_synonym_response.rb +1 -1
  130. data/lib/algolia/models/search/search_for_facets.rb +15 -15
  131. data/lib/algolia/models/search/search_for_facets_options.rb +1 -1
  132. data/lib/algolia/models/search/search_for_hits.rb +15 -15
  133. data/lib/algolia/models/search/search_for_hits_options.rb +1 -1
  134. data/lib/algolia/models/search/search_params_object.rb +15 -14
  135. data/lib/algolia/models/search/search_user_ids_response.rb +1 -1
  136. data/lib/algolia/models/search/secured_api_key_restrictions.rb +1 -1
  137. data/lib/algolia/models/search/update_api_key_response.rb +1 -1
  138. data/lib/algolia/models/search/updated_at_response.rb +1 -1
  139. data/lib/algolia/models/search/updated_at_with_object_id_response.rb +1 -1
  140. data/lib/algolia/models/search/updated_rule_response.rb +1 -1
  141. data/lib/algolia/models/search/user_hit.rb +1 -1
  142. data/lib/algolia/models/search/user_id.rb +1 -1
  143. data/lib/algolia/models/usage/error_base.rb +205 -0
  144. data/lib/algolia/models/usage/get_usage200_response.rb +198 -0
  145. data/lib/algolia/models/usage/get_usage200_response_statistics_inner.rb +206 -0
  146. data/lib/algolia/models/usage/get_usage400_response.rb +198 -0
  147. data/lib/algolia/models/usage/get_usage400_response_error.rb +216 -0
  148. data/lib/algolia/models/usage/get_usage400_response_error_errors_inner.rb +225 -0
  149. data/lib/algolia/models/usage/granularity.rb +33 -0
  150. data/lib/algolia/models/usage/statistic.rb +116 -0
  151. data/lib/algolia/models/{recommend/promote.rb → usage/statistic_value.rb} +5 -5
  152. data/lib/algolia/version.rb +1 -1
  153. metadata +47 -25
  154. data/lib/algolia/models/recommend/automatic_facet_filter.rb +0 -220
  155. data/lib/algolia/models/recommend/automatic_facet_filters.rb +0 -97
  156. data/lib/algolia/models/recommend/consequence_query.rb +0 -97
  157. data/lib/algolia/models/recommend/promote_object_ids.rb +0 -228
@@ -5,14 +5,14 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- class RecommendedForYouQueryParameters
8
+ class FallbackParams
9
9
  # Search query.
10
10
  attr_accessor :query
11
11
 
12
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 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/).
15
+ # Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **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
@@ -26,7 +26,7 @@ module Algolia
26
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 search to a subset of your searchable attributes.
29
+ # Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
30
30
  attr_accessor :restrict_searchable_attributes
31
31
 
32
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).
@@ -60,7 +60,7 @@ module Algolia
60
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
- # 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`.
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
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`.
@@ -96,22 +96,22 @@ module Algolia
96
96
  # Whether to enable A/B testing for this search.
97
97
  attr_accessor :enable_ab_test
98
98
 
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.
99
+ # 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.
100
100
  attr_accessor :attributes_to_retrieve
101
101
 
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/).
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** - `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/).
103
103
  attr_accessor :ranking
104
104
 
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.
105
+ # 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.
106
106
  attr_accessor :custom_ranking
107
107
 
108
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.
109
109
  attr_accessor :relevancy_strictness
110
110
 
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/).
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. Attribute names are case-sensitive. 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/).
112
112
  attr_accessor :attributes_to_highlight
113
113
 
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.
114
+ # Attributes for which to enable snippets. Attribute names are case-sensitive. 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.
115
115
  attr_accessor :attributes_to_snippet
116
116
 
117
117
  # HTML tag to insert before the highlighted parts in all highlighted results and snippets.
@@ -140,7 +140,7 @@ module Algolia
140
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.
141
141
  attr_accessor :allow_typos_on_numeric_tokens
142
142
 
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.
143
+ # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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.
144
144
  attr_accessor :disable_typo_tolerance_on_attributes
145
145
 
146
146
  attr_accessor :ignore_plurals
@@ -176,15 +176,15 @@ module Algolia
176
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).
177
177
  attr_accessor :optional_words
178
178
 
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.
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). Attribute names are case-sensitive. 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.
180
180
  attr_accessor :disable_exact_on_attributes
181
181
 
182
182
  attr_accessor :exact_on_single_word_query
183
183
 
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>.
184
+ # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
185
185
  attr_accessor :alternatives_as_exact
186
186
 
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.
187
+ # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
188
188
  attr_accessor :advanced_syntax_features
189
189
 
190
190
  attr_accessor :distinct
@@ -204,7 +204,7 @@ module Algolia
204
204
  # Maximum number of facet values to return for each facet.
205
205
  attr_accessor :max_values_per_facet
206
206
 
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/).
207
+ # 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/).
208
208
  attr_accessor :sort_facet_values_by
209
209
 
210
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.
@@ -350,7 +350,7 @@ module Algolia
350
350
  :minimum_around_radius => :Integer,
351
351
  :inside_bounding_box => :'Array<Array<Float>>',
352
352
  :inside_polygon => :'Array<Array<Float>>',
353
- :natural_languages => :'Array<String>',
353
+ :natural_languages => :'Array<SupportedLanguage>',
354
354
  :rule_contexts => :'Array<String>',
355
355
  :personalization_impact => :Integer,
356
356
  :user_token => :String,
@@ -418,7 +418,6 @@ module Algolia
418
418
  # List of class defined in allOf (OpenAPI v3)
419
419
  def self.openapi_all_of
420
420
  [
421
- :BaseRecommendedForYouQueryParameters,
422
421
  :SearchParamsObject
423
422
  ]
424
423
  end
@@ -427,14 +426,14 @@ module Algolia
427
426
  # @param [Hash] attributes Model attributes in the form of hash
428
427
  def initialize(attributes = {})
429
428
  unless attributes.is_a?(Hash)
430
- raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::RecommendedForYouQueryParameters` initialize method"
429
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::FallbackParams` initialize method"
431
430
  end
432
431
 
433
432
  # check to see if the attribute exists and convert string to symbol for hash key
434
433
  attributes = attributes.each_with_object({}) do |(k, v), h|
435
434
  unless self.class.attribute_map.key?(k.to_sym)
436
435
  raise ArgumentError,
437
- "`#{k}` is not a valid attribute in `Algolia::RecommendedForYouQueryParameters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
436
+ "`#{k}` is not a valid attribute in `Algolia::FallbackParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
438
437
  end
439
438
 
440
439
  h[k.to_sym] = v
@@ -550,8 +549,6 @@ module Algolia
550
549
 
551
550
  if attributes.key?(:user_token)
552
551
  self.user_token = attributes[:user_token]
553
- else
554
- self.user_token = nil
555
552
  end
556
553
 
557
554
  if attributes.key?(:get_ranking_info)
@@ -5,12 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- class EditType
9
- REMOVE = "remove".freeze
10
- REPLACE = "replace".freeze
8
+ class FbtModel
9
+ BOUGHT_TOGETHER = "bought-together".freeze
11
10
 
12
11
  def self.all_vars
13
- @all_vars ||= [REMOVE, REPLACE].freeze
12
+ @all_vars ||= [BOUGHT_TOGETHER].freeze
14
13
  end
15
14
 
16
15
  # Builds the enum from string
@@ -24,9 +23,9 @@ module Algolia
24
23
  # @param [String] The enum value in the form of the string
25
24
  # @return [String] The enum value
26
25
  def build_from_hash(value)
27
- return value if EditType.all_vars.include?(value)
26
+ return value if FbtModel.all_vars.include?(value)
28
27
 
29
- raise "Invalid ENUM value #{value} for class #EditType"
28
+ raise "Invalid ENUM value #{value} for class #FbtModel"
30
29
  end
31
30
  end
32
31
  end
@@ -5,12 +5,12 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- class BaseTrendingFacetsQuery
9
- # Facet name for trending models.
10
- attr_accessor :facet_name
11
-
8
+ class FrequentlyBoughtTogether
12
9
  attr_accessor :model
13
10
 
11
+ # Unique record identifier.
12
+ attr_accessor :object_id
13
+
14
14
  class EnumAttributeValidator
15
15
  attr_reader :datatype
16
16
  attr_reader :allowable_values
@@ -36,8 +36,8 @@ module Algolia
36
36
  # Attribute mapping from ruby-style variable name to JSON key.
37
37
  def self.attribute_map
38
38
  {
39
- :facet_name => :facetName,
40
- :model => :model
39
+ :model => :model,
40
+ :object_id => :objectID
41
41
  }
42
42
  end
43
43
 
@@ -49,8 +49,8 @@ module Algolia
49
49
  # Attribute type mapping.
50
50
  def self.types_mapping
51
51
  {
52
- :facet_name => :String,
53
- :model => :TrendingFacetsModel
52
+ :model => :FbtModel,
53
+ :object_id => :String
54
54
  }
55
55
  end
56
56
 
@@ -63,27 +63,29 @@ module Algolia
63
63
  # @param [Hash] attributes Model attributes in the form of hash
64
64
  def initialize(attributes = {})
65
65
  unless attributes.is_a?(Hash)
66
- raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::BaseTrendingFacetsQuery` initialize method"
66
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::FrequentlyBoughtTogether` initialize method"
67
67
  end
68
68
 
69
69
  # check to see if the attribute exists and convert string to symbol for hash key
70
70
  attributes = attributes.each_with_object({}) do |(k, v), h|
71
71
  unless self.class.attribute_map.key?(k.to_sym)
72
72
  raise ArgumentError,
73
- "`#{k}` is not a valid attribute in `Algolia::BaseTrendingFacetsQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ "`#{k}` is not a valid attribute in `Algolia::FrequentlyBoughtTogether`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
74
  end
75
75
 
76
76
  h[k.to_sym] = v
77
77
  end
78
78
 
79
- if attributes.key?(:facet_name)
80
- self.facet_name = attributes[:facet_name]
79
+ if attributes.key?(:model)
80
+ self.model = attributes[:model]
81
81
  else
82
- self.facet_name = nil
82
+ self.model = nil
83
83
  end
84
84
 
85
- if attributes.key?(:model)
86
- self.model = attributes[:model]
85
+ if attributes.key?(:object_id)
86
+ self.object_id = attributes[:object_id]
87
+ else
88
+ self.object_id = nil
87
89
  end
88
90
  end
89
91
 
@@ -93,8 +95,8 @@ module Algolia
93
95
  return true if equal?(other)
94
96
 
95
97
  self.class == other.class &&
96
- facet_name == other.facet_name &&
97
- model == other.model
98
+ model == other.model &&
99
+ object_id == other.object_id
98
100
  end
99
101
 
100
102
  # @see the `==` method
@@ -106,7 +108,7 @@ module Algolia
106
108
  # Calculates hash code according to all attributes.
107
109
  # @return [Integer] Hash code
108
110
  def hash
109
- [facet_name, model].hash
111
+ [model, object_id].hash
110
112
  end
111
113
 
112
114
  # Builds the object from hash
@@ -5,9 +5,9 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- # Recommend parameters.
8
+ # Recommend request body.
9
9
  class GetRecommendationsParams
10
- # Request parameters depend on the model (recommendations or trending).
10
+ # Recommendation request with parameters depending on the requested model.
11
11
  attr_accessor :requests
12
12
 
13
13
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -5,8 +5,8 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- # Object ID of the record to hide.
9
- class ConsequenceHide
8
+ # Object ID of the recommendation you want to exclude.
9
+ class HideConsequenceObject
10
10
  # Unique record identifier.
11
11
  attr_accessor :object_id
12
12
 
@@ -38,14 +38,14 @@ module Algolia
38
38
  # @param [Hash] attributes Model attributes in the form of hash
39
39
  def initialize(attributes = {})
40
40
  unless attributes.is_a?(Hash)
41
- raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::ConsequenceHide` initialize method"
41
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::HideConsequenceObject` initialize method"
42
42
  end
43
43
 
44
44
  # check to see if the attribute exists and convert string to symbol for hash key
45
45
  attributes = attributes.each_with_object({}) do |(k, v), h|
46
46
  unless self.class.attribute_map.key?(k.to_sym)
47
47
  raise ArgumentError,
48
- "`#{k}` is not a valid attribute in `Algolia::ConsequenceHide`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ "`#{k}` is not a valid attribute in `Algolia::HideConsequenceObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
49
  end
50
50
 
51
51
  h[k.to_sym] = v
@@ -53,8 +53,6 @@ module Algolia
53
53
 
54
54
  if attributes.key?(:object_id)
55
55
  self.object_id = attributes[:object_id]
56
- else
57
- self.object_id = nil
58
56
  end
59
57
  end
60
58
 
@@ -6,22 +6,22 @@ require 'time'
6
6
  module Algolia
7
7
  module Recommend
8
8
  class IndexSettingsAsSearchParams
9
- # 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.
9
+ # 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.
10
10
  attr_accessor :attributes_to_retrieve
11
11
 
12
- # 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/).
12
+ # 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/).
13
13
  attr_accessor :ranking
14
14
 
15
- # 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.
15
+ # 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.
16
16
  attr_accessor :custom_ranking
17
17
 
18
18
  # 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.
19
19
  attr_accessor :relevancy_strictness
20
20
 
21
- # 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/).
21
+ # Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. 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/).
22
22
  attr_accessor :attributes_to_highlight
23
23
 
24
- # 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.
24
+ # Attributes for which to enable snippets. Attribute names are case-sensitive. 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.
25
25
  attr_accessor :attributes_to_snippet
26
26
 
27
27
  # HTML tag to insert before the highlighted parts in all highlighted results and snippets.
@@ -50,7 +50,7 @@ module Algolia
50
50
  # 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.
51
51
  attr_accessor :allow_typos_on_numeric_tokens
52
52
 
53
- # 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.
53
+ # Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. 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.
54
54
  attr_accessor :disable_typo_tolerance_on_attributes
55
55
 
56
56
  attr_accessor :ignore_plurals
@@ -86,15 +86,15 @@ module Algolia
86
86
  # 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).
87
87
  attr_accessor :optional_words
88
88
 
89
- # 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.
89
+ # 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 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.
90
90
  attr_accessor :disable_exact_on_attributes
91
91
 
92
92
  attr_accessor :exact_on_single_word_query
93
93
 
94
- # 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>.
94
+ # Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
95
95
  attr_accessor :alternatives_as_exact
96
96
 
97
- # 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.
97
+ # Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
98
98
  attr_accessor :advanced_syntax_features
99
99
 
100
100
  attr_accessor :distinct
@@ -114,7 +114,7 @@ module Algolia
114
114
  # Maximum number of facet values to return for each facet.
115
115
  attr_accessor :max_values_per_facet
116
116
 
117
- # 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/).
117
+ # 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/).
118
118
  attr_accessor :sort_facet_values_by
119
119
 
120
120
  # 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.
@@ -5,14 +5,12 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- class BaseRecommendationsQuery
8
+ class LookingSimilar
9
9
  attr_accessor :model
10
10
 
11
11
  # Unique record identifier.
12
12
  attr_accessor :object_id
13
13
 
14
- attr_accessor :query_parameters
15
-
16
14
  attr_accessor :fallback_parameters
17
15
 
18
16
  class EnumAttributeValidator
@@ -42,7 +40,6 @@ module Algolia
42
40
  {
43
41
  :model => :model,
44
42
  :object_id => :objectID,
45
- :query_parameters => :queryParameters,
46
43
  :fallback_parameters => :fallbackParameters
47
44
  }
48
45
  end
@@ -55,10 +52,9 @@ module Algolia
55
52
  # Attribute type mapping.
56
53
  def self.types_mapping
57
54
  {
58
- :model => :RecommendationModels,
55
+ :model => :LookingSimilarModel,
59
56
  :object_id => :String,
60
- :query_parameters => :SearchParamsObject,
61
- :fallback_parameters => :SearchParamsObject
57
+ :fallback_parameters => :FallbackParams
62
58
  }
63
59
  end
64
60
 
@@ -71,14 +67,14 @@ module Algolia
71
67
  # @param [Hash] attributes Model attributes in the form of hash
72
68
  def initialize(attributes = {})
73
69
  unless attributes.is_a?(Hash)
74
- raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::BaseRecommendationsQuery` initialize method"
70
+ raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::LookingSimilar` initialize method"
75
71
  end
76
72
 
77
73
  # check to see if the attribute exists and convert string to symbol for hash key
78
74
  attributes = attributes.each_with_object({}) do |(k, v), h|
79
75
  unless self.class.attribute_map.key?(k.to_sym)
80
76
  raise ArgumentError,
81
- "`#{k}` is not a valid attribute in `Algolia::BaseRecommendationsQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ "`#{k}` is not a valid attribute in `Algolia::LookingSimilar`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
78
  end
83
79
 
84
80
  h[k.to_sym] = v
@@ -96,10 +92,6 @@ module Algolia
96
92
  self.object_id = nil
97
93
  end
98
94
 
99
- if attributes.key?(:query_parameters)
100
- self.query_parameters = attributes[:query_parameters]
101
- end
102
-
103
95
  if attributes.key?(:fallback_parameters)
104
96
  self.fallback_parameters = attributes[:fallback_parameters]
105
97
  end
@@ -113,7 +105,6 @@ module Algolia
113
105
  self.class == other.class &&
114
106
  model == other.model &&
115
107
  object_id == other.object_id &&
116
- query_parameters == other.query_parameters &&
117
108
  fallback_parameters == other.fallback_parameters
118
109
  end
119
110
 
@@ -126,7 +117,7 @@ module Algolia
126
117
  # Calculates hash code according to all attributes.
127
118
  # @return [Integer] Hash code
128
119
  def hash
129
- [model, object_id, query_parameters, fallback_parameters].hash
120
+ [model, object_id, fallback_parameters].hash
130
121
  end
131
122
 
132
123
  # Builds the object from hash
@@ -5,14 +5,11 @@ require 'time'
5
5
 
6
6
  module Algolia
7
7
  module Recommend
8
- class Anchoring
9
- IS = "is".freeze
10
- STARTS_WITH = "startsWith".freeze
11
- ENDS_WITH = "endsWith".freeze
12
- CONTAINS = "contains".freeze
8
+ class LookingSimilarModel
9
+ LOOKING_SIMILAR = "looking-similar".freeze
13
10
 
14
11
  def self.all_vars
15
- @all_vars ||= [IS, STARTS_WITH, ENDS_WITH, CONTAINS].freeze
12
+ @all_vars ||= [LOOKING_SIMILAR].freeze
16
13
  end
17
14
 
18
15
  # Builds the enum from string
@@ -26,9 +23,9 @@ module Algolia
26
23
  # @param [String] The enum value in the form of the string
27
24
  # @return [String] The enum value
28
25
  def build_from_hash(value)
29
- return value if Anchoring.all_vars.include?(value)
26
+ return value if LookingSimilarModel.all_vars.include?(value)
30
27
 
31
- raise "Invalid ENUM value #{value} for class #Anchoring"
28
+ raise "Invalid ENUM value #{value} for class #LookingSimilarModel"
32
29
  end
33
30
  end
34
31
  end