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
@@ -178,7 +178,7 @@ module Algolia
178
178
 
179
179
  attr_accessor :exact_on_single_word_query
180
180
 
181
- # 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.
181
+ # 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.
182
182
  attr_accessor :alternatives_as_exact
183
183
 
184
184
  # 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.
@@ -783,134 +783,6 @@ module Algolia
783
783
  end
784
784
  end
785
785
 
786
- # Custom attribute writer method with validation
787
- # @param [Object] page Value to be assigned
788
- def page=(page)
789
- if page.nil?
790
- raise ArgumentError, "page cannot be nil"
791
- end
792
-
793
- if page < 0
794
- raise ArgumentError, "invalid value for \"page\", must be greater than or equal to 0."
795
- end
796
-
797
- @page = page
798
- end
799
-
800
- # Custom attribute writer method with validation
801
- # @param [Object] length Value to be assigned
802
- def length=(length)
803
- if length.nil?
804
- raise ArgumentError, "length cannot be nil"
805
- end
806
-
807
- if length > 1000
808
- raise ArgumentError, "invalid value for \"length\", must be smaller than or equal to 1000."
809
- end
810
-
811
- if length < 0
812
- raise ArgumentError, "invalid value for \"length\", must be greater than or equal to 0."
813
- end
814
-
815
- @length = length
816
- end
817
-
818
- # Custom attribute writer method with validation
819
- # @param [Object] minimum_around_radius Value to be assigned
820
- def minimum_around_radius=(minimum_around_radius)
821
- if minimum_around_radius.nil?
822
- raise ArgumentError, "minimum_around_radius cannot be nil"
823
- end
824
-
825
- if minimum_around_radius < 1
826
- raise ArgumentError, "invalid value for \"minimum_around_radius\", must be greater than or equal to 1."
827
- end
828
-
829
- @minimum_around_radius = minimum_around_radius
830
- end
831
-
832
- # Custom attribute writer method with validation
833
- # @param [Object] personalization_impact Value to be assigned
834
- def personalization_impact=(personalization_impact)
835
- if personalization_impact.nil?
836
- raise ArgumentError, "personalization_impact cannot be nil"
837
- end
838
-
839
- if personalization_impact > 100
840
- raise ArgumentError, "invalid value for \"personalization_impact\", must be smaller than or equal to 100."
841
- end
842
-
843
- if personalization_impact < 0
844
- raise ArgumentError, "invalid value for \"personalization_impact\", must be greater than or equal to 0."
845
- end
846
-
847
- @personalization_impact = personalization_impact
848
- end
849
-
850
- # Custom attribute writer method with validation
851
- # @param [Object] hits_per_page Value to be assigned
852
- def hits_per_page=(hits_per_page)
853
- if hits_per_page.nil?
854
- raise ArgumentError, "hits_per_page cannot be nil"
855
- end
856
-
857
- if hits_per_page > 1000
858
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
859
- end
860
-
861
- if hits_per_page < 1
862
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
863
- end
864
-
865
- @hits_per_page = hits_per_page
866
- end
867
-
868
- # Custom attribute writer method with validation
869
- # @param [Object] min_proximity Value to be assigned
870
- def min_proximity=(min_proximity)
871
- if min_proximity.nil?
872
- raise ArgumentError, "min_proximity cannot be nil"
873
- end
874
-
875
- if min_proximity > 7
876
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
877
- end
878
-
879
- if min_proximity < 1
880
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
881
- end
882
-
883
- @min_proximity = min_proximity
884
- end
885
-
886
- # Custom attribute writer method with validation
887
- # @param [Object] max_facet_hits Value to be assigned
888
- def max_facet_hits=(max_facet_hits)
889
- if max_facet_hits.nil?
890
- raise ArgumentError, "max_facet_hits cannot be nil"
891
- end
892
-
893
- if max_facet_hits > 100
894
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
895
- end
896
-
897
- @max_facet_hits = max_facet_hits
898
- end
899
-
900
- # Custom attribute writer method with validation
901
- # @param [Object] max_values_per_facet Value to be assigned
902
- def max_values_per_facet=(max_values_per_facet)
903
- if max_values_per_facet.nil?
904
- raise ArgumentError, "max_values_per_facet cannot be nil"
905
- end
906
-
907
- if max_values_per_facet > 1000
908
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
909
- end
910
-
911
- @max_values_per_facet = max_values_per_facet
912
- end
913
-
914
786
  # Checks equality by comparing each attribute.
