algolia 3.4.0 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +0 -7
  5. data/lib/algolia/api/analytics_client.rb +32 -88
  6. data/lib/algolia/api/ingestion_client.rb +2 -170
  7. data/lib/algolia/api/insights_client.rb +0 -22
  8. data/lib/algolia/api/monitoring_client.rb +11 -11
  9. data/lib/algolia/api/search_client.rb +19 -74
  10. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  11. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  12. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  13. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  14. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  15. data/lib/algolia/models/abtesting/variant.rb +0 -18
  16. data/lib/algolia/models/analytics/click_position.rb +0 -32
  17. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  18. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  19. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  20. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  21. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  23. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  24. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  25. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  26. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  27. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  28. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  29. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  30. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  31. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  32. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  33. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  34. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  35. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  36. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  37. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  38. data/lib/algolia/models/ingestion/event.rb +0 -14
  39. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  40. data/lib/algolia/models/ingestion/run.rb +0 -18
  41. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  42. data/lib/algolia/models/ingestion/task.rb +0 -18
  43. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  44. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  45. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  46. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  47. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  48. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  49. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  50. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  51. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  52. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  53. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  54. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  55. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  56. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  57. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  58. data/lib/algolia/models/insights/insights_events.rb +0 -18
  59. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  60. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  61. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  62. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  63. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  64. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  65. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  66. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  67. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  68. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  69. data/lib/algolia/models/recommend/banner.rb +218 -0
  70. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_response.rb → recommend/banner_image.rb} +31 -38
  71. data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_with_index.rb → recommend/banner_image_url.rb} +23 -23
  72. data/lib/algolia/models/{query-suggestions/get_config_status200_response.rb → recommend/banner_link.rb} +13 -53
  73. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  74. data/lib/algolia/models/recommend/condition.rb +0 -15
  75. data/lib/algolia/models/recommend/consequence.rb +0 -28
  76. data/lib/algolia/models/recommend/fallback_params.rb +8 -100
  77. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  78. data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
  79. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  80. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  81. data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
  82. data/lib/algolia/models/recommend/recommend_search_params.rb +8 -100
  83. data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
  84. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  85. data/lib/algolia/models/recommend/related_query.rb +0 -36
  86. data/lib/algolia/models/recommend/rendering_content.rb +14 -5
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
  90. data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
  91. data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
  92. data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
  93. data/lib/algolia/models/recommend/widgets.rb +212 -0
  94. data/lib/algolia/models/search/api_key.rb +1 -1
  95. data/lib/algolia/models/search/banner.rb +218 -0
  96. data/lib/algolia/models/{query-suggestions/get_log_file200_response.rb → search/banner_image.rb} +21 -61
  97. data/lib/algolia/models/search/banner_image_url.rb +212 -0
  98. data/lib/algolia/models/search/banner_link.rb +212 -0
  99. data/lib/algolia/models/search/browse_params_object.rb +4 -132
  100. data/lib/algolia/models/search/browse_response.rb +0 -61
  101. data/lib/algolia/models/search/condition.rb +0 -15
  102. data/lib/algolia/models/search/consequence.rb +0 -28
  103. data/lib/algolia/models/search/consequence_params.rb +4 -132
  104. data/lib/algolia/models/search/delete_by_params.rb +1 -1
  105. data/lib/algolia/models/search/get_api_key_response.rb +1 -1
  106. data/lib/algolia/models/search/index_settings.rb +7 -85
  107. data/lib/algolia/models/search/log.rb +0 -34
  108. data/lib/algolia/models/search/numeric_filters.rb +1 -1
  109. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  110. data/lib/algolia/models/search/ranking_info.rb +0 -112
  111. data/lib/algolia/models/search/rendering_content.rb +14 -5
  112. data/lib/algolia/models/search/rule.rb +0 -18
  113. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  114. data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
  115. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  116. data/lib/algolia/models/search/search_for_facets.rb +4 -132
  117. data/lib/algolia/models/search/search_for_hits.rb +4 -132
  118. data/lib/algolia/models/search/search_params_object.rb +4 -132
  119. data/lib/algolia/models/search/search_response.rb +0 -61
  120. data/lib/algolia/models/search/search_rules_params.rb +0 -32
  121. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  122. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  123. data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
  124. data/lib/algolia/models/search/settings_response.rb +7 -85
  125. data/lib/algolia/models/search/typo_tolerance.rb +1 -1
  126. data/lib/algolia/models/search/user_hit.rb +0 -15
  127. data/lib/algolia/models/search/user_id.rb +0 -15
  128. data/lib/algolia/models/search/widgets.rb +212 -0
  129. data/lib/algolia/version.rb +1 -1
  130. metadata +12 -9
  131. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  132. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  133. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
