algolia 3.5.0 → 3.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +1 -1
  4. data/lib/algolia/api/abtesting_client.rb +17 -16
  5. data/lib/algolia/api/analytics_client.rb +173 -333
  6. data/lib/algolia/api/ingestion_client.rb +40 -200
  7. data/lib/algolia/api/insights_client.rb +18 -32
  8. data/lib/algolia/api/monitoring_client.rb +33 -25
  9. data/lib/algolia/api/personalization_client.rb +16 -8
  10. data/lib/algolia/api/query_suggestions_client.rb +17 -9
  11. data/lib/algolia/api/recommend_client.rb +17 -9
  12. data/lib/algolia/api/search_client.rb +63 -110
  13. data/lib/algolia/configuration.rb +16 -1
  14. data/lib/algolia/models/abtesting/ab_test_configuration.rb +0 -2
  15. data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
  16. data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
  17. data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
  18. data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
  19. data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
  20. data/lib/algolia/models/abtesting/variant.rb +0 -20
  21. data/lib/algolia/models/analytics/click_position.rb +0 -32
  22. data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
  23. data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
  24. data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
  25. data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
  26. data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
  27. data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
  28. data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
  29. data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
  30. data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
  31. data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
  32. data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
  33. data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
  34. data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
  35. data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
  36. data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
  37. data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
  38. data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
  39. data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
  40. data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
  41. data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
  42. data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
  43. data/lib/algolia/models/ingestion/event.rb +1 -25
  44. data/lib/algolia/models/ingestion/pagination.rb +0 -60
  45. data/lib/algolia/models/ingestion/run.rb +0 -18
  46. data/lib/algolia/models/ingestion/source_csv.rb +0 -21
  47. data/lib/algolia/models/ingestion/task.rb +0 -18
  48. data/lib/algolia/models/ingestion/task_create.rb +0 -18
  49. data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
  50. data/lib/algolia/models/ingestion/task_update.rb +0 -18
  51. data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
  52. data/lib/algolia/models/ingestion/task_v1.rb +0 -18
  53. data/lib/algolia/models/ingestion/transformation.rb +1 -1
  54. data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
  55. data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
  56. data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
  57. data/lib/algolia/models/insights/clicked_filters.rb +0 -105
  58. data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
  59. data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
  60. data/lib/algolia/models/insights/converted_filters.rb +0 -105
  61. data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
  62. data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
  63. data/lib/algolia/models/insights/insights_events.rb +0 -18
  64. data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
  65. data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
  66. data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
  67. data/lib/algolia/models/insights/viewed_filters.rb +0 -105
  68. data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
  69. data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
  70. data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
  71. data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
  72. data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
  73. data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
  74. data/lib/algolia/models/recommend/banner_image.rb +4 -2
  75. data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
  76. data/lib/algolia/models/recommend/condition.rb +0 -15
  77. data/lib/algolia/models/recommend/consequence.rb +0 -28
  78. data/lib/algolia/models/recommend/fallback_params.rb +3 -95
  79. data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
  80. data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
  81. data/lib/algolia/models/recommend/ranking_info.rb +0 -112
  82. data/lib/algolia/models/recommend/recommend_hit.rb +0 -20
  83. data/lib/algolia/models/recommend/recommend_search_params.rb +3 -95
  84. data/lib/algolia/models/recommend/recommendations_results.rb +13 -61
  85. data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
  86. data/lib/algolia/models/recommend/related_query.rb +0 -36
  87. data/lib/algolia/models/recommend/search_recommend_rules_params.rb +2 -52
  88. data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
  89. data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -20
  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/widgets.rb +5 -2
  93. data/lib/algolia/models/search/banner_image.rb +4 -2
  94. data/lib/algolia/models/search/browse_params_object.rb +1 -129
  95. data/lib/algolia/models/search/browse_response.rb +13 -61
  96. data/lib/algolia/models/search/condition.rb +0 -15
  97. data/lib/algolia/models/search/consequence.rb +0 -28
  98. data/lib/algolia/models/search/consequence_params.rb +1 -129
  99. data/lib/algolia/models/search/get_api_key_response.rb +2 -0
  100. data/lib/algolia/models/search/get_objects_response.rb +0 -2
  101. data/lib/algolia/models/search/index_settings.rb +3 -81
  102. data/lib/algolia/models/search/log.rb +0 -34
  103. data/lib/algolia/models/search/promote_object_ids.rb +0 -14
  104. data/lib/algolia/models/search/ranking_info.rb +0 -112
  105. data/lib/algolia/models/search/rule.rb +0 -18
  106. data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
  107. data/lib/algolia/models/search/search_dictionary_entries_response.rb +1 -15
  108. data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
  109. data/lib/algolia/models/search/search_for_facets.rb +1 -129
  110. data/lib/algolia/models/search/search_for_hits.rb +1 -129
  111. data/lib/algolia/models/search/search_params_object.rb +1 -129
  112. data/lib/algolia/models/search/search_response.rb +13 -61
  113. data/lib/algolia/models/search/search_rules_params.rb +2 -34
  114. data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
  115. data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
  116. data/lib/algolia/models/search/search_user_ids_response.rb +1 -33
  117. data/lib/algolia/models/search/settings_response.rb +3 -81
  118. data/lib/algolia/models/search/user_hit.rb +0 -15
  119. data/lib/algolia/models/search/user_id.rb +0 -15
  120. data/lib/algolia/models/search/widgets.rb +5 -2
  121. data/lib/algolia/user_agent.rb +8 -2
  122. data/lib/algolia/version.rb +1 -1
  123. metadata +2 -11
  124. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +0 -230
  125. data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +0 -212
  126. data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +0 -252
  127. data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +0 -263
  128. data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
  129. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
  130. data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
  131. data/lib/algolia/models/recommend/banners.rb +0 -209
  132. data/lib/algolia/models/search/banners.rb +0 -209