915
787
  # @param [Object] Object to be compared
916
788
  def ==(other)
@@ -113,6 +113,8 @@ module Algolia
113
113
 
114
114
  if attributes.key?(:value)
115
115
  self.value = attributes[:value]
116
+ else
117
+ self.value = nil
116
118
  end
117
119
 
118
120
  if attributes.key?(:created_at)
@@ -62,8 +62,6 @@ module Algolia
62
62
  if (value = attributes[:results]).is_a?(Array)
63
63
  self.results = value
64
64
  end
65
- else
66
- self.results = nil
67
65
  end
68
66
  end
69
67
 
@@ -19,7 +19,7 @@ module Algolia
19
19
  # Attributes that can't be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don't want to include it in the search results. Attribute names are case-sensitive.
20
20
  attr_accessor :unretrievable_attributes
21
21
 
22
- # Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
22
+ # Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
23
23
  attr_accessor :disable_typo_tolerance_on_words
24
24
 
25
25
  # Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
@@ -43,7 +43,7 @@ module Algolia
43
43
  # Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn't exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
44
44
  attr_accessor :numeric_attributes_for_filtering
45
45
 
46
- # Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren't indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
46
+ # Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
47
47
  attr_accessor :separators_to_index
48
48
 
49
49
  # Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
@@ -143,7 +143,7 @@ module Algolia
143
143
 
144
144
  attr_accessor :exact_on_single_word_query
145
145
 
146
- # 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.
146
+ # 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.
147
147
  attr_accessor :alternatives_as_exact
148
148
 
149
149
  # 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.
@@ -647,84 +647,6 @@ module Algolia
647
647
  end
648
648
  end
649
649
 
650
- # Custom attribute writer method with validation
651
- # @param [Object] pagination_limited_to Value to be assigned
652
- def pagination_limited_to=(pagination_limited_to)
653
- if pagination_limited_to.nil?
654
- raise ArgumentError, "pagination_limited_to cannot be nil"
655
- end
656
-
657
- if pagination_limited_to > 20000
658
- raise ArgumentError, "invalid value for \"pagination_limited_to\", must be smaller than or equal to 20000."
659
- end
660
-
661
- @pagination_limited_to = pagination_limited_to
662
- end
663
-
664
- # Custom attribute writer method with validation
665
- # @param [Object] hits_per_page Value to be assigned
666
- def hits_per_page=(hits_per_page)
667
- if hits_per_page.nil?
668
- raise ArgumentError, "hits_per_page cannot be nil"
669
- end
670
-
671
- if hits_per_page > 1000
672
- raise ArgumentError, "invalid value for \"hits_per_page\", must be smaller than or equal to 1000."
673
- end
674
-
675
- if hits_per_page < 1
676
- raise ArgumentError, "invalid value for \"hits_per_page\", must be greater than or equal to 1."
677
- end
678
-
679
- @hits_per_page = hits_per_page
680
- end
681
-
682
- # Custom attribute writer method with validation
683
- # @param [Object] min_proximity Value to be assigned
684
- def min_proximity=(min_proximity)
685
- if min_proximity.nil?
686
- raise ArgumentError, "min_proximity cannot be nil"
687
- end
688
-
689
- if min_proximity > 7
690
- raise ArgumentError, "invalid value for \"min_proximity\", must be smaller than or equal to 7."
691
- end
692
-
693
- if min_proximity < 1
694
- raise ArgumentError, "invalid value for \"min_proximity\", must be greater than or equal to 1."
695
- end
696
-
697
- @min_proximity = min_proximity
698
- end
699
-
700
- # Custom attribute writer method with validation
701
- # @param [Object] max_facet_hits Value to be assigned
702
- def max_facet_hits=(max_facet_hits)
703
- if max_facet_hits.nil?
704
- raise ArgumentError, "max_facet_hits cannot be nil"
705
- end
706
-
707
- if max_facet_hits > 100
708
- raise ArgumentError, "invalid value for \"max_facet_hits\", must be smaller than or equal to 100."
709
- end
710
-
711
- @max_facet_hits = max_facet_hits
712
- end
713
-
714
- # Custom attribute writer method with validation
715
- # @param [Object] max_values_per_facet Value to be assigned
716
- def max_values_per_facet=(max_values_per_facet)
717
- if max_values_per_facet.nil?
718
- raise ArgumentError, "max_values_per_facet cannot be nil"
719
- end
720
-
721
- if max_values_per_facet > 1000
722
- raise ArgumentError, "invalid value for \"max_values_per_facet\", must be smaller than or equal to 1000."
723
- end
724
-
725
- @max_values_per_facet = max_values_per_facet
726
- end
727
-
728
650
  # Checks equality by comparing each attribute.