@@ -92,38 +92,6 @@ module Algolia
92
92
  end
93
93
  end
94
94
 
95
- # Custom attribute writer method with validation
96
- # @param [Object] page Value to be assigned
97
- def page=(page)
98
- if page.nil?
99
- raise ArgumentError, "page cannot be nil"
100
- end
101
-
102
- if page < 0
103
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
104
- end
105
-
106
- @page = page
107
- end
108
-
109
- # Custom attribute writer method with validation
110
- # @param [Object] hits_per_page Value to be assigned
111
- def hits_per_page=(hits_per_page)
112
- if hits_per_page.nil?
113
- raise ArgumentError, "hits_per_page cannot be nil"
114
- end
115
-
116
- if hits_per_page > 1000
117
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
118
- end
119
-
120
- if hits_per_page < 1
121
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
122
- end
123
-
124
- @hits_per_page = hits_per_page
125
- end
126
-
127
95
  # Checks equality by comparing each attribute.
128
96
  # @param [Object] Object to be compared
129
97
  def ==(other)
@@ -100,20 +100,6 @@ module Algolia
100
100
  end
101
101
  end
102
102
 
103
- # Custom attribute writer method with validation
104
- # @param [Object] page Value to be assigned
105
- def page=(page)
106
- if page.nil?
107
- raise ArgumentError, "page cannot be nil"
108
- end
109
-
110
- if page < 0
111
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
112
- end
113
-
114
- @page = page
115
- end
116
-
117
103
  # Checks equality by comparing each attribute.
118
104
  # @param [Object] Object to be compared
119
105
  def ==(other)
@@ -81,20 +81,6 @@ module Algolia
81
81
  end
82
82
  end
83
83
 
84
- # Custom attribute writer method with validation
85
- # @param [Object] max_facet_hits Value to be assigned
86
- def max_facet_hits=(max_facet_hits)
87
- if max_facet_hits.nil?
88
- raise ArgumentError, "max_facet_hits cannot be nil"
89
- end
90
-
91
- if max_facet_hits > 100
92
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
93
- end
94
-
95
- @max_facet_hits = max_facet_hits
96
- end
97
-
98
84
  # Checks equality by comparing each attribute.
99
85
  # @param [Object] Object to be compared
100
86
  def ==(other)
@@ -47,7 +47,7 @@ module Algolia
47
47
  # Number of hits to retrieve (used in combination with `offset`).
48
48
  attr_accessor :length
49
49
 
50
- # 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`.
50
+ # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a 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`.
51
51
  attr_accessor :around_lat_lng
52
52
 
53
53
  # Whether to obtain the coordinates from the request's IP address.
@@ -176,10 +176,10 @@ module Algolia
176
176
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
177
177
  attr_accessor :advanced_syntax
178
178
 
179
- # 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).
179
+ # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
180
180
  attr_accessor :optional_words
181
181
 
182
- # 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.
182
+ # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
183
183
  attr_accessor :disable_exact_on_attributes
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
@@ -192,7 +192,7 @@ module Algolia
192
192
 
193
193
  attr_accessor :distinct
194
194
 
