algolia 2.3.4 → 3.0.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -93
- data/Gemfile +1 -14
- data/Gemfile.lock +64 -0
- data/README.md +4 -6
- data/Rakefile +0 -39
- data/algolia.gemspec +24 -39
- data/lib/algolia/api/abtesting_client.rb +418 -0
- data/lib/algolia/api/analytics_client.rb +1294 -0
- data/lib/algolia/api/ingestion_client.rb +1659 -0
- data/lib/algolia/api/insights_client.rb +252 -0
- data/lib/algolia/api/monitoring_client.rb +555 -0
- data/lib/algolia/api/personalization_client.rb +365 -0
- data/lib/algolia/api/query_suggestions_client.rb +491 -0
- data/lib/algolia/api/recommend_client.rb +460 -0
- data/lib/algolia/api/search_client.rb +2723 -0
- data/lib/algolia/api_client.rb +153 -0
- data/lib/algolia/api_error.rb +48 -0
- data/lib/algolia/configuration.rb +41 -0
- data/lib/algolia/logger_helper.rb +1 -1
- data/lib/algolia/models/abtesting/ab_test.rb +332 -0
- data/lib/algolia/models/abtesting/ab_test_response.rb +219 -0
- data/lib/algolia/models/abtesting/ab_tests_variant.rb +217 -0
- data/lib/algolia/models/abtesting/ab_tests_variant_search_params.rb +236 -0
- data/lib/algolia/models/abtesting/add_ab_tests_request.rb +239 -0
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +96 -0
- data/lib/algolia/models/abtesting/currencies_value.rb +223 -0
- data/lib/algolia/models/abtesting/custom_search_params.rb +195 -0
- data/lib/algolia/models/abtesting/error_base.rb +196 -0
- data/lib/algolia/models/abtesting/filter_effects.rb +202 -0
- data/lib/algolia/models/abtesting/filter_effects_empty_search.rb +204 -0
- data/lib/algolia/models/abtesting/filter_effects_outliers.rb +204 -0
- data/lib/algolia/models/abtesting/list_ab_tests_response.rb +221 -0
- data/lib/algolia/models/abtesting/variant.rb +399 -0
- data/lib/algolia/models/analytics/average_click_event.rb +219 -0
- data/lib/algolia/models/analytics/click_position.rb +209 -0
- data/lib/algolia/models/analytics/click_through_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/conversion_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/direction.rb +33 -0
- data/lib/algolia/models/analytics/error_base.rb +196 -0
- data/lib/algolia/models/analytics/get_average_click_position_response.rb +221 -0
- data/lib/algolia/models/analytics/get_click_positions_response.rb +215 -0
- data/lib/algolia/models/analytics/get_click_through_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_conversation_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_no_click_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_no_results_rate_response.rb +251 -0
- data/lib/algolia/models/analytics/get_searches_count_response.rb +209 -0
- data/lib/algolia/models/analytics/get_searches_no_clicks_response.rb +197 -0
- data/lib/algolia/models/analytics/get_searches_no_results_response.rb +197 -0
- data/lib/algolia/models/analytics/get_status_response.rb +195 -0
- data/lib/algolia/models/analytics/get_top_countries_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filter_attribute.rb +207 -0
- data/lib/algolia/models/analytics/get_top_filter_attributes_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +231 -0
- data/lib/algolia/models/analytics/get_top_filter_for_attribute_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_response.rb +197 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +219 -0
- data/lib/algolia/models/analytics/get_top_filters_no_results_values.rb +209 -0
- data/lib/algolia/models/analytics/get_top_hits_response.rb +96 -0
- data/lib/algolia/models/analytics/get_top_searches_response.rb +96 -0
- data/lib/algolia/models/analytics/get_users_count_response.rb +209 -0
- data/lib/algolia/models/analytics/no_click_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/no_results_rate_event.rb +249 -0
- data/lib/algolia/models/analytics/order_by.rb +35 -0
- data/lib/algolia/models/analytics/search_event.rb +207 -0
- data/lib/algolia/models/analytics/search_no_click_event.rb +219 -0
- data/lib/algolia/models/analytics/search_no_result_event.rb +219 -0
- data/lib/algolia/models/analytics/top_country.rb +207 -0
- data/lib/algolia/models/analytics/top_hit.rb +207 -0
- data/lib/algolia/models/analytics/top_hit_with_analytics.rb +285 -0
- data/lib/algolia/models/analytics/top_hits_response.rb +197 -0
- data/lib/algolia/models/analytics/top_hits_response_with_analytics.rb +197 -0
- data/lib/algolia/models/analytics/top_search.rb +219 -0
- data/lib/algolia/models/analytics/top_search_with_analytics.rb +309 -0
- data/lib/algolia/models/analytics/top_searches_response.rb +197 -0
- data/lib/algolia/models/analytics/top_searches_response_with_analytics.rb +197 -0
- data/lib/algolia/models/analytics/user_with_date.rb +207 -0
- data/lib/algolia/models/ingestion/action_type.rb +34 -0
- data/lib/algolia/models/ingestion/auth_algolia.rb +207 -0
- data/lib/algolia/models/ingestion/auth_algolia_partial.rb +203 -0
- data/lib/algolia/models/ingestion/auth_api_key.rb +195 -0
- data/lib/algolia/models/ingestion/auth_api_key_partial.rb +193 -0
- data/lib/algolia/models/ingestion/auth_basic.rb +206 -0
- data/lib/algolia/models/ingestion/auth_basic_partial.rb +202 -0
- data/lib/algolia/models/ingestion/auth_google_service_account.rb +208 -0
- data/lib/algolia/models/ingestion/auth_google_service_account_partial.rb +204 -0
- data/lib/algolia/models/ingestion/auth_input.rb +99 -0
- data/lib/algolia/models/ingestion/auth_input_partial.rb +99 -0
- data/lib/algolia/models/ingestion/auth_o_auth.rb +220 -0
- data/lib/algolia/models/ingestion/auth_o_auth_partial.rb +214 -0
- data/lib/algolia/models/ingestion/authentication.rb +283 -0
- data/lib/algolia/models/ingestion/authentication_create.rb +249 -0
- data/lib/algolia/models/ingestion/authentication_create_response.rb +220 -0
- data/lib/algolia/models/ingestion/authentication_search.rb +197 -0
- data/lib/algolia/models/ingestion/authentication_sort_keys.rb +36 -0
- data/lib/algolia/models/ingestion/authentication_type.rb +36 -0
- data/lib/algolia/models/ingestion/authentication_update.rb +243 -0
- data/lib/algolia/models/ingestion/authentication_update_response.rb +220 -0
- data/lib/algolia/models/ingestion/big_commerce_channel.rb +207 -0
- data/lib/algolia/models/ingestion/big_commerce_metafield.rb +207 -0
- data/lib/algolia/models/ingestion/big_query_data_type.rb +33 -0
- data/lib/algolia/models/ingestion/delete_response.rb +195 -0
- data/lib/algolia/models/ingestion/destination.rb +283 -0
- data/lib/algolia/models/ingestion/destination_create.rb +250 -0
- data/lib/algolia/models/ingestion/destination_create_response.rb +220 -0
- data/lib/algolia/models/ingestion/destination_index_name.rb +238 -0
- data/lib/algolia/models/ingestion/destination_index_prefix.rb +195 -0
- data/lib/algolia/models/ingestion/destination_input.rb +96 -0
- data/lib/algolia/models/ingestion/destination_search.rb +197 -0
- data/lib/algolia/models/ingestion/destination_sort_keys.rb +35 -0
- data/lib/algolia/models/ingestion/destination_type.rb +34 -0
- data/lib/algolia/models/ingestion/destination_update.rb +243 -0
- data/lib/algolia/models/ingestion/destination_update_response.rb +220 -0
- data/lib/algolia/models/ingestion/docker_image_type.rb +34 -0
- data/lib/algolia/models/ingestion/docker_registry.rb +33 -0
- data/lib/algolia/models/ingestion/docker_source_discover.rb +207 -0
- data/lib/algolia/models/ingestion/docker_source_streams.rb +196 -0
- data/lib/algolia/models/ingestion/error_base.rb +196 -0
- data/lib/algolia/models/ingestion/event.rb +311 -0
- data/lib/algolia/models/ingestion/event_sort_keys.rb +34 -0
- data/lib/algolia/models/ingestion/event_status.rb +37 -0
- data/lib/algolia/models/ingestion/event_type.rb +35 -0
- data/lib/algolia/models/ingestion/list_authentications_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_destinations_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_events_response.rb +218 -0
- data/lib/algolia/models/ingestion/list_sources_response.rb +207 -0
- data/lib/algolia/models/ingestion/list_tasks_response.rb +208 -0
- data/lib/algolia/models/ingestion/mapping_type_csv.rb +36 -0
- data/lib/algolia/models/ingestion/method_type.rb +33 -0
- data/lib/algolia/models/ingestion/on_demand_date_utils_input.rb +208 -0
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +227 -0
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +217 -0
- data/lib/algolia/models/ingestion/on_demand_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/order_keys.rb +33 -0
- data/lib/algolia/models/ingestion/pagination.rb +227 -0
- data/lib/algolia/models/ingestion/platform.rb +33 -0
- data/lib/algolia/models/ingestion/platform_none.rb +32 -0
- data/lib/algolia/models/ingestion/platform_with_none.rb +96 -0
- data/lib/algolia/models/ingestion/record_type.rb +33 -0
- data/lib/algolia/models/ingestion/run.rb +359 -0
- data/lib/algolia/models/ingestion/run_list_response.rb +218 -0
- data/lib/algolia/models/ingestion/run_outcome.rb +34 -0
- data/lib/algolia/models/ingestion/run_progress.rb +201 -0
- data/lib/algolia/models/ingestion/run_reason_code.rb +38 -0
- data/lib/algolia/models/ingestion/run_response.rb +208 -0
- data/lib/algolia/models/ingestion/run_sort_keys.rb +34 -0
- data/lib/algolia/models/ingestion/run_status.rb +36 -0
- data/lib/algolia/models/ingestion/run_type.rb +34 -0
- data/lib/algolia/models/ingestion/schedule_date_utils_input.rb +214 -0
- data/lib/algolia/models/ingestion/schedule_trigger.rb +251 -0
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +229 -0
- data/lib/algolia/models/ingestion/schedule_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/source.rb +282 -0
- data/lib/algolia/models/ingestion/source_big_commerce.rb +235 -0
- data/lib/algolia/models/ingestion/source_big_query.rb +278 -0
- data/lib/algolia/models/ingestion/source_commercetools.rb +238 -0
- data/lib/algolia/models/ingestion/source_create.rb +248 -0
- data/lib/algolia/models/ingestion/source_create_response.rb +218 -0
- data/lib/algolia/models/ingestion/source_csv.rb +276 -0
- data/lib/algolia/models/ingestion/source_docker.rb +261 -0
- data/lib/algolia/models/ingestion/source_input.rb +100 -0
- data/lib/algolia/models/ingestion/source_json.rb +236 -0
- data/lib/algolia/models/ingestion/source_search.rb +196 -0
- data/lib/algolia/models/ingestion/source_sort_keys.rb +35 -0
- data/lib/algolia/models/ingestion/source_type.rb +37 -0
- data/lib/algolia/models/ingestion/source_update.rb +211 -0
- data/lib/algolia/models/ingestion/source_update_commercetools.rb +207 -0
- data/lib/algolia/models/ingestion/source_update_docker.rb +246 -0
- data/lib/algolia/models/ingestion/source_update_input.rb +99 -0
- data/lib/algolia/models/ingestion/source_update_response.rb +218 -0
- data/lib/algolia/models/ingestion/subscription_trigger.rb +217 -0
- data/lib/algolia/models/ingestion/subscription_trigger_type.rb +32 -0
- data/lib/algolia/models/ingestion/task.rb +334 -0
- data/lib/algolia/models/ingestion/task_create.rb +299 -0
- data/lib/algolia/models/ingestion/task_create_response.rb +208 -0
- data/lib/algolia/models/ingestion/task_create_trigger.rb +97 -0
- data/lib/algolia/models/ingestion/task_input.rb +96 -0
- data/lib/algolia/models/ingestion/task_search.rb +196 -0
- data/lib/algolia/models/ingestion/task_sort_keys.rb +36 -0
- data/lib/algolia/models/ingestion/task_update.rb +250 -0
- data/lib/algolia/models/ingestion/task_update_response.rb +208 -0
- data/lib/algolia/models/ingestion/trigger.rb +97 -0
- data/lib/algolia/models/ingestion/trigger_type.rb +34 -0
- data/lib/algolia/models/ingestion/trigger_update_input.rb +196 -0
- data/lib/algolia/models/ingestion/window.rb +208 -0
- data/lib/algolia/models/insights/add_to_cart_event.rb +32 -0
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +384 -0
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +419 -0
- data/lib/algolia/models/insights/click_event.rb +32 -0
- data/lib/algolia/models/insights/clicked_filters.rb +351 -0
- data/lib/algolia/models/insights/clicked_object_ids.rb +341 -0
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +418 -0
- data/lib/algolia/models/insights/conversion_event.rb +32 -0
- data/lib/algolia/models/insights/converted_filters.rb +350 -0
- data/lib/algolia/models/insights/converted_object_ids.rb +351 -0
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +386 -0
- data/lib/algolia/models/insights/discount.rb +97 -0
- data/lib/algolia/models/insights/error_base.rb +196 -0
- data/lib/algolia/models/insights/events_items.rb +106 -0
- data/lib/algolia/models/insights/events_response.rb +204 -0
- data/lib/algolia/models/insights/insights_events.rb +215 -0
- data/lib/algolia/models/insights/object_data.rb +211 -0
- data/lib/algolia/models/insights/object_data_after_search.rb +221 -0
- data/lib/algolia/models/insights/price.rb +97 -0
- data/lib/algolia/models/insights/purchase_event.rb +32 -0
- data/lib/algolia/models/insights/purchased_object_ids.rb +384 -0
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +419 -0
- data/lib/algolia/models/insights/view_event.rb +32 -0
- data/lib/algolia/models/insights/viewed_filters.rb +351 -0
- data/lib/algolia/models/insights/viewed_object_ids.rb +351 -0
- data/lib/algolia/models/monitoring/error_base.rb +196 -0
- data/lib/algolia/models/monitoring/get_inventory403_response.rb +192 -0
- data/lib/algolia/models/monitoring/incident.rb +225 -0
- data/lib/algolia/models/monitoring/incidents_inner.rb +202 -0
- data/lib/algolia/models/monitoring/incidents_response.rb +194 -0
- data/lib/algolia/models/monitoring/indexing_time_response.rb +192 -0
- data/lib/algolia/models/monitoring/indexing_time_response_metrics.rb +194 -0
- data/lib/algolia/models/monitoring/infrastructure_response.rb +192 -0
- data/lib/algolia/models/monitoring/infrastructure_response_metrics.rb +243 -0
- data/lib/algolia/models/monitoring/inventory_response.rb +194 -0
- data/lib/algolia/models/monitoring/latency_response.rb +192 -0
- data/lib/algolia/models/monitoring/latency_response_metrics.rb +194 -0
- data/lib/algolia/models/monitoring/metric.rb +37 -0
- data/lib/algolia/models/monitoring/period.rb +36 -0
- data/lib/algolia/models/monitoring/probes_metric.rb +203 -0
- data/lib/algolia/models/monitoring/region.rb +46 -0
- data/lib/algolia/models/monitoring/server.rb +272 -0
- data/lib/algolia/models/monitoring/server_status.rb +32 -0
- data/lib/algolia/models/monitoring/status.rb +35 -0
- data/lib/algolia/models/monitoring/status_response.rb +194 -0
- data/lib/algolia/models/monitoring/time_inner.rb +203 -0
- data/lib/algolia/models/monitoring/type.rb +32 -0
- data/lib/algolia/models/personalization/delete_user_profile_response.rb +207 -0
- data/lib/algolia/models/personalization/error_base.rb +196 -0
- data/lib/algolia/models/personalization/event_scoring.rb +219 -0
- data/lib/algolia/models/personalization/facet_scoring.rb +207 -0
- data/lib/algolia/models/personalization/get_user_token_response.rb +219 -0
- data/lib/algolia/models/personalization/personalization_strategy_params.rb +223 -0
- data/lib/algolia/models/personalization/set_personalization_strategy_response.rb +195 -0
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_response.rb +223 -0
- data/lib/algolia/models/query-suggestions/base_query_suggestions_configuration_with_index.rb +195 -0
- data/lib/algolia/models/query-suggestions/base_response.rb +203 -0
- data/lib/algolia/models/query-suggestions/error_base.rb +196 -0
- data/lib/algolia/models/query-suggestions/facet.rb +204 -0
- data/lib/algolia/models/query-suggestions/get_config_status200_response.rb +233 -0
- data/lib/algolia/models/query-suggestions/get_log_file200_response.rb +244 -0
- data/lib/algolia/models/query-suggestions/languages.rb +97 -0
- data/lib/algolia/models/query-suggestions/log_level.rb +34 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration.rb +255 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_response.rb +315 -0
- data/lib/algolia/models/query-suggestions/query_suggestions_configuration_with_index.rb +275 -0
- data/lib/algolia/models/query-suggestions/source_index.rb +305 -0
- data/lib/algolia/models/recommend/advanced_syntax_features.rb +33 -0
- data/lib/algolia/models/recommend/alternatives_as_exact.rb +34 -0
- data/lib/algolia/models/recommend/anchoring.rb +35 -0
- data/lib/algolia/models/recommend/around_precision.rb +97 -0
- data/lib/algolia/models/recommend/around_precision_from_value_inner.rb +201 -0
- data/lib/algolia/models/recommend/around_radius.rb +97 -0
- data/lib/algolia/models/recommend/around_radius_all.rb +32 -0
- data/lib/algolia/models/recommend/automatic_facet_filter.rb +216 -0
- data/lib/algolia/models/recommend/automatic_facet_filters.rb +97 -0
- data/lib/algolia/models/recommend/base_recommend_request.rb +233 -0
- data/lib/algolia/models/recommend/base_recommendations_query.rb +246 -0
- data/lib/algolia/models/recommend/base_recommended_for_you_query.rb +234 -0
- data/lib/algolia/models/recommend/base_recommended_for_you_query_parameters.rb +195 -0
- data/lib/algolia/models/recommend/base_search_params.rb +564 -0
- data/lib/algolia/models/recommend/base_search_params_without_query.rb +546 -0
- data/lib/algolia/models/recommend/base_search_response.rb +517 -0
- data/lib/algolia/models/recommend/base_trending_facets_query.rb +226 -0
- data/lib/algolia/models/recommend/base_trending_items_query.rb +252 -0
- data/lib/algolia/models/recommend/condition.rb +244 -0
- data/lib/algolia/models/recommend/consequence.rb +239 -0
- data/lib/algolia/models/recommend/consequence_hide.rb +196 -0
- data/lib/algolia/models/recommend/consequence_params.rb +1121 -0
- data/lib/algolia/models/recommend/consequence_query.rb +97 -0
- data/lib/algolia/models/recommend/consequence_query_object.rb +207 -0
- data/lib/algolia/models/recommend/deleted_at_response.rb +208 -0
- data/lib/algolia/models/recommend/distinct.rb +97 -0
- data/lib/algolia/models/recommend/edit.rb +234 -0
- data/lib/algolia/models/recommend/edit_type.rb +33 -0
- data/lib/algolia/models/recommend/error_base.rb +196 -0
- data/lib/algolia/models/recommend/exact_on_single_word_query.rb +34 -0
- data/lib/algolia/models/recommend/exhaustive.rb +234 -0
- data/lib/algolia/models/recommend/facet_filters.rb +97 -0
- data/lib/algolia/models/recommend/facet_ordering.rb +205 -0
- data/lib/algolia/models/recommend/facets.rb +196 -0
- data/lib/algolia/models/recommend/facets_stats.rb +223 -0
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +216 -0
- data/lib/algolia/models/recommend/get_recommendations_params.rb +198 -0
- data/lib/algolia/models/recommend/get_recommendations_response.rb +194 -0
- data/lib/algolia/models/recommend/highlight_result.rb +96 -0
- data/lib/algolia/models/recommend/highlight_result_option.rb +253 -0
- data/lib/algolia/models/recommend/ignore_plurals.rb +97 -0
- data/lib/algolia/models/recommend/index_settings_as_search_params.rb +723 -0
- data/lib/algolia/models/recommend/match_level.rb +34 -0
- data/lib/algolia/models/recommend/matched_geo_location.rb +213 -0
- data/lib/algolia/models/recommend/mixed_search_filters.rb +96 -0
- data/lib/algolia/models/recommend/mode.rb +33 -0
- data/lib/algolia/models/recommend/numeric_filters.rb +97 -0
- data/lib/algolia/models/recommend/optional_filters.rb +97 -0
- data/lib/algolia/models/recommend/params.rb +220 -0
- data/lib/algolia/models/recommend/personalization.rb +213 -0
- data/lib/algolia/models/recommend/promote.rb +96 -0
- data/lib/algolia/models/recommend/promote_object_id.rb +208 -0
- data/lib/algolia/models/recommend/promote_object_ids.rb +210 -0
- data/lib/algolia/models/recommend/query_type.rb +34 -0
- data/lib/algolia/models/recommend/ranking_info.rb +328 -0
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +97 -0
- data/lib/algolia/models/recommend/recommend_hit.rb +271 -0
- data/lib/algolia/models/recommend/recommend_models.rb +35 -0
- data/lib/algolia/models/recommend/recommendation_models.rb +33 -0
- data/lib/algolia/models/recommend/recommendations_hit.rb +96 -0
- data/lib/algolia/models/recommend/recommendations_hits.rb +216 -0
- data/lib/algolia/models/recommend/recommendations_query.rb +304 -0
- data/lib/algolia/models/recommend/recommendations_request.rb +98 -0
- data/lib/algolia/models/recommend/recommendations_results.rb +553 -0
- data/lib/algolia/models/recommend/recommended_for_you_model.rb +32 -0
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +292 -0
- data/lib/algolia/models/recommend/recommended_for_you_query_parameters.rb +1105 -0
- data/lib/algolia/models/recommend/redirect.rb +195 -0
- data/lib/algolia/models/recommend/redirect_rule_index_metadata.rb +242 -0
- data/lib/algolia/models/recommend/redirect_rule_index_metadata_data.rb +195 -0
- data/lib/algolia/models/recommend/remove_stop_words.rb +97 -0
- data/lib/algolia/models/recommend/remove_words_if_no_results.rb +35 -0
- data/lib/algolia/models/recommend/rendering_content.rb +193 -0
- data/lib/algolia/models/recommend/rule_response.rb +246 -0
- data/lib/algolia/models/recommend/rule_response_metadata.rb +193 -0
- data/lib/algolia/models/recommend/search_params_object.rb +1103 -0
- data/lib/algolia/models/recommend/search_params_query.rb +193 -0
- data/lib/algolia/models/recommend/search_recommend_rules_params.rb +268 -0
- data/lib/algolia/models/recommend/search_recommend_rules_response.rb +233 -0
- data/lib/algolia/models/recommend/semantic_search.rb +198 -0
- data/lib/algolia/models/recommend/snippet_result.rb +96 -0
- data/lib/algolia/models/recommend/snippet_result_option.rb +229 -0
- data/lib/algolia/models/recommend/sort_remaining_by.rb +34 -0
- data/lib/algolia/models/recommend/tag_filters.rb +97 -0
- data/lib/algolia/models/recommend/task_status.rb +33 -0
- data/lib/algolia/models/recommend/trending_facet_hit.rb +238 -0
- data/lib/algolia/models/recommend/trending_facets_model.rb +32 -0
- data/lib/algolia/models/recommend/trending_facets_query.rb +284 -0
- data/lib/algolia/models/recommend/trending_items_model.rb +32 -0
- data/lib/algolia/models/recommend/trending_items_query.rb +310 -0
- data/lib/algolia/models/recommend/typo_tolerance.rb +97 -0
- data/lib/algolia/models/recommend/typo_tolerance_enum.rb +33 -0
- data/lib/algolia/models/recommend/value.rb +226 -0
- data/lib/algolia/models/search/acl.rb +47 -0
- data/lib/algolia/models/search/action.rb +38 -0
- data/lib/algolia/models/search/add_api_key_response.rb +207 -0
- data/lib/algolia/models/search/advanced_syntax_features.rb +33 -0
- data/lib/algolia/models/search/alternatives_as_exact.rb +34 -0
- data/lib/algolia/models/search/anchoring.rb +35 -0
- data/lib/algolia/models/search/api_key.rb +272 -0
- data/lib/algolia/models/search/around_precision.rb +97 -0
- data/lib/algolia/models/search/around_precision_from_value_inner.rb +201 -0
- data/lib/algolia/models/search/around_radius.rb +97 -0
- data/lib/algolia/models/search/around_radius_all.rb +32 -0
- data/lib/algolia/models/search/assign_user_id_params.rb +196 -0
- data/lib/algolia/models/search/attribute_to_update.rb +96 -0
- data/lib/algolia/models/search/automatic_facet_filter.rb +216 -0
- data/lib/algolia/models/search/automatic_facet_filters.rb +97 -0
- data/lib/algolia/models/search/base_get_api_key_response.rb +205 -0
- data/lib/algolia/models/search/base_index_settings.rb +366 -0
- data/lib/algolia/models/search/base_search_params.rb +564 -0
- data/lib/algolia/models/search/base_search_params_without_query.rb +546 -0
- data/lib/algolia/models/search/base_search_response.rb +517 -0
- data/lib/algolia/models/search/batch_assign_user_ids_params.rb +210 -0
- data/lib/algolia/models/search/batch_dictionary_entries_params.rb +208 -0
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +227 -0
- data/lib/algolia/models/search/batch_params.rb +197 -0
- data/lib/algolia/models/search/batch_request.rb +228 -0
- data/lib/algolia/models/search/batch_response.rb +209 -0
- data/lib/algolia/models/search/batch_write_params.rb +197 -0
- data/lib/algolia/models/search/browse_params.rb +96 -0
- data/lib/algolia/models/search/browse_params_object.rb +1113 -0
- data/lib/algolia/models/search/browse_response.rb +568 -0
- data/lib/algolia/models/search/built_in_operation.rb +229 -0
- data/lib/algolia/models/search/built_in_operation_type.rb +38 -0
- data/lib/algolia/models/search/condition.rb +244 -0
- data/lib/algolia/models/search/consequence.rb +239 -0
- data/lib/algolia/models/search/consequence_hide.rb +196 -0
- data/lib/algolia/models/search/consequence_params.rb +1121 -0
- data/lib/algolia/models/search/consequence_query.rb +97 -0
- data/lib/algolia/models/search/consequence_query_object.rb +207 -0
- data/lib/algolia/models/search/created_at_response.rb +196 -0
- data/lib/algolia/models/search/cursor.rb +193 -0
- data/lib/algolia/models/search/delete_api_key_response.rb +195 -0
- data/lib/algolia/models/search/delete_by_params.rb +263 -0
- data/lib/algolia/models/search/delete_source_response.rb +195 -0
- data/lib/algolia/models/search/deleted_at_response.rb +208 -0
- data/lib/algolia/models/search/dictionary_action.rb +33 -0
- data/lib/algolia/models/search/dictionary_entry.rb +276 -0
- data/lib/algolia/models/search/dictionary_entry_state.rb +33 -0
- data/lib/algolia/models/search/dictionary_language.rb +194 -0
- data/lib/algolia/models/search/dictionary_settings_params.rb +195 -0
- data/lib/algolia/models/search/dictionary_type.rb +34 -0
- data/lib/algolia/models/search/distinct.rb +97 -0
- data/lib/algolia/models/search/edit.rb +234 -0
- data/lib/algolia/models/search/edit_type.rb +33 -0
- data/lib/algolia/models/search/error_base.rb +196 -0
- data/lib/algolia/models/search/exact_on_single_word_query.rb +34 -0
- data/lib/algolia/models/search/exhaustive.rb +234 -0
- data/lib/algolia/models/search/facet_filters.rb +97 -0
- data/lib/algolia/models/search/facet_hits.rb +219 -0
- data/lib/algolia/models/search/facet_ordering.rb +205 -0
- data/lib/algolia/models/search/facets.rb +196 -0
- data/lib/algolia/models/search/facets_stats.rb +223 -0
- data/lib/algolia/models/search/fetched_index.rb +313 -0
- data/lib/algolia/models/search/get_api_key_response.rb +301 -0
- data/lib/algolia/models/search/get_dictionary_settings_response.rb +194 -0
- data/lib/algolia/models/search/get_logs_response.rb +196 -0
- data/lib/algolia/models/search/get_objects_params.rb +197 -0
- data/lib/algolia/models/search/get_objects_request.rb +220 -0
- data/lib/algolia/models/search/get_objects_response.rb +197 -0
- data/lib/algolia/models/search/get_task_response.rb +216 -0
- data/lib/algolia/models/search/get_top_user_ids_response.rb +198 -0
- data/lib/algolia/models/search/has_pending_mappings_response.rb +207 -0
- data/lib/algolia/models/search/highlight_result.rb +96 -0
- data/lib/algolia/models/search/highlight_result_option.rb +253 -0
- data/lib/algolia/models/search/hit.rb +241 -0
- data/lib/algolia/models/search/ignore_plurals.rb +97 -0
- data/lib/algolia/models/search/index_settings.rb +912 -0
- data/lib/algolia/models/search/index_settings_as_search_params.rb +723 -0
- data/lib/algolia/models/search/languages.rb +221 -0
- data/lib/algolia/models/search/list_api_keys_response.rb +197 -0
- data/lib/algolia/models/search/list_clusters_response.rb +198 -0
- data/lib/algolia/models/search/list_indices_response.rb +207 -0
- data/lib/algolia/models/search/list_user_ids_response.rb +198 -0
- data/lib/algolia/models/search/log.rb +358 -0
- data/lib/algolia/models/search/log_query.rb +213 -0
- data/lib/algolia/models/search/log_type.rb +35 -0
- data/lib/algolia/models/search/match_level.rb +34 -0
- data/lib/algolia/models/search/matched_geo_location.rb +213 -0
- data/lib/algolia/models/search/mixed_search_filters.rb +96 -0
- data/lib/algolia/models/search/mode.rb +33 -0
- data/lib/algolia/models/search/multiple_batch_request.rb +240 -0
- data/lib/algolia/models/search/multiple_batch_response.rb +211 -0
- data/lib/algolia/models/search/numeric_filters.rb +97 -0
- data/lib/algolia/models/search/operation_index_params.rb +240 -0
- data/lib/algolia/models/search/operation_type.rb +33 -0
- data/lib/algolia/models/search/optional_filters.rb +97 -0
- data/lib/algolia/models/search/params.rb +220 -0
- data/lib/algolia/models/search/personalization.rb +213 -0
- data/lib/algolia/models/search/promote.rb +96 -0
- data/lib/algolia/models/search/promote_object_id.rb +208 -0
- data/lib/algolia/models/search/promote_object_ids.rb +210 -0
- data/lib/algolia/models/search/query_type.rb +34 -0
- data/lib/algolia/models/search/ranking_info.rb +328 -0
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +97 -0
- data/lib/algolia/models/search/redirect.rb +195 -0
- data/lib/algolia/models/search/redirect_rule_index_metadata.rb +242 -0
- data/lib/algolia/models/search/redirect_rule_index_metadata_data.rb +195 -0
- data/lib/algolia/models/search/remove_stop_words.rb +97 -0
- data/lib/algolia/models/search/remove_user_id_response.rb +195 -0
- data/lib/algolia/models/search/remove_words_if_no_results.rb +35 -0
- data/lib/algolia/models/search/rendering_content.rb +193 -0
- data/lib/algolia/models/search/replace_source_response.rb +195 -0
- data/lib/algolia/models/search/rule.rb +249 -0
- data/lib/algolia/models/search/save_object_response.rb +217 -0
- data/lib/algolia/models/search/save_synonym_response.rb +219 -0
- data/lib/algolia/models/search/scope_type.rb +34 -0
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +244 -0
- data/lib/algolia/models/search/search_for_facet_values_request.rb +227 -0
- data/lib/algolia/models/search/search_for_facet_values_response.rb +218 -0
- data/lib/algolia/models/search/search_for_facets.rb +1158 -0
- data/lib/algolia/models/search/search_for_facets_options.rb +274 -0
- data/lib/algolia/models/search/search_for_hits.rb +1134 -0
- data/lib/algolia/models/search/search_for_hits_options.rb +226 -0
- data/lib/algolia/models/search/search_hits.rb +223 -0
- data/lib/algolia/models/search/search_method_params.rb +227 -0
- data/lib/algolia/models/search/search_params.rb +96 -0
- data/lib/algolia/models/search/search_params_object.rb +1103 -0
- data/lib/algolia/models/search/search_params_query.rb +193 -0
- data/lib/algolia/models/search/search_params_string.rb +193 -0
- data/lib/algolia/models/search/search_query.rb +96 -0
- data/lib/algolia/models/search/search_response.rb +560 -0
- data/lib/algolia/models/search/search_responses.rb +196 -0
- data/lib/algolia/models/search/search_result.rb +96 -0
- data/lib/algolia/models/search/search_rules_params.rb +311 -0
- data/lib/algolia/models/search/search_rules_response.rb +233 -0
- data/lib/algolia/models/search/search_strategy.rb +33 -0
- data/lib/algolia/models/search/search_synonyms_params.rb +193 -0
- data/lib/algolia/models/search/search_synonyms_response.rb +212 -0
- data/lib/algolia/models/search/search_type_default.rb +32 -0
- data/lib/algolia/models/search/search_type_facet.rb +32 -0
- data/lib/algolia/models/search/search_user_ids_params.rb +244 -0
- data/lib/algolia/models/search/search_user_ids_response.rb +264 -0
- data/lib/algolia/models/search/semantic_search.rb +198 -0
- data/lib/algolia/models/search/snippet_result.rb +96 -0
- data/lib/algolia/models/search/snippet_result_option.rb +229 -0
- data/lib/algolia/models/search/sort_remaining_by.rb +34 -0
- data/lib/algolia/models/search/source.rb +206 -0
- data/lib/algolia/models/search/standard_entries.rb +224 -0
- data/lib/algolia/models/search/synonym_hit.rb +295 -0
- data/lib/algolia/models/search/synonym_type.rb +36 -0
- data/lib/algolia/models/search/tag_filters.rb +97 -0
- data/lib/algolia/models/search/task_status.rb +33 -0
- data/lib/algolia/models/search/time_range.rb +207 -0
- data/lib/algolia/models/search/typo_tolerance.rb +97 -0
- data/lib/algolia/models/search/typo_tolerance_enum.rb +33 -0
- data/lib/algolia/models/search/update_api_key_response.rb +207 -0
- data/lib/algolia/models/search/updated_at_response.rb +208 -0
- data/lib/algolia/models/search/updated_at_with_object_id_response.rb +214 -0
- data/lib/algolia/models/search/updated_rule_response.rb +219 -0
- data/lib/algolia/models/search/user_highlight_result.rb +205 -0
- data/lib/algolia/models/search/user_hit.rb +269 -0
- data/lib/algolia/models/search/user_id.rb +247 -0
- data/lib/algolia/models/search/value.rb +226 -0
- data/lib/algolia/transport/echo_requester.rb +10 -0
- data/lib/algolia/{http → transport/http}/http_requester.rb +24 -19
- data/lib/algolia/{http → transport/http}/response.rb +11 -1
- data/lib/algolia/transport/request_options.rb +19 -31
- data/lib/algolia/transport/retry_strategy.rb +5 -8
- data/lib/algolia/transport/stateful_host.rb +1 -2
- data/lib/algolia/transport/transport.rb +33 -73
- data/lib/algolia/user_agent.rb +4 -14
- data/lib/algolia/version.rb +3 -1
- data/lib/algolia.rb +23 -40
- metadata +522 -217
- data/.circleci/config.yml +0 -155
- data/.dockerignore +0 -38
- data/.github/ISSUE_TEMPLATE.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- data/.gitignore +0 -40
- data/.rubocop.yml +0 -189
- data/.rubocop_todo.yml +0 -14
- data/CODE_OF_CONDUCT.md +0 -74
- data/CONTRIBUTING.MD +0 -184
- data/DOCKER_README.MD +0 -89
- data/Dockerfile +0 -7
- data/LICENSE +0 -21
- data/SECURITY.md +0 -3
- data/Steepfile +0 -6
- data/bin/console +0 -21
- data/bin/setup +0 -8
- data/lib/algolia/account_client.rb +0 -65
- data/lib/algolia/analytics_client.rb +0 -105
- data/lib/algolia/config/analytics_config.rb +0 -20
- data/lib/algolia/config/base_config.rb +0 -43
- data/lib/algolia/config/insights_config.rb +0 -20
- data/lib/algolia/config/personalization_config.rb +0 -20
- data/lib/algolia/config/recommend_config.rb +0 -6
- data/lib/algolia/config/recommendation_config.rb +0 -7
- data/lib/algolia/config/search_config.rb +0 -40
- data/lib/algolia/defaults.rb +0 -35
- data/lib/algolia/helpers.rb +0 -134
- data/lib/algolia/insights_client.rb +0 -238
- data/lib/algolia/iterators/base_iterator.rb +0 -19
- data/lib/algolia/iterators/object_iterator.rb +0 -28
- data/lib/algolia/iterators/paginator_iterator.rb +0 -46
- data/lib/algolia/iterators/rule_iterator.rb +0 -9
- data/lib/algolia/iterators/synonym_iterator.rb +0 -9
- data/lib/algolia/personalization_client.rb +0 -60
- data/lib/algolia/recommend_client.rb +0 -134
- data/lib/algolia/recommendation_client.rb +0 -7
- data/lib/algolia/responses/add_api_key_response.rb +0 -38
- data/lib/algolia/responses/base_response.rb +0 -9
- data/lib/algolia/responses/delete_api_key_response.rb +0 -40
- data/lib/algolia/responses/dictionary_response.rb +0 -33
- data/lib/algolia/responses/indexing_response.rb +0 -28
- data/lib/algolia/responses/multiple_batch_indexing_response.rb +0 -29
- data/lib/algolia/responses/multiple_response.rb +0 -45
- data/lib/algolia/responses/restore_api_key_response.rb +0 -36
- data/lib/algolia/responses/update_api_key_response.rb +0 -39
- data/lib/algolia/search_client.rb +0 -791
- data/lib/algolia/search_index.rb +0 -1059
- data/renovate.json +0 -5
- data/sig/config/algolia_config.rbs +0 -24
- data/sig/config/analytics_config.rbs +0 -11
- data/sig/config/insights_config.rbs +0 -11
- data/sig/config/recommendation_config.rbs +0 -11
- data/sig/config/search_config.rbs +0 -11
- data/sig/enums/call_type.rbs +0 -5
- data/sig/helpers.rbs +0 -12
- data/sig/http/http_requester.rbs +0 -17
- data/sig/http/response.rbs +0 -14
- data/sig/interfaces/_connection.rbs +0 -16
- data/sig/iterators/base_iterator.rbs +0 -15
- data/sig/iterators/object_iterator.rbs +0 -6
- data/sig/iterators/paginator_iterator.rbs +0 -8
- data/sig/iterators/rule_iterator.rbs +0 -5
- data/sig/iterators/synonym_iterator.rbs +0 -5
- data/sig/transport/request_options.rbs +0 -33
- data/sig/transport/stateful_host.rbs +0 -21
- data/test/algolia/integration/account_client_test.rb +0 -47
- data/test/algolia/integration/analytics_client_test.rb +0 -117
- data/test/algolia/integration/base_test.rb +0 -9
- data/test/algolia/integration/insights_client_test.rb +0 -80
- data/test/algolia/integration/mocks/mock_requester.rb +0 -47
- data/test/algolia/integration/personalization_client_test.rb +0 -30
- data/test/algolia/integration/recommend_client_test.rb +0 -70
- data/test/algolia/integration/recommendation_client_test.rb +0 -30
- data/test/algolia/integration/search_client_test.rb +0 -465
- data/test/algolia/integration/search_index_test.rb +0 -729
- data/test/algolia/unit/algolia_config_test.rb +0 -16
- data/test/algolia/unit/helpers_test.rb +0 -92
- data/test/algolia/unit/http_requester_test.rb +0 -27
- data/test/algolia/unit/retry_strategy_test.rb +0 -139
- data/test/algolia/unit/user_agent_test.rb +0 -16
- data/test/test_helper.rb +0 -121
- data/upgrade_guide.md +0 -603
- /data/lib/algolia/{enums → transport}/call_type.rb +0 -0
- /data/lib/algolia/{enums → transport}/retry_outcome_type.rb +0 -0
@@ -0,0 +1,723 @@
|
|
1
|
+
# Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'time'
|
5
|
+
|
6
|
+
module Algolia
|
7
|
+
module Search
|
8
|
+
class IndexSettingsAsSearchParams
|
9
|
+
# Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/) and the [modifiers](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) that can be applied: `filterOnly`, `searchable`, and `afterDistinct`.
|
10
|
+
attr_accessor :attributes_for_faceting
|
11
|
+
|
12
|
+
# Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
|
13
|
+
attr_accessor :attributes_to_retrieve
|
14
|
+
|
15
|
+
# Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
|
16
|
+
attr_accessor :ranking
|
17
|
+
|
18
|
+
# Specifies the [Custom ranking criterion](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Use the `asc` and `desc` modifiers to specify the ranking order: ascending or descending.
|
19
|
+
attr_accessor :custom_ranking
|
20
|
+
|
21
|
+
# Relevancy threshold below which less relevant results aren't included in the results.
|
22
|
+
attr_accessor :relevancy_strictness
|
23
|
+
|
24
|
+
# Attributes to highlight. Strings that match the search query in the attributes are highlighted by surrounding them with HTML tags (`highlightPreTag` and `highlightPostTag`).
|
25
|
+
attr_accessor :attributes_to_highlight
|
26
|
+
|
27
|
+
# Attributes to _snippet_. 'Snippeting' is shortening the attribute to a certain number of words. If not specified, the attribute is shortened to the 10 words around the matching string but you can specify the number. For example: `body:20`.
|
28
|
+
attr_accessor :attributes_to_snippet
|
29
|
+
|
30
|
+
# HTML string to insert before the highlighted parts in all highlight and snippet results.
|
31
|
+
attr_accessor :highlight_pre_tag
|
32
|
+
|
33
|
+
# HTML string to insert after the highlighted parts in all highlight and snippet results.
|
34
|
+
attr_accessor :highlight_post_tag
|
35
|
+
|
36
|
+
# String used as an ellipsis indicator when a snippet is truncated.
|
37
|
+
attr_accessor :snippet_ellipsis_text
|
38
|
+
|
39
|
+
# Restrict highlighting and snippeting to items that matched the query.
|
40
|
+
attr_accessor :restrict_highlight_and_snippet_arrays
|
41
|
+
|
42
|
+
# Number of hits per page.
|
43
|
+
attr_accessor :hits_per_page
|
44
|
+
|
45
|
+
# Minimum number of characters a word in the query string must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
46
|
+
attr_accessor :min_word_sizefor1_typo
|
47
|
+
|
48
|
+
# Minimum number of characters a word in the query string must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
49
|
+
attr_accessor :min_word_sizefor2_typos
|
50
|
+
|
51
|
+
attr_accessor :typo_tolerance
|
52
|
+
|
53
|
+
# Whether to allow typos on numbers (\"numeric tokens\") in the query string.
|
54
|
+
attr_accessor :allow_typos_on_numeric_tokens
|
55
|
+
|
56
|
+
# Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/).
|
57
|
+
attr_accessor :disable_typo_tolerance_on_attributes
|
58
|
+
|
59
|
+
attr_accessor :ignore_plurals
|
60
|
+
|
61
|
+
attr_accessor :remove_stop_words
|
62
|
+
|
63
|
+
# Characters that the engine shouldn't automatically [normalize](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
|
64
|
+
attr_accessor :keep_diacritics_on_characters
|
65
|
+
|
66
|
+
# Sets your user's search language. This adjusts language-specific settings and features such as `ignorePlurals`, `removeStopWords`, and [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) word detection.
|
67
|
+
attr_accessor :query_languages
|
68
|
+
|
69
|
+
# [Splits compound words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words) into their component word parts in the query.
|
70
|
+
attr_accessor :decompound_query
|
71
|
+
|
72
|
+
# Incidates whether [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/) are enabled.
|
73
|
+
attr_accessor :enable_rules
|
74
|
+
|
75
|
+
# Incidates whether [Personalization](https://www.algolia.com/doc/guides/personalization/what-is-personalization/) is enabled.
|
76
|
+
attr_accessor :enable_personalization
|
77
|
+
|
78
|
+
attr_accessor :query_type
|
79
|
+
|
80
|
+
attr_accessor :remove_words_if_no_results
|
81
|
+
|
82
|
+
attr_accessor :mode
|
83
|
+
|
84
|
+
attr_accessor :semantic_search
|
85
|
+
|
86
|
+
# Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
|
87
|
+
attr_accessor :advanced_syntax
|
88
|
+
|
89
|
+
# Words which should be considered [optional](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words) when found in a query.
|
90
|
+
attr_accessor :optional_words
|
91
|
+
|
92
|
+
# 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).
|
93
|
+
attr_accessor :disable_exact_on_attributes
|
94
|
+
|
95
|
+
attr_accessor :exact_on_single_word_query
|
96
|
+
|
97
|
+
# Alternatives that should be considered an exact match by [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).
|
98
|
+
attr_accessor :alternatives_as_exact
|
99
|
+
|
100
|
+
# Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.
|
101
|
+
attr_accessor :advanced_syntax_features
|
102
|
+
|
103
|
+
attr_accessor :distinct
|
104
|
+
|
105
|
+
# Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
|
106
|
+
attr_accessor :replace_synonyms_in_highlight
|
107
|
+
|
108
|
+
# Precision of the [proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity).
|
109
|
+
attr_accessor :min_proximity
|
110
|
+
|
111
|
+
# Attributes to include in the API response for search and browse queries.
|
112
|
+
attr_accessor :response_fields
|
113
|
+
|
114
|
+
# Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
115
|
+
attr_accessor :max_facet_hits
|
116
|
+
|
117
|
+
# Maximum number of facet values to return for each facet.
|
118
|
+
attr_accessor :max_values_per_facet
|
119
|
+
|
120
|
+
# Controls how facet values are fetched.
|
121
|
+
attr_accessor :sort_facet_values_by
|
122
|
+
|
123
|
+
# When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
|
124
|
+
attr_accessor :attribute_criteria_computed_by_min_proximity
|
125
|
+
|
126
|
+
attr_accessor :rendering_content
|
127
|
+
|
128
|
+
# Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
|
129
|
+
attr_accessor :enable_re_ranking
|
130
|
+
|
131
|
+
attr_accessor :re_ranking_apply_filter
|
132
|
+
|
133
|
+
class EnumAttributeValidator
|
134
|
+
attr_reader :datatype
|
135
|
+
attr_reader :allowable_values
|
136
|
+
|
137
|
+
def initialize(datatype, allowable_values)
|
138
|
+
@allowable_values = allowable_values.map do |value|
|
139
|
+
case datatype.to_s
|
140
|
+
when /Integer/i
|
141
|
+
value.to_i
|
142
|
+
when /Float/i
|
143
|
+
value.to_f
|
144
|
+
else
|
145
|
+
value
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def valid?(value)
|
151
|
+
!value || allowable_values.include?(value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
156
|
+
def self.attribute_map
|
157
|
+
{
|
158
|
+
:attributes_for_faceting => :attributesForFaceting,
|
159
|
+
:attributes_to_retrieve => :attributesToRetrieve,
|
160
|
+
:ranking => :ranking,
|
161
|
+
:custom_ranking => :customRanking,
|
162
|
+
:relevancy_strictness => :relevancyStrictness,
|
163
|
+
:attributes_to_highlight => :attributesToHighlight,
|
164
|
+
:attributes_to_snippet => :attributesToSnippet,
|
165
|
+
:highlight_pre_tag => :highlightPreTag,
|
166
|
+
:highlight_post_tag => :highlightPostTag,
|
167
|
+
:snippet_ellipsis_text => :snippetEllipsisText,
|
168
|
+
:restrict_highlight_and_snippet_arrays => :restrictHighlightAndSnippetArrays,
|
169
|
+
:hits_per_page => :hitsPerPage,
|
170
|
+
:min_word_sizefor1_typo => :minWordSizefor1Typo,
|
171
|
+
:min_word_sizefor2_typos => :minWordSizefor2Typos,
|
172
|
+
:typo_tolerance => :typoTolerance,
|
173
|
+
:allow_typos_on_numeric_tokens => :allowTyposOnNumericTokens,
|
174
|
+
:disable_typo_tolerance_on_attributes => :disableTypoToleranceOnAttributes,
|
175
|
+
:ignore_plurals => :ignorePlurals,
|
176
|
+
:remove_stop_words => :removeStopWords,
|
177
|
+
:keep_diacritics_on_characters => :keepDiacriticsOnCharacters,
|
178
|
+
:query_languages => :queryLanguages,
|
179
|
+
:decompound_query => :decompoundQuery,
|
180
|
+
:enable_rules => :enableRules,
|
181
|
+
:enable_personalization => :enablePersonalization,
|
182
|
+
:query_type => :queryType,
|
183
|
+
:remove_words_if_no_results => :removeWordsIfNoResults,
|
184
|
+
:mode => :mode,
|
185
|
+
:semantic_search => :semanticSearch,
|
186
|
+
:advanced_syntax => :advancedSyntax,
|
187
|
+
:optional_words => :optionalWords,
|
188
|
+
:disable_exact_on_attributes => :disableExactOnAttributes,
|
189
|
+
:exact_on_single_word_query => :exactOnSingleWordQuery,
|
190
|
+
:alternatives_as_exact => :alternativesAsExact,
|
191
|
+
:advanced_syntax_features => :advancedSyntaxFeatures,
|
192
|
+
:distinct => :distinct,
|
193
|
+
:replace_synonyms_in_highlight => :replaceSynonymsInHighlight,
|
194
|
+
:min_proximity => :minProximity,
|
195
|
+
:response_fields => :responseFields,
|
196
|
+
:max_facet_hits => :maxFacetHits,
|
197
|
+
:max_values_per_facet => :maxValuesPerFacet,
|
198
|
+
:sort_facet_values_by => :sortFacetValuesBy,
|
199
|
+
:attribute_criteria_computed_by_min_proximity => :attributeCriteriaComputedByMinProximity,
|
200
|
+
:rendering_content => :renderingContent,
|
201
|
+
:enable_re_ranking => :enableReRanking,
|
202
|
+
:re_ranking_apply_filter => :reRankingApplyFilter
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
206
|
+
# Returns all the JSON keys this model knows about
|
207
|
+
def self.acceptable_attributes
|
208
|
+
attribute_map.values
|
209
|
+
end
|
210
|
+
|
211
|
+
# Attribute type mapping.
|
212
|
+
def self.types_mapping
|
213
|
+
{
|
214
|
+
:attributes_for_faceting => :'Array<String>',
|
215
|
+
:attributes_to_retrieve => :'Array<String>',
|
216
|
+
:ranking => :'Array<String>',
|
217
|
+
:custom_ranking => :'Array<String>',
|
218
|
+
:relevancy_strictness => :Integer,
|
219
|
+
:attributes_to_highlight => :'Array<String>',
|
220
|
+
:attributes_to_snippet => :'Array<String>',
|
221
|
+
:highlight_pre_tag => :String,
|
222
|
+
:highlight_post_tag => :String,
|
223
|
+
:snippet_ellipsis_text => :String,
|
224
|
+
:restrict_highlight_and_snippet_arrays => :Boolean,
|
225
|
+
:hits_per_page => :Integer,
|
226
|
+
:min_word_sizefor1_typo => :Integer,
|
227
|
+
:min_word_sizefor2_typos => :Integer,
|
228
|
+
:typo_tolerance => :TypoTolerance,
|
229
|
+
:allow_typos_on_numeric_tokens => :Boolean,
|
230
|
+
:disable_typo_tolerance_on_attributes => :'Array<String>',
|
231
|
+
:ignore_plurals => :IgnorePlurals,
|
232
|
+
:remove_stop_words => :RemoveStopWords,
|
233
|
+
:keep_diacritics_on_characters => :String,
|
234
|
+
:query_languages => :'Array<String>',
|
235
|
+
:decompound_query => :Boolean,
|
236
|
+
:enable_rules => :Boolean,
|
237
|
+
:enable_personalization => :Boolean,
|
238
|
+
:query_type => :QueryType,
|
239
|
+
:remove_words_if_no_results => :RemoveWordsIfNoResults,
|
240
|
+
:mode => :Mode,
|
241
|
+
:semantic_search => :SemanticSearch,
|
242
|
+
:advanced_syntax => :Boolean,
|
243
|
+
:optional_words => :'Array<String>',
|
244
|
+
:disable_exact_on_attributes => :'Array<String>',
|
245
|
+
:exact_on_single_word_query => :ExactOnSingleWordQuery,
|
246
|
+
:alternatives_as_exact => :'Array<AlternativesAsExact>',
|
247
|
+
:advanced_syntax_features => :'Array<AdvancedSyntaxFeatures>',
|
248
|
+
:distinct => :Distinct,
|
249
|
+
:replace_synonyms_in_highlight => :Boolean,
|
250
|
+
:min_proximity => :Integer,
|
251
|
+
:response_fields => :'Array<String>',
|
252
|
+
:max_facet_hits => :Integer,
|
253
|
+
:max_values_per_facet => :Integer,
|
254
|
+
:sort_facet_values_by => :String,
|
255
|
+
:attribute_criteria_computed_by_min_proximity => :Boolean,
|
256
|
+
:rendering_content => :RenderingContent,
|
257
|
+
:enable_re_ranking => :Boolean,
|
258
|
+
:re_ranking_apply_filter => :ReRankingApplyFilter
|
259
|
+
}
|
260
|
+
end
|
261
|
+
|
262
|
+
# List of attributes with nullable: true
|
263
|
+
def self.openapi_nullable
|
264
|
+
Set.new([
|
265
|
+
:re_ranking_apply_filter
|
266
|
+
])
|
267
|
+
end
|
268
|
+
|
269
|
+
# Initializes the object
|
270
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
271
|
+
def initialize(attributes = {})
|
272
|
+
unless attributes.is_a?(Hash)
|
273
|
+
raise ArgumentError, "The input argument (attributes) must be a hash in `Algolia::IndexSettingsAsSearchParams` initialize method"
|
274
|
+
end
|
275
|
+
|
276
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
277
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
278
|
+
unless self.class.attribute_map.key?(k.to_sym)
|
279
|
+
raise ArgumentError,
|
280
|
+
"`#{k}` is not a valid attribute in `Algolia::IndexSettingsAsSearchParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
281
|
+
end
|
282
|
+
|
283
|
+
h[k.to_sym] = v
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.key?(:attributes_for_faceting)
|
287
|
+
if (value = attributes[:attributes_for_faceting]).is_a?(Array)
|
288
|
+
self.attributes_for_faceting = value
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.key?(:attributes_to_retrieve)
|
293
|
+
if (value = attributes[:attributes_to_retrieve]).is_a?(Array)
|
294
|
+
self.attributes_to_retrieve = value
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.key?(:ranking)
|
299
|
+
if (value = attributes[:ranking]).is_a?(Array)
|
300
|
+
self.ranking = value
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
if attributes.key?(:custom_ranking)
|
305
|
+
if (value = attributes[:custom_ranking]).is_a?(Array)
|
306
|
+
self.custom_ranking = value
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes.key?(:relevancy_strictness)
|
311
|
+
self.relevancy_strictness = attributes[:relevancy_strictness]
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes.key?(:attributes_to_highlight)
|
315
|
+
if (value = attributes[:attributes_to_highlight]).is_a?(Array)
|
316
|
+
self.attributes_to_highlight = value
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
if attributes.key?(:attributes_to_snippet)
|
321
|
+
if (value = attributes[:attributes_to_snippet]).is_a?(Array)
|
322
|
+
self.attributes_to_snippet = value
|
323
|
+
end
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes.key?(:highlight_pre_tag)
|
327
|
+
self.highlight_pre_tag = attributes[:highlight_pre_tag]
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.key?(:highlight_post_tag)
|
331
|
+
self.highlight_post_tag = attributes[:highlight_post_tag]
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes.key?(:snippet_ellipsis_text)
|
335
|
+
self.snippet_ellipsis_text = attributes[:snippet_ellipsis_text]
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes.key?(:restrict_highlight_and_snippet_arrays)
|
339
|
+
self.restrict_highlight_and_snippet_arrays = attributes[:restrict_highlight_and_snippet_arrays]
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes.key?(:hits_per_page)
|
343
|
+
self.hits_per_page = attributes[:hits_per_page]
|
344
|
+
end
|
345
|
+
|
346
|
+
if attributes.key?(:min_word_sizefor1_typo)
|
347
|
+
self.min_word_sizefor1_typo = attributes[:min_word_sizefor1_typo]
|
348
|
+
end
|
349
|
+
|
350
|
+
if attributes.key?(:min_word_sizefor2_typos)
|
351
|
+
self.min_word_sizefor2_typos = attributes[:min_word_sizefor2_typos]
|
352
|
+
end
|
353
|
+
|
354
|
+
if attributes.key?(:typo_tolerance)
|
355
|
+
self.typo_tolerance = attributes[:typo_tolerance]
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.key?(:allow_typos_on_numeric_tokens)
|
359
|
+
self.allow_typos_on_numeric_tokens = attributes[:allow_typos_on_numeric_tokens]
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.key?(:disable_typo_tolerance_on_attributes)
|
363
|
+
if (value = attributes[:disable_typo_tolerance_on_attributes]).is_a?(Array)
|
364
|
+
self.disable_typo_tolerance_on_attributes = value
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
if attributes.key?(:ignore_plurals)
|
369
|
+
self.ignore_plurals = attributes[:ignore_plurals]
|
370
|
+
end
|
371
|
+
|
372
|
+
if attributes.key?(:remove_stop_words)
|
373
|
+
self.remove_stop_words = attributes[:remove_stop_words]
|
374
|
+
end
|
375
|
+
|
376
|
+
if attributes.key?(:keep_diacritics_on_characters)
|
377
|
+
self.keep_diacritics_on_characters = attributes[:keep_diacritics_on_characters]
|
378
|
+
end
|
379
|
+
|
380
|
+
if attributes.key?(:query_languages)
|
381
|
+
if (value = attributes[:query_languages]).is_a?(Array)
|
382
|
+
self.query_languages = value
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
if attributes.key?(:decompound_query)
|
387
|
+
self.decompound_query = attributes[:decompound_query]
|
388
|
+
end
|
389
|
+
|
390
|
+
if attributes.key?(:enable_rules)
|
391
|
+
self.enable_rules = attributes[:enable_rules]
|
392
|
+
end
|
393
|
+
|
394
|
+
if attributes.key?(:enable_personalization)
|
395
|
+
self.enable_personalization = attributes[:enable_personalization]
|
396
|
+
end
|
397
|
+
|
398
|
+
if attributes.key?(:query_type)
|
399
|
+
self.query_type = attributes[:query_type]
|
400
|
+
end
|
401
|
+
|
402
|
+
if attributes.key?(:remove_words_if_no_results)
|
403
|
+
self.remove_words_if_no_results = attributes[:remove_words_if_no_results]
|
404
|
+
end
|
405
|
+
|
406
|
+
if attributes.key?(:mode)
|
407
|
+
self.mode = attributes[:mode]
|
408
|
+
end
|
409
|
+
|
410
|
+
if attributes.key?(:semantic_search)
|
411
|
+
self.semantic_search = attributes[:semantic_search]
|
412
|
+
end
|
413
|
+
|
414
|
+
if attributes.key?(:advanced_syntax)
|
415
|
+
self.advanced_syntax = attributes[:advanced_syntax]
|
416
|
+
end
|
417
|
+
|
418
|
+
if attributes.key?(:optional_words)
|
419
|
+
if (value = attributes[:optional_words]).is_a?(Array)
|
420
|
+
self.optional_words = value
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.key?(:disable_exact_on_attributes)
|
425
|
+
if (value = attributes[:disable_exact_on_attributes]).is_a?(Array)
|
426
|
+
self.disable_exact_on_attributes = value
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
if attributes.key?(:exact_on_single_word_query)
|
431
|
+
self.exact_on_single_word_query = attributes[:exact_on_single_word_query]
|
432
|
+
end
|
433
|
+
|
434
|
+
if attributes.key?(:alternatives_as_exact)
|
435
|
+
if (value = attributes[:alternatives_as_exact]).is_a?(Array)
|
436
|
+
self.alternatives_as_exact = value
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
if attributes.key?(:advanced_syntax_features)
|
441
|
+
if (value = attributes[:advanced_syntax_features]).is_a?(Array)
|
442
|
+
self.advanced_syntax_features = value
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
if attributes.key?(:distinct)
|
447
|
+
self.distinct = attributes[:distinct]
|
448
|
+
end
|
449
|
+
|
450
|
+
if attributes.key?(:replace_synonyms_in_highlight)
|
451
|
+
self.replace_synonyms_in_highlight = attributes[:replace_synonyms_in_highlight]
|
452
|
+
end
|
453
|
+
|
454
|
+
if attributes.key?(:min_proximity)
|
455
|
+
self.min_proximity = attributes[:min_proximity]
|
456
|
+
end
|
457
|
+
|
458
|
+
if attributes.key?(:response_fields)
|
459
|
+
if (value = attributes[:response_fields]).is_a?(Array)
|
460
|
+
self.response_fields = value
|
461
|
+
end
|
462
|
+
end
|
463
|
+
|
464
|
+
if attributes.key?(:max_facet_hits)
|
465
|
+
self.max_facet_hits = attributes[:max_facet_hits]
|
466
|
+
end
|
467
|
+
|
468
|
+
if attributes.key?(:max_values_per_facet)
|
469
|
+
self.max_values_per_facet = attributes[:max_values_per_facet]
|
470
|
+
end
|
471
|
+
|
472
|
+
if attributes.key?(:sort_facet_values_by)
|
473
|
+
self.sort_facet_values_by = attributes[:sort_facet_values_by]
|
474
|
+
end
|
475
|
+
|
476
|
+
if attributes.key?(:attribute_criteria_computed_by_min_proximity)
|
477
|
+
self.attribute_criteria_computed_by_min_proximity = attributes[:attribute_criteria_computed_by_min_proximity]
|
478
|
+
end
|
479
|
+
|
480
|
+
if attributes.key?(:rendering_content)
|
481
|
+
self.rendering_content = attributes[:rendering_content]
|
482
|
+
end
|
483
|
+
|
484
|
+
if attributes.key?(:enable_re_ranking)
|
485
|
+
self.enable_re_ranking = attributes[:enable_re_ranking]
|
486
|
+
end
|
487
|
+
|
488
|
+
if attributes.key?(:re_ranking_apply_filter)
|
489
|
+
self.re_ranking_apply_filter = attributes[:re_ranking_apply_filter]
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
# Custom attribute writer method with validation
|
494
|
+
# @param [Object] hits_per_page Value to be assigned
|
495
|
+
def hits_per_page=(hits_per_page)
|
496
|
+
if hits_per_page.nil?
|
497
|
+
raise ArgumentError, 'hits_per_page cannot be nil'
|
498
|
+
end
|
499
|
+
|
500
|
+
if hits_per_page > 1000
|
501
|
+
raise ArgumentError, 'invalid value for "hits_per_page", must be smaller than or equal to 1000.'
|
502
|
+
end
|
503
|
+
|
504
|
+
if hits_per_page < 1
|
505
|
+
raise ArgumentError, 'invalid value for "hits_per_page", must be greater than or equal to 1.'
|
506
|
+
end
|
507
|
+
|
508
|
+
@hits_per_page = hits_per_page
|
509
|
+
end
|
510
|
+
|
511
|
+
# Custom attribute writer method with validation
|
512
|
+
# @param [Object] min_proximity Value to be assigned
|
513
|
+
def min_proximity=(min_proximity)
|
514
|
+
if min_proximity.nil?
|
515
|
+
raise ArgumentError, 'min_proximity cannot be nil'
|
516
|
+
end
|
517
|
+
|
518
|
+
if min_proximity > 7
|
519
|
+
raise ArgumentError, 'invalid value for "min_proximity", must be smaller than or equal to 7.'
|
520
|
+
end
|
521
|
+
|
522
|
+
if min_proximity < 1
|
523
|
+
raise ArgumentError, 'invalid value for "min_proximity", must be greater than or equal to 1.'
|
524
|
+
end
|
525
|
+
|
526
|
+
@min_proximity = min_proximity
|
527
|
+
end
|
528
|
+
|
529
|
+
# Custom attribute writer method with validation
|
530
|
+
# @param [Object] max_facet_hits Value to be assigned
|
531
|
+
def max_facet_hits=(max_facet_hits)
|
532
|
+
if max_facet_hits.nil?
|
533
|
+
raise ArgumentError, 'max_facet_hits cannot be nil'
|
534
|
+
end
|
535
|
+
|
536
|
+
if max_facet_hits > 100
|
537
|
+
raise ArgumentError, 'invalid value for "max_facet_hits", must be smaller than or equal to 100.'
|
538
|
+
end
|
539
|
+
|
540
|
+
@max_facet_hits = max_facet_hits
|
541
|
+
end
|
542
|
+
|
543
|
+
# Checks equality by comparing each attribute.
|
544
|
+
# @param [Object] Object to be compared
|
545
|
+
def ==(other)
|
546
|
+
return true if equal?(other)
|
547
|
+
|
548
|
+
self.class == other.class &&
|
549
|
+
attributes_for_faceting == other.attributes_for_faceting &&
|
550
|
+
attributes_to_retrieve == other.attributes_to_retrieve &&
|
551
|
+
ranking == other.ranking &&
|
552
|
+
custom_ranking == other.custom_ranking &&
|
553
|
+
relevancy_strictness == other.relevancy_strictness &&
|
554
|
+
attributes_to_highlight == other.attributes_to_highlight &&
|
555
|
+
attributes_to_snippet == other.attributes_to_snippet &&
|
556
|
+
highlight_pre_tag == other.highlight_pre_tag &&
|
557
|
+
highlight_post_tag == other.highlight_post_tag &&
|
558
|
+
snippet_ellipsis_text == other.snippet_ellipsis_text &&
|
559
|
+
restrict_highlight_and_snippet_arrays == other.restrict_highlight_and_snippet_arrays &&
|
560
|
+
hits_per_page == other.hits_per_page &&
|
561
|
+
min_word_sizefor1_typo == other.min_word_sizefor1_typo &&
|
562
|
+
min_word_sizefor2_typos == other.min_word_sizefor2_typos &&
|
563
|
+
typo_tolerance == other.typo_tolerance &&
|
564
|
+
allow_typos_on_numeric_tokens == other.allow_typos_on_numeric_tokens &&
|
565
|
+
disable_typo_tolerance_on_attributes == other.disable_typo_tolerance_on_attributes &&
|
566
|
+
ignore_plurals == other.ignore_plurals &&
|
567
|
+
remove_stop_words == other.remove_stop_words &&
|
568
|
+
keep_diacritics_on_characters == other.keep_diacritics_on_characters &&
|
569
|
+
query_languages == other.query_languages &&
|
570
|
+
decompound_query == other.decompound_query &&
|
571
|
+
enable_rules == other.enable_rules &&
|
572
|
+
enable_personalization == other.enable_personalization &&
|
573
|
+
query_type == other.query_type &&
|
574
|
+
remove_words_if_no_results == other.remove_words_if_no_results &&
|
575
|
+
mode == other.mode &&
|
576
|
+
semantic_search == other.semantic_search &&
|
577
|
+
advanced_syntax == other.advanced_syntax &&
|
578
|
+
optional_words == other.optional_words &&
|
579
|
+
disable_exact_on_attributes == other.disable_exact_on_attributes &&
|
580
|
+
exact_on_single_word_query == other.exact_on_single_word_query &&
|
581
|
+
alternatives_as_exact == other.alternatives_as_exact &&
|
582
|
+
advanced_syntax_features == other.advanced_syntax_features &&
|
583
|
+
distinct == other.distinct &&
|
584
|
+
replace_synonyms_in_highlight == other.replace_synonyms_in_highlight &&
|
585
|
+
min_proximity == other.min_proximity &&
|
586
|
+
response_fields == other.response_fields &&
|
587
|
+
max_facet_hits == other.max_facet_hits &&
|
588
|
+
max_values_per_facet == other.max_values_per_facet &&
|
589
|
+
sort_facet_values_by == other.sort_facet_values_by &&
|
590
|
+
attribute_criteria_computed_by_min_proximity == other.attribute_criteria_computed_by_min_proximity &&
|
591
|
+
rendering_content == other.rendering_content &&
|
592
|
+
enable_re_ranking == other.enable_re_ranking &&
|
593
|
+
re_ranking_apply_filter == other.re_ranking_apply_filter
|
594
|
+
end
|
595
|
+
|
596
|
+
# @see the `==` method
|
597
|
+
# @param [Object] Object to be compared
|
598
|
+
def eql?(other)
|
599
|
+
self == other
|
600
|
+
end
|
601
|
+
|
602
|
+
# Calculates hash code according to all attributes.
|
603
|
+
# @return [Integer] Hash code
|
604
|
+
def hash
|
605
|
+
[attributes_for_faceting, attributes_to_retrieve, ranking, custom_ranking, relevancy_strictness, attributes_to_highlight, attributes_to_snippet, highlight_pre_tag,
|
606
|
+
highlight_post_tag, snippet_ellipsis_text, restrict_highlight_and_snippet_arrays, hits_per_page, min_word_sizefor1_typo, min_word_sizefor2_typos, typo_tolerance, allow_typos_on_numeric_tokens, disable_typo_tolerance_on_attributes, ignore_plurals, remove_stop_words, keep_diacritics_on_characters, query_languages, decompound_query, enable_rules, enable_personalization, query_type, remove_words_if_no_results, mode, semantic_search, advanced_syntax, optional_words, disable_exact_on_attributes, exact_on_single_word_query, alternatives_as_exact, advanced_syntax_features, distinct, replace_synonyms_in_highlight, min_proximity, response_fields, max_facet_hits, max_values_per_facet, sort_facet_values_by, attribute_criteria_computed_by_min_proximity, rendering_content, enable_re_ranking, re_ranking_apply_filter].hash
|
607
|
+
end
|
608
|
+
|
609
|
+
# Builds the object from hash
|
610
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
611
|
+
# @return [Object] Returns the model itself
|
612
|
+
def self.build_from_hash(attributes)
|
613
|
+
return nil unless attributes.is_a?(Hash)
|
614
|
+
|
615
|
+
attributes = attributes.transform_keys(&:to_sym)
|
616
|
+
transformed_hash = {}
|
617
|
+
types_mapping.each_pair do |key, type|
|
618
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
619
|
+
transformed_hash[key.to_s] = nil
|
620
|
+
elsif type =~ /\AArray<(.*)>/i
|
621
|
+
# check to ensure the input is an array given that the attribute
|
622
|
+
# is documented as an array but the input is not
|
623
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
624
|
+
transformed_hash[key.to_s] = attributes[attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }
|
625
|
+
end
|
626
|
+
elsif !attributes[attribute_map[key]].nil?
|
627
|
+
transformed_hash[key.to_s] = _deserialize(type, attributes[attribute_map[key]])
|
628
|
+
end
|
629
|
+
end
|
630
|
+
new(transformed_hash)
|
631
|
+
end
|
632
|
+
|
633
|
+
# Deserializes the data based on type
|
634
|
+
# @param string type Data type
|
635
|
+
# @param string value Value to be deserialized
|
636
|
+
# @return [Object] Deserialized data
|
637
|
+
def self._deserialize(type, value)
|
638
|
+
case type.to_sym
|
639
|
+
when :Time
|
640
|
+
Time.parse(value)
|
641
|
+
when :Date
|
642
|
+
Date.parse(value)
|
643
|
+
when :String
|
644
|
+
value.to_s
|
645
|
+
when :Integer
|
646
|
+
value.to_i
|
647
|
+
when :Float
|
648
|
+
value.to_f
|
649
|
+
when :Boolean
|
650
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
651
|
+
true
|
652
|
+
else
|
653
|
+
false
|
654
|
+
end
|
655
|
+
when :Object
|
656
|
+
# generic object (usually a Hash), return directly
|
657
|
+
value
|
658
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
659
|
+
inner_type = Regexp.last_match[:inner_type]
|
660
|
+
value.map { |v| _deserialize(inner_type, v) }
|
661
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
662
|
+
k_type = Regexp.last_match[:k_type]
|
663
|
+
v_type = Regexp.last_match[:v_type]
|
664
|
+
{}.tap do |hash|
|
665
|
+
value.each do |k, v|
|
666
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
667
|
+
end
|
668
|
+
end
|
669
|
+
else # model
|
670
|
+
# models (e.g. Pet) or oneOf
|
671
|
+
klass = Algolia::Search.const_get(type)
|
672
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
676
|
+
# Returns the string representation of the object
|
677
|
+
# @return [String] String presentation of the object
|
678
|
+
def to_s
|
679
|
+
to_hash.to_s
|
680
|
+
end
|
681
|
+
|
682
|
+
# to_body is an alias to to_hash (backward compatibility)
|
683
|
+
# @return [Hash] Returns the object in the form of hash
|
684
|
+
def to_body
|
685
|
+
to_hash
|
686
|
+
end
|
687
|
+
|
688
|
+
# Returns the object in the form of hash
|
689
|
+
# @return [Hash] Returns the object in the form of hash
|
690
|
+
def to_hash
|
691
|
+
hash = {}
|
692
|
+
self.class.attribute_map.each_pair do |attr, param|
|
693
|
+
value = send(attr)
|
694
|
+
if value.nil?
|
695
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
696
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
697
|
+
end
|
698
|
+
|
699
|
+
hash[param] = _to_hash(value)
|
700
|
+
end
|
701
|
+
hash
|
702
|
+
end
|
703
|
+
|
704
|
+
# Outputs non-array value in the form of hash
|
705
|
+
# For object, use to_hash. Otherwise, just return the value
|
706
|
+
# @param [Object] value Any valid value
|
707
|
+
# @return [Hash] Returns the value in the form of hash
|
708
|
+
def _to_hash(value)
|
709
|
+
if value.is_a?(Array)
|
710
|
+
value.compact.map { |v| _to_hash(v) }
|
711
|
+
elsif value.is_a?(Hash)
|
712
|
+
{}.tap do |hash|
|
713
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
714
|
+
end
|
715
|
+
elsif value.respond_to? :to_hash
|
716
|
+
value.to_hash
|
717
|
+
else
|
718
|
+
value
|
719
|
+
end
|
720
|
+
end
|
721
|
+
end
|
722
|
+
end
|
723
|
+
end
|