729
651
  # @param [Object] Object to be compared
730
652
  def ==(other)
@@ -210,40 +210,6 @@ module Algolia
210
210
  end
211
211
  end
212
212
 
213
- # Custom attribute writer method with validation
214
- # @param [Object] query_body Value to be assigned
215
- def query_body=(query_body)
216
- if query_body.nil?
217
- raise ArgumentError, "query_body cannot be nil"
218
- end
219
-
220
- if query_body.to_s.length > 1000
221
- raise(
222
- ArgumentError,
223
- "invalid value for \"query_body\", the character length must be smaller than or equal to 1000."
224
- )
225
- end
226
-
227
- @query_body = query_body
228
- end
229
-
230
- # Custom attribute writer method with validation
231
- # @param [Object] answer Value to be assigned
232
- def answer=(answer)
233
- if answer.nil?
234
- raise ArgumentError, "answer cannot be nil"
235
- end
236
-
237
- if answer.to_s.length > 1000
238
- raise(
239
- ArgumentError,
240
- "invalid value for \"answer\", the character length must be smaller than or equal to 1000."
241
- )
242
- end
243
-
244
- @answer = answer
245
- end
246
-
247
213
  # Checks equality by comparing each attribute.
248
214
  # @param [Object] Object to be compared
249
215
  def ==(other)
@@ -79,20 +79,6 @@ module Algolia
79
79
  end
80
80
  end
81
81
 
82
- # Custom attribute writer method with validation
83
- # @param [Object] object_ids Value to be assigned
84
- def object_ids=(object_ids)
85
- if object_ids.nil?
86
- raise ArgumentError, "object_ids cannot be nil"
87
- end
88
-
89
- if object_ids.length > 100
90
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 100."
91
- end
92
-
93
- @object_ids = object_ids
94
- end
95
-
96
82
  # Checks equality by comparing each attribute.
97
83
  # @param [Object] Object to be compared
98
84
  def ==(other)
@@ -180,118 +180,6 @@ module Algolia
180
180
  end
181
181
  end
182
182
 