195
- # 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.
195
+ # 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 occurrences of \"house\" are replaced by \"home\" in the highlighted response.
196
196
  attr_accessor :replace_synonyms_in_highlight
197
197
 
198
198
  # 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.
@@ -817,134 +817,6 @@ module Algolia
817
817
  end
818
818
  end
819
819
 
820
- # Custom attribute writer method with validation
821
- # @param [Object] page Value to be assigned
822
- def page=(page)
823
- if page.nil?
824
- raise ArgumentError, "page cannot be nil"
825
- end
826
-
827
- if page < 0
828
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
829
- end
830
-
831
- @page = page
832
- end
833
-
834
- # Custom attribute writer method with validation
835
- # @param [Object] length Value to be assigned
836
- def length=(length)
837
- if length.nil?
838
- raise ArgumentError, "length cannot be nil"
839
- end
840
-
841
- if length > 1000
842
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
843
- end
844
-
845
- if length < 0
846
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
847
- end
848
-
849
- @length = length
850
- end
851
-
852
- # Custom attribute writer method with validation
853
- # @param [Object] minimum_around_radius Value to be assigned
854
- def minimum_around_radius=(minimum_around_radius)
855
- if minimum_around_radius.nil?
856
- raise ArgumentError, "minimum_around_radius cannot be nil"
857
- end
858
-
859
- if minimum_around_radius < 1
860
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
861
- end
862
-
863
- @minimum_around_radius = minimum_around_radius
864
- end
865
-
866
- # Custom attribute writer method with validation
867
- # @param [Object] personalization_impact Value to be assigned
868
- def personalization_impact=(personalization_impact)
869
- if personalization_impact.nil?
870
- raise ArgumentError, "personalization_impact cannot be nil"
871
- end
872
-
873
- if personalization_impact > 100
874
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
875
- end
876
-
877
- if personalization_impact < 0
878
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
879
- end
880
-
881
- @personalization_impact = personalization_impact
882
- end
883
-
884
- # Custom attribute writer method with validation
885
- # @param [Object] hits_per_page Value to be assigned
886
- def hits_per_page=(hits_per_page)
887
- if hits_per_page.nil?
888
- raise ArgumentError, "hits_per_page cannot be nil"
889
- end
890
-
891
- if hits_per_page > 1000
892
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
893
- end
894
-
895
- if hits_per_page < 1
896
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
897
- end
898
-
899
- @hits_per_page = hits_per_page
900
- end
901
-
902
- # Custom attribute writer method with validation
903
- # @param [Object] min_proximity Value to be assigned
904
- def min_proximity=(min_proximity)
905
- if min_proximity.nil?
906
- raise ArgumentError, "min_proximity cannot be nil"
907
- end
908
-
909
- if min_proximity > 7
910
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
911
- end
912
-
913
- if min_proximity < 1
914
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
915
- end
916
-
917
- @min_proximity = min_proximity
918
- end
919
-
920
- # Custom attribute writer method with validation
921
- # @param [Object] max_facet_hits Value to be assigned
922
- def max_facet_hits=(max_facet_hits)
923
- if max_facet_hits.nil?
924
- raise ArgumentError, "max_facet_hits cannot be nil"
925
- end
926
-
927
- if max_facet_hits > 100
928
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
929
- end
930
-
931
- @max_facet_hits = max_facet_hits
932
- end
933
-
934
- # Custom attribute writer method with validation
935
- # @param [Object] max_values_per_facet Value to be assigned
936
- def max_values_per_facet=(max_values_per_facet)
937
- if max_values_per_facet.nil?
938
- raise ArgumentError, "max_values_per_facet cannot be nil"
939
- end
940
-
941
- if max_values_per_facet > 1000
942
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
943
- end
944
-
945
- @max_values_per_facet = max_values_per_facet
946
- end
947
-
948
820
  # Checks equality by comparing each attribute.
949
821
  # @param [Object] Object to be compared
950
822
  def ==(other)