@@ -184,7 +184,7 @@ module Algolia
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
186
186
 
187
- # 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.
187
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `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.
188
188
  attr_accessor :alternatives_as_exact
189
189
 
190
190
  # 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.
@@ -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)
@@ -184,7 +184,7 @@ module Algolia
184
184
 
185
185
  attr_accessor :exact_on_single_word_query
186
186
 
187
- # 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.
187
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `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.
188
188
  attr_accessor :alternatives_as_exact
189
189
 
190
190
  # 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.
@@ -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)
@@ -182,7 +182,7 @@ module Algolia
182
182
 
183
183
  attr_accessor :exact_on_single_word_query
184
184
 
185
- # 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
+ # Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `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.
186
186
  attr_accessor :alternatives_as_exact
187
187
 
188
188
  # 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.
@@ -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)
@@ -20,6 +20,9 @@ module Algolia
20
20
 
21
21
  attr_accessor :exhaustive
22
22
 
23
+ # Rules applied to the query.
24
+ attr_accessor :applied_rules
25
+
23
26
  # See the `facetsCount` field of the `exhaustive` object in the response.
24
27
  attr_accessor :exhaustive_facets_count
25
28
 
@@ -109,6 +112,7 @@ module Algolia
109
112
  :around_lat_lng => :aroundLatLng,
110
113
  :automatic_radius => :automaticRadius,
111
114
  :exhaustive => :exhaustive,
115
+ :applied_rules => :appliedRules,
112
116
  :exhaustive_facets_count => :exhaustiveFacetsCount,
113
117
  :exhaustive_nb_hits => :exhaustiveNbHits,
114
118
  :exhaustive_typo => :exhaustiveTypo,
@@ -152,6 +156,7 @@ module Algolia
152
156
  :around_lat_lng => :"String",
153
157
  :automatic_radius => :"String",
154
158
  :exhaustive => :"Exhaustive",
159
+ :applied_rules => :"Array<Object>",
155
160
  :exhaustive_facets_count => :"Boolean",
156
161
  :exhaustive_nb_hits => :"Boolean",
157
162
  :exhaustive_typo => :"Boolean",
@@ -228,6 +233,12 @@ module Algolia
228
233
  self.exhaustive = attributes[:exhaustive]
229
234
  end
230
235
 
236
+ if attributes.key?(:applied_rules)
237
+ if (value = attributes[:applied_rules]).is_a?(Array)
238
+ self.applied_rules = value
239
+ end
240
+ end
241
+
231
242
  if attributes.key?(:exhaustive_facets_count)
232
243
  self.exhaustive_facets_count = attributes[:exhaustive_facets_count]
233
244
  end
@@ -355,67 +366,6 @@ module Algolia
355
366
  self.additional_properties.merge!(attributes.reject { |k, _| self.class.attribute_map.key?(k.to_sym) })
356
367
  end
357
368
 
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
369
  # Checks equality by comparing each attribute.
