algolia 3.4.0 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/abtesting_client.rb +0 -7
- data/lib/algolia/api/analytics_client.rb +32 -88
- data/lib/algolia/api/ingestion_client.rb +2 -170
- data/lib/algolia/api/insights_client.rb +0 -22
- data/lib/algolia/api/monitoring_client.rb +11 -11
- data/lib/algolia/api/search_client.rb +19 -74
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +0 -18
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +0 -18
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -18
- data/lib/algolia/models/abtesting/schedule_ab_tests_request.rb +0 -18
- data/lib/algolia/models/abtesting/variant.rb +0 -18
- data/lib/algolia/models/analytics/click_position.rb +0 -32
- data/lib/algolia/models/analytics/daily_add_to_cart_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_average_clicks.rb +0 -24
- data/lib/algolia/models/analytics/daily_click_through_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_conversion_rates.rb +0 -28
- data/lib/algolia/models/analytics/daily_no_click_rates.rb +0 -32
- data/lib/algolia/models/analytics/daily_no_results_rates.rb +0 -18
- data/lib/algolia/models/analytics/daily_purchase_rates.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_clicks.rb +0 -14
- data/lib/algolia/models/analytics/daily_searches_no_results.rb +0 -14
- data/lib/algolia/models/analytics/get_add_to_cart_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +0 -24
- data/lib/algolia/models/analytics/get_click_positions_response.rb +0 -18
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_conversion_rate_response.rb +0 -28
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +0 -32
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +0 -18
- data/lib/algolia/models/analytics/get_purchase_rate_response.rb +0 -14
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +0 -56
- data/lib/algolia/models/analytics/top_hit_with_revenue_analytics.rb +0 -98
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +0 -90
- data/lib/algolia/models/analytics/top_search_with_revenue_analytics.rb +0 -132
- data/lib/algolia/models/ingestion/event.rb +0 -14
- data/lib/algolia/models/ingestion/pagination.rb +0 -60
- data/lib/algolia/models/ingestion/run.rb +0 -18
- data/lib/algolia/models/ingestion/source_csv.rb +0 -21
- data/lib/algolia/models/ingestion/task.rb +0 -18
- data/lib/algolia/models/ingestion/task_create.rb +0 -18
- data/lib/algolia/models/ingestion/task_create_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_update.rb +0 -18
- data/lib/algolia/models/ingestion/task_update_v1.rb +0 -18
- data/lib/algolia/models/ingestion/task_v1.rb +0 -18
- data/lib/algolia/models/ingestion/transformation.rb +1 -1
- data/lib/algolia/models/ingestion/transformation_create.rb +1 -1
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -123
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/clicked_filters.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids.rb +0 -105
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -149
- data/lib/algolia/models/insights/converted_filters.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids.rb +0 -105
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -131
- data/lib/algolia/models/insights/insights_events.rb +0 -18
- data/lib/algolia/models/insights/object_data_after_search.rb +0 -26
- data/lib/algolia/models/insights/purchased_object_ids.rb +0 -123
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -123
- data/lib/algolia/models/insights/viewed_filters.rb +0 -105
- data/lib/algolia/models/insights/viewed_object_ids.rb +0 -105
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +0 -18
- data/lib/algolia/models/query-suggestions/configuration.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_response.rb +0 -17
- data/lib/algolia/models/query-suggestions/configuration_with_index.rb +0 -17
- data/lib/algolia/models/query-suggestions/source_index.rb +0 -28
- data/lib/algolia/models/recommend/banner.rb +218 -0
- data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_response.rb → recommend/banner_image.rb} +31 -38
- data/lib/algolia/models/{query-suggestions/base_query_suggestions_configuration_with_index.rb → recommend/banner_image_url.rb} +23 -23
- data/lib/algolia/models/{query-suggestions/get_config_status200_response.rb → recommend/banner_link.rb} +13 -53
- data/lib/algolia/models/recommend/bought_together_query.rb +0 -36
- data/lib/algolia/models/recommend/condition.rb +0 -15
- data/lib/algolia/models/recommend/consequence.rb +0 -28
- data/lib/algolia/models/recommend/fallback_params.rb +8 -100
- data/lib/algolia/models/recommend/looking_similar_query.rb +0 -36
- data/lib/algolia/models/recommend/numeric_filters.rb +1 -1
- data/lib/algolia/models/recommend/promote_consequence_object.rb +0 -14
- data/lib/algolia/models/recommend/ranking_info.rb +0 -112
- data/lib/algolia/models/recommend/recommend_hit.rb +0 -18
- data/lib/algolia/models/recommend/recommend_search_params.rb +8 -100
- data/lib/algolia/models/recommend/recommendations_results.rb +0 -61
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -36
- data/lib/algolia/models/recommend/related_query.rb +0 -36
- data/lib/algolia/models/recommend/rendering_content.rb +14 -5
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +0 -50
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +0 -14
- data/lib/algolia/models/recommend/trending_facet_hit.rb +0 -18
- data/lib/algolia/models/recommend/trending_facets_query.rb +0 -36
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -36
- data/lib/algolia/models/recommend/typo_tolerance.rb +1 -1
- data/lib/algolia/models/recommend/widgets.rb +212 -0
- data/lib/algolia/models/search/api_key.rb +1 -1
- data/lib/algolia/models/search/banner.rb +218 -0
- data/lib/algolia/models/{query-suggestions/get_log_file200_response.rb → search/banner_image.rb} +21 -61
- data/lib/algolia/models/search/banner_image_url.rb +212 -0
- data/lib/algolia/models/search/banner_link.rb +212 -0
- data/lib/algolia/models/search/browse_params_object.rb +4 -132
- data/lib/algolia/models/search/browse_response.rb +0 -61
- data/lib/algolia/models/search/condition.rb +0 -15
- data/lib/algolia/models/search/consequence.rb +0 -28
- data/lib/algolia/models/search/consequence_params.rb +4 -132
- data/lib/algolia/models/search/delete_by_params.rb +1 -1
- data/lib/algolia/models/search/get_api_key_response.rb +1 -1
- data/lib/algolia/models/search/index_settings.rb +7 -85
- data/lib/algolia/models/search/log.rb +0 -34
- data/lib/algolia/models/search/numeric_filters.rb +1 -1
- data/lib/algolia/models/search/promote_object_ids.rb +0 -14
- data/lib/algolia/models/search/ranking_info.rb +0 -112
- data/lib/algolia/models/search/rendering_content.rb +14 -5
- data/lib/algolia/models/search/rule.rb +0 -18
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -32
- data/lib/algolia/models/search/search_dictionary_entries_response.rb +0 -14
- data/lib/algolia/models/search/search_for_facet_values_request.rb +0 -14
- data/lib/algolia/models/search/search_for_facets.rb +4 -132
- data/lib/algolia/models/search/search_for_hits.rb +4 -132
- data/lib/algolia/models/search/search_params_object.rb +4 -132
- data/lib/algolia/models/search/search_response.rb +0 -61
- data/lib/algolia/models/search/search_rules_params.rb +0 -32
- data/lib/algolia/models/search/search_synonyms_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_params.rb +0 -32
- data/lib/algolia/models/search/search_user_ids_response.rb +0 -32
- data/lib/algolia/models/search/settings_response.rb +7 -85
- data/lib/algolia/models/search/typo_tolerance.rb +1 -1
- data/lib/algolia/models/search/user_hit.rb +0 -15
- data/lib/algolia/models/search/user_id.rb +0 -15
- data/lib/algolia/models/search/widgets.rb +212 -0
- data/lib/algolia/version.rb +1 -1
- metadata +12 -9
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +0 -276
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +0 -316
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +0 -295
@@ -105,34 +105,6 @@ module Algolia
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
# Custom attribute writer method with validation
|
109
|
-
# @param [Object] promote Value to be assigned
|
110
|
-
def promote=(promote)
|
111
|
-
if promote.nil?
|
112
|
-
raise ArgumentError, "promote cannot be nil"
|
113
|
-
end
|
114
|
-
|
115
|
-
if promote.length > 300
|
116
|
-
raise ArgumentError, "invalid value for \"promote\", number of items must be less than or equal to 300."
|
117
|
-
end
|
118
|
-
|
119
|
-
@promote = promote
|
120
|
-
end
|
121
|
-
|
122
|
-
# Custom attribute writer method with validation
|
123
|
-
# @param [Object] hide Value to be assigned
|
124
|
-
def hide=(hide)
|
125
|
-
if hide.nil?
|
126
|
-
raise ArgumentError, "hide cannot be nil"
|
127
|
-
end
|
128
|
-
|
129
|
-
if hide.length > 50
|
130
|
-
raise ArgumentError, "invalid value for \"hide\", number of items must be less than or equal to 50."
|
131
|
-
end
|
132
|
-
|
133
|
-
@hide = hide
|
134
|
-
end
|
135
|
-
|
136
108
|
# Checks equality by comparing each attribute.
|
137
109
|
# @param [Object] Object to be compared
|
138
110
|
def ==(other)
|
@@ -41,7 +41,7 @@ module Algolia
|
|
41
41
|
# Number of hits to retrieve (used in combination with `offset`).
|
42
42
|
attr_accessor :length
|
43
43
|
|
44
|
-
# 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`.
|
44
|
+
# 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`.
|
45
45
|
attr_accessor :around_lat_lng
|
46
46
|
|
47
47
|
# Whether to obtain the coordinates from the request's IP address.
|
@@ -170,10 +170,10 @@ module Algolia
|
|
170
170
|
# Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
171
171
|
attr_accessor :advanced_syntax
|
172
172
|
|
173
|
-
# 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
|
173
|
+
# 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).
|
174
174
|
attr_accessor :optional_words
|
175
175
|
|
176
|
-
# 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
|
176
|
+
# 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.
|
177
177
|
attr_accessor :disable_exact_on_attributes
|
178
178
|
|
179
179
|
attr_accessor :exact_on_single_word_query
|
@@ -186,7 +186,7 @@ module Algolia
|
|
186
186
|
|
187
187
|
attr_accessor :distinct
|
188
188
|
|
189
|
-
# 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
|
189
|
+
# 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.
|
190
190
|
attr_accessor :replace_synonyms_in_highlight
|
191
191
|
|
192
192
|
# 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.
|
@@ -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)
|
@@ -15,7 +15,7 @@ module Algolia
|
|
15
15
|
|
16
16
|
attr_accessor :tag_filters
|
17
17
|
|
18
|
-
# 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`.
|
18
|
+
# 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`.
|
19
19
|
attr_accessor :around_lat_lng
|
20
20
|
|
21
21
|
attr_accessor :around_radius
|
@@ -27,7 +27,7 @@ module Algolia
|
|
27
27
|
# Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there's no limit.
|
28
28
|
attr_accessor :max_queries_per_ip_per_hour
|
29
29
|
|
30
|
-
# Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address
|
30
|
+
# Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
|
31
31
|
attr_accessor :query_parameters
|
32
32
|
|
33
33
|
# Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don't rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
|
@@ -7,10 +7,10 @@ module Algolia
|
|
7
7
|
module Search
|
8
8
|
# Index settings.
|
9
9
|
class IndexSettings
|
10
|
-
# Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows
|
10
|
+
# Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn't evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
|
11
11
|
attr_accessor :attributes_for_faceting
|
12
12
|
|
13
|
-
# Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer
|
13
|
+
# Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you'll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don't increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
|
14
14
|
attr_accessor :replicas
|
15
15
|
|
16
16
|
# Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can't be guaranteed.
|
@@ -40,13 +40,13 @@ module Algolia
|
|
40
40
|
# Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
41
41
|
attr_accessor :allow_compression_of_integer_array
|
42
42
|
|
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.
|
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
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.
|
47
47
|
attr_accessor :separators_to_index
|
48
48
|
|
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 modifier, matches at the beginning of an attribute rank
|
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.
|
50
50
|
attr_accessor :searchable_attributes
|
51
51
|
|
52
52
|
# An object with custom data. You can store up to 32kB as custom data.
|
@@ -135,10 +135,10 @@ module Algolia
|
|
135
135
|
# Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
136
136
|
attr_accessor :advanced_syntax
|
137
137
|
|
138
|
-
# 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
|
138
|
+
# 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).
|
139
139
|
attr_accessor :optional_words
|
140
140
|
|
141
|
-
# 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
|
141
|
+
# 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.
|
142
142
|
attr_accessor :disable_exact_on_attributes
|
143
143
|
|
144
144
|
attr_accessor :exact_on_single_word_query
|
@@ -151,7 +151,7 @@ module Algolia
|
|
151
151
|
|
152
152
|
attr_accessor :distinct
|
153
153
|
|
154
|
-
# 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
|
154
|
+
# 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.
|
155
155
|
attr_accessor :replace_synonyms_in_highlight
|
156
156
|
|
157
157
|
# 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.
|
@@ -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)
|
@@ -5,7 +5,7 @@ require "time"
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
# Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`.
|
8
|
+
# Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
|
9
9
|
module NumericFilters
|
10
10
|
class << self
|
11
11
|
# List of class defined in oneOf (OpenAPI v3)
|
@@ -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)
|
@@ -5,17 +5,20 @@ require "time"
|
|
5
5
|
|
6
6
|
module Algolia
|
7
7
|
module Search
|
8
|
-
# Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as
|
8
|
+
# Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
|
9
9
|
class RenderingContent
|
10
10
|
attr_accessor :facet_ordering
|
11
11
|
|
12
12
|
attr_accessor :redirect
|
13
13
|
|
14
|
+
attr_accessor :widgets
|
15
|
+
|
14
16
|
# Attribute mapping from ruby-style variable name to JSON key.
|
15
17
|
def self.attribute_map
|
16
18
|
{
|
17
19
|
:facet_ordering => :facetOrdering,
|
18
|
-
:redirect => :redirect
|
20
|
+
:redirect => :redirect,
|
21
|
+
:widgets => :widgets
|
19
22
|
}
|
20
23
|
end
|
21
24
|
|
@@ -28,7 +31,8 @@ module Algolia
|
|
28
31
|
def self.types_mapping
|
29
32
|
{
|
30
33
|
:facet_ordering => :"FacetOrdering",
|
31
|
-
:redirect => :"RedirectURL"
|
34
|
+
:redirect => :"RedirectURL",
|
35
|
+
:widgets => :"Widgets"
|
32
36
|
}
|
33
37
|
end
|
34
38
|
|
@@ -69,6 +73,10 @@ module Algolia
|
|
69
73
|
if attributes.key?(:redirect)
|
70
74
|
self.redirect = attributes[:redirect]
|
71
75
|
end
|
76
|
+
|
77
|
+
if attributes.key?(:widgets)
|
78
|
+
self.widgets = attributes[:widgets]
|
79
|
+
end
|
72
80
|
end
|
73
81
|
|
74
82
|
# Checks equality by comparing each attribute.
|
@@ -77,7 +85,8 @@ module Algolia
|
|
77
85
|
return true if self.equal?(other)
|
78
86
|
self.class == other.class &&
|
79
87
|
facet_ordering == other.facet_ordering &&
|
80
|
-
redirect == other.redirect
|
88
|
+
redirect == other.redirect &&
|
89
|
+
widgets == other.widgets
|
81
90
|
end
|
82
91
|
|
83
92
|
# @see the `==` method
|
@@ -89,7 +98,7 @@ module Algolia
|
|
89
98
|
# Calculates hash code according to all attributes.
|
90
99
|
# @return [Integer] Hash code
|
91
100
|
def hash
|
92
|
-
[facet_ordering, redirect].hash
|
101
|
+
[facet_ordering, redirect, widgets].hash
|
93
102
|
end
|
94
103
|
|
95
104
|
# Builds the object from hash
|
@@ -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)
|