@@ -47,7 +47,7 @@ module Algolia
47
47
  # Number of hits to retrieve (used in combination with `offset`).
48
48
  attr_accessor :length
49
49
 
50
- # 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`.
50
+ # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a 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`.
51
51
  attr_accessor :around_lat_lng
52
52
 
53
53
  # Whether to obtain the coordinates from the request's IP address.
@@ -176,10 +176,10 @@ module Algolia
176
176
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
177
177
  attr_accessor :advanced_syntax
178
178
 
179
- # 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).
179
+ # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
180
180
  attr_accessor :optional_words
181
181
 
182
- # 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.
182
+ # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
183
183
  attr_accessor :disable_exact_on_attributes
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
@@ -192,7 +192,7 @@ module Algolia
192
192
 
193
193
  attr_accessor :distinct
194
194
 
195
- # 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.
195
+ # 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 occurrences of \"house\" are replaced by \"home\" in the highlighted response.
196
196
  attr_accessor :replace_synonyms_in_highlight
197
197
 
198
198
  # 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.
@@ -795,134 +795,6 @@ module Algolia
795
795
  end
796
796
  end
797
797
 
798
- # Custom attribute writer method with validation
799
- # @param [Object] page Value to be assigned
800
- def page=(page)
801
- if page.nil?
802
- raise ArgumentError, "page cannot be nil"
803
- end
804
-
805
- if page < 0
806
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
807
- end
808
-
809
- @page = page
810
- end
811
-
812
- # Custom attribute writer method with validation
813
- # @param [Object] length Value to be assigned
814
- def length=(length)
815
- if length.nil?
816
- raise ArgumentError, "length cannot be nil"
817
- end
818
-
819
- if length > 1000
820
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
821
- end
822
-
823
- if length < 0
824
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
825
- end
826
-
827
- @length = length
828
- end
829
-
830
- # Custom attribute writer method with validation
831
- # @param [Object] minimum_around_radius Value to be assigned
832
- def minimum_around_radius=(minimum_around_radius)
833
- if minimum_around_radius.nil?
834
- raise ArgumentError, "minimum_around_radius cannot be nil"
835
- end
836
-
837
- if minimum_around_radius < 1
838
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
839
- end
840
-
841
- @minimum_around_radius = minimum_around_radius
842
- end
843
-
844
- # Custom attribute writer method with validation
845
- # @param [Object] personalization_impact Value to be assigned
846
- def personalization_impact=(personalization_impact)
847
- if personalization_impact.nil?
848
- raise ArgumentError, "personalization_impact cannot be nil"
849
- end
850
-
851
- if personalization_impact > 100
852
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
853
- end
854
-
855
- if personalization_impact < 0
856
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
857
- end
858
-
859
- @personalization_impact = personalization_impact
860
- end
861
-
862
- # Custom attribute writer method with validation
863
- # @param [Object] hits_per_page Value to be assigned
864
- def hits_per_page=(hits_per_page)
865
- if hits_per_page.nil?
866
- raise ArgumentError, "hits_per_page cannot be nil"
867
- end
868
-
869
- if hits_per_page > 1000
870
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
871
- end
872
-
873
- if hits_per_page < 1
874
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
875
- end
876
-
877
- @hits_per_page = hits_per_page
878
- end
879
-
880
- # Custom attribute writer method with validation
881
- # @param [Object] min_proximity Value to be assigned
882
- def min_proximity=(min_proximity)
883
- if min_proximity.nil?
884
- raise ArgumentError, "min_proximity cannot be nil"
885
- end
886
-
887
- if min_proximity > 7
888
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
889
- end
890
-
891
- if min_proximity < 1
892
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
893
- end
894
-
895
- @min_proximity = min_proximity
896
- end
897
-
898
- # Custom attribute writer method with validation
899
- # @param [Object] max_facet_hits Value to be assigned
900
- def max_facet_hits=(max_facet_hits)
901
- if max_facet_hits.nil?
902
- raise ArgumentError, "max_facet_hits cannot be nil"
903
- end
904
-
905
- if max_facet_hits > 100
906
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
907
- end
908
-
909
- @max_facet_hits = max_facet_hits
910
- end
911
-
912
- # Custom attribute writer method with validation
913
- # @param [Object] max_values_per_facet Value to be assigned
914
- def max_values_per_facet=(max_values_per_facet)
915
- if max_values_per_facet.nil?
916
- raise ArgumentError, "max_values_per_facet cannot be nil"
917
- end
918
-
919
- if max_values_per_facet > 1000
920
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
921
- end
922
-
923
- @max_values_per_facet = max_values_per_facet
924
- end
925
-
926
798
  # Checks equality by comparing each attribute.