420
370
  # @param [Object] Object to be compared
421
371
  def ==(other)
@@ -426,6 +376,7 @@ module Algolia
426
376
  around_lat_lng == other.around_lat_lng &&
427
377
  automatic_radius == other.automatic_radius &&
428
378
  exhaustive == other.exhaustive &&
379
+ applied_rules == other.applied_rules &&
429
380
  exhaustive_facets_count == other.exhaustive_facets_count &&
430
381
  exhaustive_nb_hits == other.exhaustive_nb_hits &&
431
382
  exhaustive_typo == other.exhaustive_typo &&
@@ -470,6 +421,7 @@ module Algolia
470
421
  around_lat_lng,
471
422
  automatic_radius,
472
423
  exhaustive,
424
+ applied_rules,
473
425
  exhaustive_facets_count,
474
426
  exhaustive_nb_hits,
475
427
  exhaustive_typo,
@@ -15,10 +15,10 @@ module Algolia
15
15
  # Only return rules that match the context (exact match).
16
16
  attr_accessor :context
17
17
 
18
- # Requested page of the API response.
18
+ # Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
19
19
  attr_accessor :page
20
20
 
21
- # Maximum number of hits per page.
21
+ # Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
22
22
  attr_accessor :hits_per_page
23
23
 
24
24
  # If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
@@ -110,38 +110,6 @@ module Algolia
110
110
  end
111
111
  end
112
112
 
113
- # Custom attribute writer method with validation
114
- # @param [Object] page Value to be assigned
115
- def page=(page)
116
- if page.nil?
117
- raise ArgumentError, "page cannot be nil"
118
- end
119
-
120
- if page < 0
121
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
122
- end
123
-
124
- @page = page
125
- end
126
-
127
- # Custom attribute writer method with validation
128
- # @param [Object] hits_per_page Value to be assigned
129
- def hits_per_page=(hits_per_page)
130
- if hits_per_page.nil?
131
- raise ArgumentError, "hits_per_page cannot be nil"
132
- end
133
-
134
- if hits_per_page > 1000
135
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
136
- end
137
-
138
- if hits_per_page < 1
139
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
140
- end
141
-
142
- @hits_per_page = hits_per_page
143
- end
144
-
145
113
  # Checks equality by comparing each attribute.
146
114
  # @param [Object] Object to be compared
147
115
  def ==(other)
@@ -89,38 +89,6 @@ module Algolia
89
89
  end
90
90
  end
91
91
 
92
- # Custom attribute writer method with validation
93
- # @param [Object] page Value to be assigned
94
- def page=(page)
95
- if page.nil?
96
- raise ArgumentError, "page cannot be nil"
97
- end
98
-
99
- if page < 0
100
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
101
- end
102
-
103
- @page = page
104
- end
105
-
106
- # Custom attribute writer method with validation
107
- # @param [Object] hits_per_page Value to be assigned
108
- def hits_per_page=(hits_per_page)
109
- if hits_per_page.nil?
110
- raise ArgumentError, "hits_per_page cannot be nil"
111
- end
112
-
113
- if hits_per_page > 1000
114
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
115
- end
116
-
117
- if hits_per_page < 1
118
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
119
- end
120
-
121
- @hits_per_page = hits_per_page
122
- end
123
-
124
92
  # Checks equality by comparing each attribute.
125
93
  # @param [Object] Object to be compared
126
94
  def ==(other)
@@ -93,38 +93,6 @@ module Algolia
93
93
  end
94
94
  end
95
95
 
96
- # Custom attribute writer method with validation
97
- # @param [Object] page Value to be assigned
98
- def page=(page)
99
- if page.nil?
100
- raise ArgumentError, "page cannot be nil"
101
- end
102
-
103
- if page < 0
104
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
105
- end
106
-
107
- @page = page
108
- end
109
-
110
- # Custom attribute writer method with validation
111
- # @param [Object] hits_per_page Value to be assigned
112
- def hits_per_page=(hits_per_page)
113
- if hits_per_page.nil?
114
- raise ArgumentError, "hits_per_page cannot be nil"
115
- end
116
-
117
- if hits_per_page > 1000
118
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
119
- end
120
-
121
- if hits_per_page < 1
122
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
123
- end
124
-
125
- @hits_per_page = hits_per_page
126
- end
127
-
128
96
  # Checks equality by comparing each attribute.
129
97
  # @param [Object] Object to be compared
130
98
  def ==(other)