183
- # Custom attribute writer method with validation
184
- # @param [Object] filters Value to be assigned
185
- def filters=(filters)
186
- if filters.nil?
187
- raise ArgumentError, "filters cannot be nil"
188
- end
189
-
190
- if filters < 0
191
- raise ArgumentError, "invalid value for \"filters\", must be greater than or equal to 0."
192
- end
193
-
194
- @filters = filters
195
- end
196
-
197
- # Custom attribute writer method with validation
198
- # @param [Object] first_matched_word Value to be assigned
199
- def first_matched_word=(first_matched_word)
200
- if first_matched_word.nil?
201
- raise ArgumentError, "first_matched_word cannot be nil"
202
- end
203
-
204
- if first_matched_word < 0
205
- raise ArgumentError, "invalid value for \"first_matched_word\", must be greater than or equal to 0."
206
- end
207
-
208
- @first_matched_word = first_matched_word
209
- end
210
-
211
- # Custom attribute writer method with validation
212
- # @param [Object] geo_distance Value to be assigned
213
- def geo_distance=(geo_distance)
214
- if geo_distance.nil?
215
- raise ArgumentError, "geo_distance cannot be nil"
216
- end
217
-
218
- if geo_distance < 0
219
- raise ArgumentError, "invalid value for \"geo_distance\", must be greater than or equal to 0."
220
- end
221
-
222
- @geo_distance = geo_distance
223
- end
224
-
225
- # Custom attribute writer method with validation
226
- # @param [Object] geo_precision Value to be assigned
227
- def geo_precision=(geo_precision)
228
- if geo_precision.nil?
229
- raise ArgumentError, "geo_precision cannot be nil"
230
- end
231
-
232
- if geo_precision < 1
233
- raise ArgumentError, "invalid value for \"geo_precision\", must be greater than or equal to 1."
234
- end
235
-
236
- @geo_precision = geo_precision
237
- end
238
-
239
- # Custom attribute writer method with validation
240
- # @param [Object] nb_exact_words Value to be assigned
241
- def nb_exact_words=(nb_exact_words)
242
- if nb_exact_words.nil?
243
- raise ArgumentError, "nb_exact_words cannot be nil"
244
- end
245
-
246
- if nb_exact_words < 0
247
- raise ArgumentError, "invalid value for \"nb_exact_words\", must be greater than or equal to 0."
248
- end
249
-
250
- @nb_exact_words = nb_exact_words
251
- end
252
-
253
- # Custom attribute writer method with validation
254
- # @param [Object] nb_typos Value to be assigned
255
- def nb_typos=(nb_typos)
256
- if nb_typos.nil?
257
- raise ArgumentError, "nb_typos cannot be nil"
258
- end
259
-
260
- if nb_typos < 0
261
- raise ArgumentError, "invalid value for \"nb_typos\", must be greater than or equal to 0."
262
- end
263
-
264
- @nb_typos = nb_typos
265
- end
266
-
267
- # Custom attribute writer method with validation
268
- # @param [Object] proximity_distance Value to be assigned
269
- def proximity_distance=(proximity_distance)
270
- if proximity_distance.nil?
271
- raise ArgumentError, "proximity_distance cannot be nil"
272
- end
273
-
274
- if proximity_distance < 0
275
- raise ArgumentError, "invalid value for \"proximity_distance\", must be greater than or equal to 0."
276
- end
277
-
278
- @proximity_distance = proximity_distance
279
- end
280
-
281
- # Custom attribute writer method with validation
282
- # @param [Object] words Value to be assigned
283
- def words=(words)
284
- if words.nil?
285
- raise ArgumentError, "words cannot be nil"
286
- end
287
-
288
- if words < 1
289
- raise ArgumentError, "invalid value for \"words\", must be greater than or equal to 1."
290
- end
291
-
292
- @words = words
293
- end
294
-
295
183
  # Checks equality by comparing each attribute.
296
184
  # @param [Object] Object to be compared
297
185
  def ==(other)
@@ -111,24 +111,6 @@ module Algolia
111
111
  end
112
112
  end
113
113
 
114
- # Custom attribute writer method with validation
115
- # @param [Object] conditions Value to be assigned
116
- def conditions=(conditions)
117
- if conditions.nil?
118
- raise ArgumentError, "conditions cannot be nil"
119
- end
120
-
121
- if conditions.length > 25
122
- raise ArgumentError, "invalid value for \"conditions\", number of items must be less than or equal to 25."
123
- end
124
-
125
- if conditions.length < 0
126
- raise ArgumentError, "invalid value for \"conditions\", number of items must be greater than or equal to 0."
127
- end
128
-
129
- @conditions = conditions
130
- end
131
-
132
114
  # Checks equality by comparing each attribute.
133
115
  # @param [Object] Object to be compared
134
116
  def ==(other)
@@ -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)
@@ -9,7 +9,7 @@ module Algolia
9
9
  # Dictionary entries matching the search criteria.
10
10
  attr_accessor :hits
11
11
 
12
- # Requested page of the API response.
12
+ # 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.
13
13
  attr_accessor :page
14
14
 
15
15
  # Number of results (hits).
@@ -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)