927
799
  # @param [Object] Object to be compared
928
800
  def ==(other)
@@ -45,7 +45,7 @@ module Algolia
45
45
  # Number of hits to retrieve (used in combination with `offset`).
46
46
  attr_accessor :length
47
47
 
48
- # 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
+ # Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a 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`.
49
49
  attr_accessor :around_lat_lng
50
50
 
51
51
  # Whether to obtain the coordinates from the request's IP address.
@@ -174,10 +174,10 @@ module Algolia
174
174
  # Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
175
175
  attr_accessor :advanced_syntax
176
176
 
177
- # 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
+ # Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn't include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
178
178
  attr_accessor :optional_words
179
179
 
180
- # 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
+ # Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
181
181
  attr_accessor :disable_exact_on_attributes
182
182
 
183
183
  attr_accessor :exact_on_single_word_query
@@ -190,7 +190,7 @@ module Algolia
190
190
 
191
191
  attr_accessor :distinct
192
192
 
193
- # 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.
193
+ # 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 occurrences of \"house\" are replaced by \"home\" in the highlighted response.
194
194
  attr_accessor :replace_synonyms_in_highlight
195
195
 
196
196
  # 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.
@@ -768,134 +768,6 @@ module Algolia
768
768
  end
769
769
  end
770
770
 
771
- # Custom attribute writer method with validation
772
- # @param [Object] page Value to be assigned
773
- def page=(page)
774
- if page.nil?
775
- raise ArgumentError, "page cannot be nil"
776
- end
777
-
778
- if page < 0
779
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
780
- end
781
-
782
- @page = page
783
- end
784
-
785
- # Custom attribute writer method with validation
786
- # @param [Object] length Value to be assigned
787
- def length=(length)
788
- if length.nil?
789
- raise ArgumentError, "length cannot be nil"
790
- end
791
-
792
- if length > 1000
793
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
794
- end
795
-
796
- if length < 0
797
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
798
- end
799
-
800
- @length = length
801
- end
802
-
803
- # Custom attribute writer method with validation
804
- # @param [Object] minimum_around_radius Value to be assigned
805
- def minimum_around_radius=(minimum_around_radius)
806
- if minimum_around_radius.nil?
807
- raise ArgumentError, "minimum_around_radius cannot be nil"
808
- end
809
-
810
- if minimum_around_radius < 1
811
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
812
- end
813
-
814
- @minimum_around_radius = minimum_around_radius
815
- end
816
-
817
- # Custom attribute writer method with validation
818
- # @param [Object] personalization_impact Value to be assigned
819
- def personalization_impact=(personalization_impact)
820
- if personalization_impact.nil?
821
- raise ArgumentError, "personalization_impact cannot be nil"
822
- end
823
-
824
- if personalization_impact > 100
825
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
826
- end
827
-
828
- if personalization_impact < 0
829
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
830
- end
831
-
832
- @personalization_impact = personalization_impact
833
- end
834
-
835
- # Custom attribute writer method with validation
836
- # @param [Object] hits_per_page Value to be assigned
837
- def hits_per_page=(hits_per_page)
838
- if hits_per_page.nil?
839
- raise ArgumentError, "hits_per_page cannot be nil"
840
- end
841
-
842
- if hits_per_page > 1000
843
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
844
- end
845
-
846
- if hits_per_page < 1
847
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
848
- end
849
-
850
- @hits_per_page = hits_per_page
851
- end
852
-
853
- # Custom attribute writer method with validation
854
- # @param [Object] min_proximity Value to be assigned
855
- def min_proximity=(min_proximity)
856
- if min_proximity.nil?
857
- raise ArgumentError, "min_proximity cannot be nil"
858
- end
859
-
860
- if min_proximity > 7
861
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
862
- end
863
-
864
- if min_proximity < 1
865
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
866
- end
867
-
868
- @min_proximity = min_proximity
869
- end
870
-
871
- # Custom attribute writer method with validation
872
- # @param [Object] max_facet_hits Value to be assigned
873
- def max_facet_hits=(max_facet_hits)
874
- if max_facet_hits.nil?
875
- raise ArgumentError, "max_facet_hits cannot be nil"
876
- end
877
-
878
- if max_facet_hits > 100
879
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
880
- end
881
-
882
- @max_facet_hits = max_facet_hits
883
- end
884
-
885
- # Custom attribute writer method with validation
886
- # @param [Object] max_values_per_facet Value to be assigned
887
- def max_values_per_facet=(max_values_per_facet)
888
- if max_values_per_facet.nil?
889
- raise ArgumentError, "max_values_per_facet cannot be nil"
890
- end
891
-
892
- if max_values_per_facet > 1000
893
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
894
- end
895
-
896
- @max_values_per_facet = max_values_per_facet
897
- end
898
-
899
771
  # Checks equality by comparing each attribute.
900
772
  # @param [Object] Object to be compared
901
773
  def ==(other)
@@ -355,67 +355,6 @@ module Algolia
355
355
  self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
356
356
  end
357
357
 
358
- # Custom attribute writer method with validation
359
- # @param [Object] ab_test_variant_id Value to be assigned
360
- def ab_test_variant_id=(ab_test_variant_id)
361
- if ab_test_variant_id.nil?
362
- raise ArgumentError, "ab_test_variant_id cannot be nil"
363
- end
364
-
365
- if ab_test_variant_id < 1
366
- raise ArgumentError, "invalid value for \"ab_test_variant_id\", must be greater than or equal to 1."
367
- end
368
-
369
- @ab_test_variant_id = ab_test_variant_id
370
- end
371
-
372
- # Custom attribute writer method with validation
373
- # @param [Object] around_lat_lng Value to be assigned
374
- def around_lat_lng=(around_lat_lng)
375
- if around_lat_lng.nil?
376
- raise ArgumentError, "around_lat_lng cannot be nil"
377
- end
378
-
379
- pattern = /^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$/
380
- if around_lat_lng !~ pattern
381
- raise ArgumentError, "invalid value for \"around_lat_lng\", must conform to the pattern #{pattern}."
382
- end
383
-
384
- @around_lat_lng = around_lat_lng
385
- end
386
-
387
- # Custom attribute writer method with validation
388
- # @param [Object] page Value to be assigned
389
- def page=(page)
390
- if page.nil?
391
- raise ArgumentError, "page cannot be nil"
392
- end
393
-
394
- if page < 0
395
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
396
- end
397
-
398
- @page = page
399
- end
400
-
401
- # Custom attribute writer method with validation
402
- # @param [Object] hits_per_page Value to be assigned
403
- def hits_per_page=(hits_per_page)
404
- if hits_per_page.nil?
405
- raise ArgumentError, "hits_per_page cannot be nil"
406
- end
407
-
408
- if hits_per_page > 1000
409
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
410
- end
411
-
412
- if hits_per_page < 1
413
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
414
- end
415
-
416
- @hits_per_page = hits_per_page
417
- end
418
-
419
358
  # Checks equality by comparing each attribute.
420
359
  # @param [Object] Object to be compared
421
360
  def ==(other)