elasticsearch-api 9.0.3 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/elasticsearch/api/actions/async_search/delete.rb +14 -3
- data/lib/elasticsearch/api/actions/async_search/get.rb +13 -2
- data/lib/elasticsearch/api/actions/async_search/status.rb +13 -2
- data/lib/elasticsearch/api/actions/async_search/submit.rb +17 -6
- data/lib/elasticsearch/api/actions/bulk.rb +86 -63
- data/lib/elasticsearch/api/actions/cat/aliases.rb +20 -9
- data/lib/elasticsearch/api/actions/cat/allocation.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/count.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +17 -6
- data/lib/elasticsearch/api/actions/cat/health.rb +20 -9
- data/lib/elasticsearch/api/actions/cat/help.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/indices.rb +18 -7
- data/lib/elasticsearch/api/actions/cat/master.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +16 -5
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +20 -9
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +18 -7
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/nodes.rb +23 -11
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/plugins.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/recovery.rb +24 -12
- data/lib/elasticsearch/api/actions/cat/repositories.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/segments.rb +24 -12
- data/lib/elasticsearch/api/actions/cat/shards.rb +22 -11
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +21 -9
- data/lib/elasticsearch/api/actions/cat/tasks.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/templates.rb +19 -8
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +21 -10
- data/lib/elasticsearch/api/actions/cat/transforms.rb +18 -7
- data/lib/elasticsearch/api/actions/clear_scroll.rb +13 -2
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +15 -4
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +13 -1
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +12 -1
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +12 -1
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +12 -1
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +17 -5
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +14 -3
- data/lib/elasticsearch/api/actions/cluster/health.rb +13 -2
- data/lib/elasticsearch/api/actions/cluster/info.rb +13 -2
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +14 -3
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +16 -5
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +20 -8
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +17 -6
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +13 -2
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +16 -5
- data/lib/elasticsearch/api/actions/cluster/state.rb +15 -4
- data/lib/elasticsearch/api/actions/cluster/stats.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/check_in.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/delete.rb +12 -1
- data/lib/elasticsearch/api/actions/connector/get.rb +12 -1
- data/lib/elasticsearch/api/actions/connector/list.rb +12 -1
- data/lib/elasticsearch/api/actions/connector/post.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/put.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +15 -4
- data/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_error.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/sync_job_get.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_post.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +15 -4
- data/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/update_configuration.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_error.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_features.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_filtering.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_index_name.rb +14 -3
- data/lib/elasticsearch/api/actions/connector/update_name.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_native.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_service_type.rb +13 -2
- data/lib/elasticsearch/api/actions/connector/update_status.rb +13 -2
- data/lib/elasticsearch/api/actions/count.rb +29 -18
- data/lib/elasticsearch/api/actions/create.rb +44 -41
- data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +12 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +12 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +12 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +12 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +12 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +13 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +13 -2
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +13 -2
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +13 -2
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +14 -3
- data/lib/elasticsearch/api/actions/delete.rb +25 -12
- data/lib/elasticsearch/api/actions/delete_by_query.rb +63 -48
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +14 -3
- data/lib/elasticsearch/api/actions/delete_script.rb +14 -3
- data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +12 -1
- data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +13 -2
- data/lib/elasticsearch/api/actions/enrich/get_policy.rb +12 -1
- data/lib/elasticsearch/api/actions/enrich/put_policy.rb +12 -1
- data/lib/elasticsearch/api/actions/enrich/stats.rb +12 -1
- data/lib/elasticsearch/api/actions/eql/delete.rb +14 -3
- data/lib/elasticsearch/api/actions/eql/get.rb +12 -1
- data/lib/elasticsearch/api/actions/eql/get_status.rb +13 -2
- data/lib/elasticsearch/api/actions/eql/search.rb +15 -3
- data/lib/elasticsearch/api/actions/esql/async_query.rb +17 -14
- data/lib/elasticsearch/api/actions/esql/async_query_delete.rb +15 -4
- data/lib/elasticsearch/api/actions/esql/async_query_get.rb +17 -5
- data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +15 -4
- data/lib/elasticsearch/api/actions/esql/get_query.rb +76 -0
- data/lib/elasticsearch/api/actions/esql/list_queries.rb +66 -0
- data/lib/elasticsearch/api/actions/esql/query.rb +15 -2
- data/lib/elasticsearch/api/actions/exists.rb +31 -18
- data/lib/elasticsearch/api/actions/exists_source.rb +21 -8
- data/lib/elasticsearch/api/actions/explain.rb +25 -14
- data/lib/elasticsearch/api/actions/features/get_features.rb +13 -2
- data/lib/elasticsearch/api/actions/features/reset_features.rb +12 -1
- data/lib/elasticsearch/api/actions/field_caps.rb +18 -7
- data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +17 -6
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +15 -4
- data/lib/elasticsearch/api/actions/fleet/search.rb +15 -4
- data/lib/elasticsearch/api/actions/get.rb +48 -29
- data/lib/elasticsearch/api/actions/get_script.rb +13 -2
- data/lib/elasticsearch/api/actions/get_script_context.rb +13 -2
- data/lib/elasticsearch/api/actions/get_script_languages.rb +13 -2
- data/lib/elasticsearch/api/actions/get_source.rb +24 -11
- data/lib/elasticsearch/api/actions/graph/explore.rb +13 -2
- data/lib/elasticsearch/api/actions/health_report.rb +13 -2
- data/lib/elasticsearch/api/actions/index.rb +55 -43
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +14 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +13 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +14 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +14 -3
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +13 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +13 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +12 -1
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/add_block.rb +20 -9
- data/lib/elasticsearch/api/actions/indices/analyze.rb +15 -4
- data/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +24 -14
- data/lib/elasticsearch/api/actions/indices/clone.rb +17 -6
- data/lib/elasticsearch/api/actions/indices/close.rb +19 -9
- data/lib/elasticsearch/api/actions/indices/create.rb +24 -13
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +15 -4
- data/lib/elasticsearch/api/actions/indices/create_from.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +15 -4
- data/lib/elasticsearch/api/actions/indices/delete.rb +17 -7
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_stream_options.rb +75 -0
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +14 -2
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +21 -10
- data/lib/elasticsearch/api/actions/indices/downsample.rb +15 -4
- data/lib/elasticsearch/api/actions/indices/exists.rb +19 -9
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +18 -8
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +16 -5
- data/lib/elasticsearch/api/actions/indices/flush.rb +20 -10
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +23 -11
- data/lib/elasticsearch/api/actions/indices/get.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +19 -9
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +16 -6
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/get_data_stream_options.rb +77 -0
- data/lib/elasticsearch/api/actions/indices/get_data_stream_settings.rb +75 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +19 -10
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +18 -8
- data/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +24 -13
- data/lib/elasticsearch/api/actions/indices/get_template.rb +17 -6
- data/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/open.rb +23 -13
- data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +15 -5
- data/lib/elasticsearch/api/actions/indices/put_data_stream_options.rb +82 -0
- data/lib/elasticsearch/api/actions/indices/put_data_stream_settings.rb +85 -0
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +17 -6
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +26 -25
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +66 -14
- data/lib/elasticsearch/api/actions/indices/put_template.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/recovery.rb +22 -5
- data/lib/elasticsearch/api/actions/indices/refresh.rb +19 -9
- data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +15 -4
- data/lib/elasticsearch/api/actions/indices/remove_block.rb +93 -0
- data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +35 -25
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +17 -7
- data/lib/elasticsearch/api/actions/indices/rollover.rb +22 -11
- data/lib/elasticsearch/api/actions/indices/segments.rb +17 -7
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +13 -2
- data/lib/elasticsearch/api/actions/indices/shrink.rb +14 -3
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/split.rb +19 -6
- data/lib/elasticsearch/api/actions/indices/stats.rb +19 -8
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +12 -1
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +25 -15
- data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +18 -1
- data/lib/elasticsearch/api/actions/inference/completion.rb +12 -1
- data/lib/elasticsearch/api/actions/inference/delete.rb +12 -1
- data/lib/elasticsearch/api/actions/inference/get.rb +13 -2
- data/lib/elasticsearch/api/actions/inference/inference.rb +12 -1
- data/lib/elasticsearch/api/actions/inference/put.rb +33 -8
- data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +15 -8
- data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +15 -3
- data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +16 -9
- data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +15 -8
- data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +16 -9
- data/lib/elasticsearch/api/actions/inference/put_cohere.rb +15 -8
- data/lib/elasticsearch/api/actions/inference/put_custom.rb +112 -0
- data/lib/elasticsearch/api/actions/inference/put_deepseek.rb +82 -0
- data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +16 -4
- data/lib/elasticsearch/api/actions/inference/put_elser.rb +15 -3
- data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +15 -8
- data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +15 -8
- data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +43 -19
- data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +17 -10
- data/lib/elasticsearch/api/actions/inference/put_mistral.rb +16 -10
- data/lib/elasticsearch/api/actions/inference/put_openai.rb +16 -9
- data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +15 -3
- data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +17 -11
- data/lib/elasticsearch/api/actions/inference/rerank.rb +13 -2
- data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +12 -1
- data/lib/elasticsearch/api/actions/inference/stream_completion.rb +15 -3
- data/lib/elasticsearch/api/actions/inference/text_embedding.rb +12 -1
- data/lib/elasticsearch/api/actions/inference/update.rb +14 -3
- data/lib/elasticsearch/api/actions/info.rb +14 -2
- data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +12 -1
- data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +14 -3
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +13 -2
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +12 -1
- data/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +15 -4
- data/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +14 -6
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +14 -3
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +12 -1
- data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +12 -1
- data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +14 -3
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +11 -0
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +14 -3
- data/lib/elasticsearch/api/actions/license/delete.rb +12 -1
- data/lib/elasticsearch/api/actions/license/get.rb +14 -3
- data/lib/elasticsearch/api/actions/license/get_basic_status.rb +13 -2
- data/lib/elasticsearch/api/actions/license/get_trial_status.rb +13 -2
- data/lib/elasticsearch/api/actions/license/post.rb +12 -1
- data/lib/elasticsearch/api/actions/license/post_start_basic.rb +13 -2
- data/lib/elasticsearch/api/actions/license/post_start_trial.rb +13 -2
- data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +13 -2
- data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +13 -2
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +16 -5
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +15 -4
- data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +16 -5
- data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +19 -8
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +18 -7
- data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +15 -4
- data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +31 -20
- data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/info.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +25 -6
- data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +19 -13
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +19 -8
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +17 -6
- data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +14 -3
- data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +17 -11
- data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +13 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +12 -1
- data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +12 -1
- data/lib/elasticsearch/api/actions/mget.rb +25 -14
- data/lib/elasticsearch/api/actions/migration/deprecations.rb +13 -2
- data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +13 -2
- data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +13 -2
- data/lib/elasticsearch/api/actions/msearch.rb +28 -11
- data/lib/elasticsearch/api/actions/msearch_template.rb +22 -10
- data/lib/elasticsearch/api/actions/mtermvectors.rb +21 -10
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +14 -3
- data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +13 -2
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +12 -1
- data/lib/elasticsearch/api/actions/nodes/info.rb +12 -1
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +12 -1
- data/lib/elasticsearch/api/actions/nodes/stats.rb +13 -2
- data/lib/elasticsearch/api/actions/nodes/usage.rb +14 -3
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +23 -12
- data/lib/elasticsearch/api/actions/ping.rb +13 -2
- data/lib/elasticsearch/api/actions/put_script.rb +14 -3
- data/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +13 -2
- data/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +12 -1
- data/lib/elasticsearch/api/actions/query_rules/get_rule.rb +13 -2
- data/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +13 -2
- data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +12 -1
- data/lib/elasticsearch/api/actions/query_rules/put_rule.rb +13 -2
- data/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +15 -4
- data/lib/elasticsearch/api/actions/query_rules/test.rb +13 -2
- data/lib/elasticsearch/api/actions/rank_eval.rb +16 -5
- data/lib/elasticsearch/api/actions/reindex.rb +35 -123
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +17 -4
- data/lib/elasticsearch/api/actions/render_search_template.rb +14 -3
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +12 -1
- data/lib/elasticsearch/api/actions/scroll.rb +16 -5
- data/lib/elasticsearch/api/actions/search.rb +71 -60
- data/lib/elasticsearch/api/actions/search_application/delete.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/get.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/list.rb +12 -1
- data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +12 -1
- data/lib/elasticsearch/api/actions/search_application/put.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +13 -2
- data/lib/elasticsearch/api/actions/search_application/render_query.rb +15 -4
- data/lib/elasticsearch/api/actions/search_application/search.rb +12 -1
- data/lib/elasticsearch/api/actions/search_mvt.rb +39 -70
- data/lib/elasticsearch/api/actions/search_shards.rb +22 -12
- data/lib/elasticsearch/api/actions/search_template.rb +24 -14
- data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +12 -1
- data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +14 -3
- data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +13 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +12 -1
- data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +17 -6
- data/lib/elasticsearch/api/actions/security/authenticate.rb +13 -2
- data/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +13 -2
- data/lib/elasticsearch/api/actions/security/bulk_put_role.rb +13 -2
- data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +15 -4
- data/lib/elasticsearch/api/actions/security/change_password.rb +13 -2
- data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +14 -3
- data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +14 -3
- data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +13 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +14 -3
- data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +17 -6
- data/lib/elasticsearch/api/actions/security/create_api_key.rb +13 -2
- data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +16 -5
- data/lib/elasticsearch/api/actions/security/create_service_token.rb +15 -4
- data/lib/elasticsearch/api/actions/security/delegate_pki.rb +15 -4
- data/lib/elasticsearch/api/actions/security/delete_privileges.rb +14 -3
- data/lib/elasticsearch/api/actions/security/delete_role.rb +13 -2
- data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +13 -2
- data/lib/elasticsearch/api/actions/security/delete_service_token.rb +13 -2
- data/lib/elasticsearch/api/actions/security/delete_user.rb +13 -2
- data/lib/elasticsearch/api/actions/security/disable_user.rb +13 -2
- data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +12 -1
- data/lib/elasticsearch/api/actions/security/enable_user.rb +13 -2
- data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +12 -1
- data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +13 -2
- data/lib/elasticsearch/api/actions/security/enroll_node.rb +13 -2
- data/lib/elasticsearch/api/actions/security/get_api_key.rb +20 -9
- data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +13 -2
- data/lib/elasticsearch/api/actions/security/get_privileges.rb +14 -3
- data/lib/elasticsearch/api/actions/security/get_role.rb +12 -1
- data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +13 -2
- data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +16 -5
- data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +15 -4
- data/lib/elasticsearch/api/actions/security/get_settings.rb +15 -4
- data/lib/elasticsearch/api/actions/security/get_token.rb +15 -4
- data/lib/elasticsearch/api/actions/security/get_user.rb +13 -2
- data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +12 -4
- data/lib/elasticsearch/api/actions/security/get_user_profile.rb +17 -6
- data/lib/elasticsearch/api/actions/security/grant_api_key.rb +17 -2
- data/lib/elasticsearch/api/actions/security/has_privileges.rb +13 -2
- data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +13 -2
- data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +21 -10
- data/lib/elasticsearch/api/actions/security/invalidate_token.rb +16 -5
- data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +13 -2
- data/lib/elasticsearch/api/actions/security/oidc_logout.rb +14 -3
- data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +13 -2
- data/lib/elasticsearch/api/actions/security/put_privileges.rb +18 -7
- data/lib/elasticsearch/api/actions/security/put_role.rb +13 -2
- data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +16 -5
- data/lib/elasticsearch/api/actions/security/put_user.rb +13 -2
- data/lib/elasticsearch/api/actions/security/query_api_keys.rb +18 -6
- data/lib/elasticsearch/api/actions/security/query_role.rb +13 -2
- data/lib/elasticsearch/api/actions/security/query_user.rb +12 -1
- data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +14 -3
- data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +13 -2
- data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +14 -3
- data/lib/elasticsearch/api/actions/security/saml_logout.rb +13 -2
- data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +16 -5
- data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +13 -2
- data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +17 -6
- data/lib/elasticsearch/api/actions/security/update_api_key.rb +17 -6
- data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +17 -5
- data/lib/elasticsearch/api/actions/security/update_settings.rb +14 -3
- data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +16 -5
- data/lib/elasticsearch/api/actions/simulate/ingest.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +13 -2
- data/lib/elasticsearch/api/actions/snapshot/create.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +17 -6
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +16 -3
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +15 -4
- data/lib/elasticsearch/api/actions/snapshot/get.rb +32 -19
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +16 -5
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +38 -16
- data/lib/elasticsearch/api/actions/snapshot/repository_verify_integrity.rb +113 -0
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +19 -6
- data/lib/elasticsearch/api/actions/snapshot/status.rb +19 -8
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +12 -1
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +14 -3
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +14 -3
- data/lib/elasticsearch/api/actions/sql/clear_cursor.rb +13 -2
- data/lib/elasticsearch/api/actions/sql/delete_async.rb +14 -3
- data/lib/elasticsearch/api/actions/sql/get_async.rb +14 -3
- data/lib/elasticsearch/api/actions/sql/get_async_status.rb +13 -2
- data/lib/elasticsearch/api/actions/sql/query.rb +14 -3
- data/lib/elasticsearch/api/actions/sql/translate.rb +14 -3
- data/lib/elasticsearch/api/actions/ssl/certificates.rb +15 -4
- data/lib/elasticsearch/api/actions/streams/logs_disable.rb +50 -0
- data/lib/elasticsearch/api/actions/streams/logs_enable.rb +50 -0
- data/lib/elasticsearch/api/actions/streams/status.rb +50 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +13 -2
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +15 -2
- data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +12 -1
- data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +13 -2
- data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +12 -1
- data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +16 -2
- data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +15 -2
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +15 -4
- data/lib/elasticsearch/api/actions/tasks/get.rb +13 -2
- data/lib/elasticsearch/api/actions/tasks/list.rb +30 -15
- data/lib/elasticsearch/api/actions/terms_enum.rb +15 -4
- data/lib/elasticsearch/api/actions/termvectors.rb +28 -15
- data/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +53 -42
- data/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +53 -42
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +45 -45
- data/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +13 -2
- data/lib/elasticsearch/api/actions/transform/delete_transform.rb +12 -1
- data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +2 -7
- data/lib/elasticsearch/api/actions/transform/get_transform.rb +14 -3
- data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +14 -3
- data/lib/elasticsearch/api/actions/transform/preview_transform.rb +12 -1
- data/lib/elasticsearch/api/actions/transform/put_transform.rb +19 -8
- data/lib/elasticsearch/api/actions/transform/reset_transform.rb +14 -3
- data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +13 -2
- data/lib/elasticsearch/api/actions/transform/start_transform.rb +15 -4
- data/lib/elasticsearch/api/actions/transform/stop_transform.rb +15 -4
- data/lib/elasticsearch/api/actions/transform/update_transform.rb +15 -4
- data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +12 -1
- data/lib/elasticsearch/api/actions/update.rb +20 -8
- data/lib/elasticsearch/api/actions/update_by_query.rb +76 -56
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +16 -4
- data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +15 -4
- data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +14 -2
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +14 -3
- data/lib/elasticsearch/api/actions/watcher/get_watch.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +18 -7
- data/lib/elasticsearch/api/actions/watcher/query_watches.rb +14 -3
- data/lib/elasticsearch/api/actions/watcher/start.rb +12 -1
- data/lib/elasticsearch/api/actions/watcher/stats.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/stop.rb +13 -2
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +17 -6
- data/lib/elasticsearch/api/actions/xpack/info.rb +13 -2
- data/lib/elasticsearch/api/actions/xpack/usage.rb +13 -2
- data/lib/elasticsearch/api/version.rb +2 -2
- data/lib/elasticsearch/api.rb +1 -0
- metadata +18 -4
@@ -23,7 +23,7 @@ module Elasticsearch
|
|
23
23
|
module Actions
|
24
24
|
# Update a document.
|
25
25
|
# Update a document by running a script or passing a partial document.
|
26
|
-
# If the Elasticsearch security features are enabled, you must have the
|
26
|
+
# If the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.
|
27
27
|
# The script can update, delete, or skip modifying the document.
|
28
28
|
# The API also supports passing a partial document, which is merged into the existing document.
|
29
29
|
# To fully replace an existing document, use the index API.
|
@@ -32,8 +32,9 @@ module Elasticsearch
|
|
32
32
|
# * Runs the specified script.
|
33
33
|
# * Indexes the result.
|
34
34
|
# The document must still be reindexed, but using this API removes some network roundtrips and reduces chances of version conflicts between the GET and the index operation.
|
35
|
-
# The
|
36
|
-
# In addition to
|
35
|
+
# The `_source` field must be enabled to use this API.
|
36
|
+
# In addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).
|
37
|
+
# For usage examples such as partial updates, upserts, and scripted updates, see the External documentation.
|
37
38
|
#
|
38
39
|
# @option arguments [String] :id A unique identifier for the document to be updated. (*Required*)
|
39
40
|
# @option arguments [String] :index The name of the target index.
|
@@ -45,23 +46,34 @@ module Elasticsearch
|
|
45
46
|
# @option arguments [String] :refresh If 'true', Elasticsearch refreshes the affected shards to make this operation visible to search.
|
46
47
|
# If 'wait_for', it waits for a refresh to make this operation visible to search.
|
47
48
|
# If 'false', it does nothing with refreshes. Server default: false.
|
48
|
-
# @option arguments [Boolean] :require_alias If
|
49
|
+
# @option arguments [Boolean] :require_alias If `true`, the destination must be an index alias.
|
49
50
|
# @option arguments [Integer] :retry_on_conflict The number of times the operation should be retried when a conflict occurs. Server default: 0.
|
50
51
|
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
51
52
|
# @option arguments [Time] :timeout The period to wait for the following operations: dynamic mapping updates and waiting for active shards.
|
52
53
|
# Elasticsearch waits for at least the timeout period before failing.
|
53
54
|
# The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
|
54
55
|
# @option arguments [Integer, String] :wait_for_active_shards The number of copies of each shard that must be active before proceeding with the operation.
|
55
|
-
# Set to 'all' or any positive integer up to the total number of shards in the index (
|
56
|
-
# The default value of
|
57
|
-
# @option arguments [Boolean, String, Array<String>] :_source If
|
56
|
+
# Set to 'all' or any positive integer up to the total number of shards in the index (`number_of_replicas`+1).
|
57
|
+
# The default value of `1` means it waits for each primary shard to be active. Server default: 1.
|
58
|
+
# @option arguments [Boolean, String, Array<String>] :_source If `false`, source retrieval is turned off.
|
58
59
|
# You can also specify a comma-separated list of the fields you want to retrieve. Server default: true.
|
59
60
|
# @option arguments [String, Array<String>] :_source_excludes The source fields you want to exclude.
|
60
61
|
# @option arguments [String, Array<String>] :_source_includes The source fields you want to retrieve.
|
62
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
63
|
+
# when they occur.
|
64
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
65
|
+
# returned by Elasticsearch.
|
66
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
67
|
+
# For example `"exists_time": "1h"` for humans and
|
68
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
69
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
70
|
+
# only by machines.
|
71
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
72
|
+
# this option for debugging only.
|
61
73
|
# @option arguments [Hash] :headers Custom HTTP headers
|
62
74
|
# @option arguments [Hash] :body request body
|
63
75
|
#
|
64
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
76
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update
|
65
77
|
#
|
66
78
|
def update(arguments = {})
|
67
79
|
request_opts = { endpoint: arguments[:endpoint] || 'update' }
|
@@ -25,98 +25,107 @@ module Elasticsearch
|
|
25
25
|
# Updates documents that match the specified query.
|
26
26
|
# If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
|
27
27
|
# If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:
|
28
|
-
# *
|
29
|
-
# *
|
28
|
+
# * `read`
|
29
|
+
# * `index` or `write`
|
30
30
|
# You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
|
31
31
|
# When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.
|
32
32
|
# When the versions match, the document is updated and the version number is incremented.
|
33
33
|
# If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.
|
34
|
-
# You can opt to count version conflicts instead of halting and returning by setting
|
35
|
-
# Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than
|
34
|
+
# You can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.
|
35
|
+
# Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than `max_docs` until it has successfully updated `max_docs` documents or it has gone through every document in the source query.
|
36
36
|
# NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.
|
37
37
|
# While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.
|
38
38
|
# A bulk update request is performed for each batch of matching documents.
|
39
39
|
# Any query or update failures cause the update by query request to fail and the failures are shown in the response.
|
40
40
|
# Any update requests that completed successfully still stick, they are not rolled back.
|
41
|
+
# **Refreshing shards**
|
42
|
+
# Specifying the `refresh` parameter refreshes all shards once the request completes.
|
43
|
+
# This is different to the update API's `refresh` parameter, which causes only the shard
|
44
|
+
# that received the request to be refreshed. Unlike the update API, it does not support
|
45
|
+
# `wait_for`.
|
46
|
+
# **Running update by query asynchronously**
|
47
|
+
# If the request contains `wait_for_completion=false`, Elasticsearch
|
48
|
+
# performs some preflight checks, launches the request, and returns a
|
49
|
+
# {https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks task} you can use to cancel or get the status of the task.
|
50
|
+
# Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`.
|
51
|
+
# **Waiting for active shards**
|
52
|
+
# `wait_for_active_shards` controls how many copies of a shard must be active
|
53
|
+
# before proceeding with the request. See {https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards `wait_for_active_shards`}
|
54
|
+
# for details. `timeout` controls how long each write request waits for unavailable
|
55
|
+
# shards to become available. Both work exactly the way they work in the
|
56
|
+
# {https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk Bulk API}. Update by query uses scrolled searches, so you can also
|
57
|
+
# specify the `scroll` parameter to control how long it keeps the search context
|
58
|
+
# alive, for example `?scroll=10m`. The default is 5 minutes.
|
41
59
|
# **Throttling update requests**
|
42
|
-
# To control the rate at which update by query issues batches of update operations, you can set
|
60
|
+
# To control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.
|
43
61
|
# This pads each batch with a wait time to throttle the rate.
|
44
|
-
# Set
|
62
|
+
# Set `requests_per_second` to `-1` to turn off throttling.
|
45
63
|
# Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
|
46
|
-
# The padding time is the difference between the batch size divided by the
|
47
|
-
# By default the batch size is 1000, so if
|
48
|
-
#
|
64
|
+
# The padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.
|
65
|
+
# By default the batch size is 1000, so if `requests_per_second` is set to `500`:
|
66
|
+
#
|
67
|
+
# ```
|
49
68
|
# target_time = 1000 / 500 per second = 2 seconds
|
50
69
|
# wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
|
51
|
-
#
|
70
|
+
# ```
|
71
|
+
#
|
52
72
|
# Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
|
53
73
|
# This is "bursty" instead of "smooth".
|
54
74
|
# **Slicing**
|
55
75
|
# Update by query supports sliced scroll to parallelize the update process.
|
56
76
|
# This can improve efficiency and provide a convenient way to break the request down into smaller parts.
|
57
|
-
# Setting
|
77
|
+
# Setting `slices` to `auto` chooses a reasonable number for most data streams and indices.
|
58
78
|
# This setting will use one slice per shard, up to a certain limit.
|
59
79
|
# If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
|
60
|
-
# Adding
|
80
|
+
# Adding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:
|
61
81
|
# * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
|
62
|
-
# * Fetching the status of the task for the request with
|
82
|
+
# * Fetching the status of the task for the request with `slices` only contains the status of completed slices.
|
63
83
|
# * These sub-requests are individually addressable for things like cancellation and rethrottling.
|
64
|
-
# * Rethrottling the request with
|
84
|
+
# * Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.
|
65
85
|
# * Canceling the request with slices will cancel each sub-request.
|
66
86
|
# * Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
|
67
|
-
# * Parameters like
|
87
|
+
# * Parameters like `requests_per_second` and `max_docs` on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using `max_docs` with `slices` might not result in exactly `max_docs` documents being updated.
|
68
88
|
# * Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.
|
69
89
|
# If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:
|
70
90
|
# * Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
|
71
91
|
# * Update performance scales linearly across available resources with the number of slices.
|
72
92
|
# Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.
|
73
|
-
#
|
74
|
-
# Update by query supports scripts to update the document source.
|
75
|
-
# As with the update API, you can set +ctx.op+ to change the operation that is performed.
|
76
|
-
# Set +ctx.op = "noop"+ if your script decides that it doesn't have to make any changes.
|
77
|
-
# The update by query operation skips updating the document and increments the +noop+ counter.
|
78
|
-
# Set +ctx.op = "delete"+ if your script decides that the document should be deleted.
|
79
|
-
# The update by query operation deletes the document and increments the +deleted+ counter.
|
80
|
-
# Update by query supports only +index+, +noop+, and +delete+.
|
81
|
-
# Setting +ctx.op+ to anything else is an error.
|
82
|
-
# Setting any other field in +ctx+ is an error.
|
83
|
-
# This API enables you to only modify the source of matching documents; you cannot move them.
|
93
|
+
# Refer to the linked documentation for examples of how to update documents using the `_update_by_query` API:
|
84
94
|
#
|
85
95
|
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search.
|
86
|
-
# It supports wildcards (
|
87
|
-
# To search all data streams or indices, omit this parameter or use
|
88
|
-
# @option arguments [Boolean] :allow_no_indices If
|
96
|
+
# It supports wildcards (`*`).
|
97
|
+
# To search all data streams or indices, omit this parameter or use `*` or `_all`. (*Required*)
|
98
|
+
# @option arguments [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
|
89
99
|
# This behavior applies even if the request targets other open indices.
|
90
|
-
# For example, a request targeting
|
100
|
+
# For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. Server default: true.
|
91
101
|
# @option arguments [String] :analyzer The analyzer to use for the query string.
|
92
|
-
# This parameter can be used only when the
|
93
|
-
# @option arguments [Boolean] :analyze_wildcard If
|
94
|
-
# This parameter can be used only when the
|
95
|
-
# @option arguments [String] :conflicts The preferred behavior when update by query hits version conflicts:
|
96
|
-
# @option arguments [String] :default_operator The default operator for query string query:
|
97
|
-
# This parameter can be used only when the
|
102
|
+
# This parameter can be used only when the `q` query string parameter is specified.
|
103
|
+
# @option arguments [Boolean] :analyze_wildcard If `true`, wildcard and prefix queries are analyzed.
|
104
|
+
# This parameter can be used only when the `q` query string parameter is specified.
|
105
|
+
# @option arguments [String] :conflicts The preferred behavior when update by query hits version conflicts: `abort` or `proceed`. Server default: abort.
|
106
|
+
# @option arguments [String] :default_operator The default operator for query string query: `AND` or `OR`.
|
107
|
+
# This parameter can be used only when the `q` query string parameter is specified. Server default: OR.
|
98
108
|
# @option arguments [String] :df The field to use as default where no field prefix is given in the query string.
|
99
|
-
# This parameter can be used only when the
|
109
|
+
# This parameter can be used only when the `q` query string parameter is specified.
|
100
110
|
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
|
101
111
|
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
102
|
-
# It supports comma-separated values, such as
|
103
|
-
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
|
112
|
+
# It supports comma-separated values, such as `open,hidden`.
|
104
113
|
# @option arguments [Integer] :from Skips the specified number of documents. Server default: 0.
|
105
|
-
# @option arguments [Boolean] :ignore_unavailable If
|
106
|
-
# @option arguments [Boolean] :lenient If
|
107
|
-
# This parameter can be used only when the
|
114
|
+
# @option arguments [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index.
|
115
|
+
# @option arguments [Boolean] :lenient If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
|
116
|
+
# This parameter can be used only when the `q` query string parameter is specified.
|
108
117
|
# @option arguments [Integer] :max_docs The maximum number of documents to process.
|
109
118
|
# It defaults to all documents.
|
110
|
-
# When set to a value less then or equal to
|
119
|
+
# When set to a value less then or equal to `scroll_size` then a scroll will not be used to retrieve the results for the operation.
|
111
120
|
# @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents.
|
112
|
-
# If the index has a default ingest pipeline specified, then setting the value to
|
121
|
+
# If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
|
113
122
|
# If a final pipeline is configured it will always run, regardless of the value of this parameter.
|
114
123
|
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
115
124
|
# It is random by default.
|
116
125
|
# @option arguments [String] :q A query in the Lucene query string syntax.
|
117
|
-
# @option arguments [Boolean] :refresh If
|
118
|
-
# This is different than the update API's
|
119
|
-
# @option arguments [Boolean] :request_cache If
|
126
|
+
# @option arguments [Boolean] :refresh If `true`, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes.
|
127
|
+
# This is different than the update API's `refresh` parameter, which causes just the shard that received the request to be refreshed.
|
128
|
+
# @option arguments [Boolean] :request_cache If `true`, the request cache is used for this request.
|
120
129
|
# It defaults to the index-level setting.
|
121
130
|
# @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1.
|
122
131
|
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
|
@@ -124,10 +133,10 @@ module Elasticsearch
|
|
124
133
|
# @option arguments [Integer] :scroll_size The size of the scroll request that powers the operation. Server default: 1000.
|
125
134
|
# @option arguments [Time] :search_timeout An explicit timeout for each search request.
|
126
135
|
# By default, there is no timeout.
|
127
|
-
# @option arguments [String] :search_type The type of the search operation. Available options include
|
136
|
+
# @option arguments [String] :search_type The type of the search operation. Available options include `query_then_fetch` and `dfs_query_then_fetch`.
|
128
137
|
# @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
|
129
138
|
# @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
|
130
|
-
# @option arguments [Array<String>] :stats The specific
|
139
|
+
# @option arguments [Array<String>] :stats The specific `tag` of the request for logging and statistical purposes.
|
131
140
|
# @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard.
|
132
141
|
# If a query reaches this limit, Elasticsearch terminates the query early.
|
133
142
|
# Elasticsearch collects documents before sorting.IMPORTANT: Use with caution.
|
@@ -138,19 +147,30 @@ module Elasticsearch
|
|
138
147
|
# By default, it is one minute.
|
139
148
|
# This guarantees Elasticsearch waits for at least the timeout before failing.
|
140
149
|
# The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
|
141
|
-
# @option arguments [Boolean] :version If
|
150
|
+
# @option arguments [Boolean] :version If `true`, returns the document version as part of a hit.
|
142
151
|
# @option arguments [Boolean] :version_type Should the document increment the version number (internal) on hit or not (reindex)
|
143
152
|
# @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
|
144
|
-
# Set to
|
145
|
-
# The
|
153
|
+
# Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
|
154
|
+
# The `timeout` parameter controls how long each write request waits for unavailable shards to become available.
|
146
155
|
# Both work exactly the way they work in the bulk API. Server default: 1.
|
147
|
-
# @option arguments [Boolean] :wait_for_completion If
|
148
|
-
# If
|
149
|
-
# Elasticsearch creates a record of this task as a document at
|
156
|
+
# @option arguments [Boolean] :wait_for_completion If `true`, the request blocks until the operation is complete.
|
157
|
+
# If `false`, Elasticsearch performs some preflight checks, launches the request, and returns a task ID that you can use to cancel or get the status of the task.
|
158
|
+
# Elasticsearch creates a record of this task as a document at `.tasks/task/${taskId}`. Server default: true.
|
159
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
160
|
+
# when they occur.
|
161
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
162
|
+
# returned by Elasticsearch.
|
163
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
164
|
+
# For example `"exists_time": "1h"` for humans and
|
165
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
166
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
167
|
+
# only by machines.
|
168
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
169
|
+
# this option for debugging only.
|
150
170
|
# @option arguments [Hash] :headers Custom HTTP headers
|
151
171
|
# @option arguments [Hash] :body request body
|
152
172
|
#
|
153
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
173
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query
|
154
174
|
#
|
155
175
|
def update_by_query(arguments = {})
|
156
176
|
request_opts = { endpoint: arguments[:endpoint] || 'update_by_query' }
|
@@ -27,10 +27,21 @@ module Elasticsearch
|
|
27
27
|
#
|
28
28
|
# @option arguments [String] :task_id The ID for the task. (*Required*)
|
29
29
|
# @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
|
30
|
-
# To turn off throttling, set it to
|
30
|
+
# To turn off throttling, set it to `-1`. Server default: -1.
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
32
|
+
# when they occur.
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
34
|
+
# returned by Elasticsearch.
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
39
|
+
# only by machines.
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
41
|
+
# this option for debugging only.
|
31
42
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
43
|
#
|
33
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
44
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle
|
34
45
|
#
|
35
46
|
def update_by_query_rethrottle(arguments = {})
|
36
47
|
request_opts = { endpoint: arguments[:endpoint] || 'update_by_query_rethrottle' }
|
@@ -24,18 +24,30 @@ module Elasticsearch
|
|
24
24
|
module Actions
|
25
25
|
# Acknowledge a watch.
|
26
26
|
# Acknowledging a watch enables you to manually throttle the execution of the watch's actions.
|
27
|
-
# The acknowledgement state of an action is stored in the
|
27
|
+
# The acknowledgement state of an action is stored in the `status.actions.<id>.ack.state` structure.
|
28
28
|
# IMPORTANT: If the specified watch is currently being executed, this API will return an error
|
29
29
|
# The reason for this behavior is to prevent overwriting the watch status from a watch execution.
|
30
|
-
# Acknowledging an action throttles further executions of that action until its
|
30
|
+
# Acknowledging an action throttles further executions of that action until its `ack.state` is reset to `awaits_successful_execution`.
|
31
31
|
# This happens when the condition of the watch is not met (the condition evaluates to false).
|
32
|
+
# To demonstrate how throttling works in practice and how it can be configured for individual actions within a watch, refer to External documentation.
|
32
33
|
#
|
33
34
|
# @option arguments [String] :watch_id The watch identifier. (*Required*)
|
34
35
|
# @option arguments [String, Array<String>] :action_id A comma-separated list of the action identifiers to acknowledge.
|
35
36
|
# If you omit this parameter, all of the actions of the watch are acknowledged.
|
37
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
38
|
+
# when they occur.
|
39
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
40
|
+
# returned by Elasticsearch.
|
41
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
42
|
+
# For example `"exists_time": "1h"` for humans and
|
43
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
44
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
45
|
+
# only by machines.
|
46
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
47
|
+
# this option for debugging only.
|
36
48
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
49
|
#
|
38
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
50
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch
|
39
51
|
#
|
40
52
|
def ack_watch(arguments = {})
|
41
53
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.ack_watch' }
|
@@ -62,7 +74,7 @@ module Elasticsearch
|
|
62
74
|
else
|
63
75
|
"_watcher/watch/#{Utils.listify(_watch_id)}/_ack"
|
64
76
|
end
|
65
|
-
params =
|
77
|
+
params = Utils.process_params(arguments)
|
66
78
|
|
67
79
|
Elasticsearch::API::Response.new(
|
68
80
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -26,9 +26,20 @@ module Elasticsearch
|
|
26
26
|
# A watch can be either active or inactive.
|
27
27
|
#
|
28
28
|
# @option arguments [String] :watch_id The watch identifier. (*Required*)
|
29
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
30
|
+
# when they occur.
|
31
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
32
|
+
# returned by Elasticsearch.
|
33
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
34
|
+
# For example `"exists_time": "1h"` for humans and
|
35
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
36
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
37
|
+
# only by machines.
|
38
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
39
|
+
# this option for debugging only.
|
29
40
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
41
|
#
|
31
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
42
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch
|
32
43
|
#
|
33
44
|
def activate_watch(arguments = {})
|
34
45
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.activate_watch' }
|
@@ -49,7 +60,7 @@ module Elasticsearch
|
|
49
60
|
|
50
61
|
method = Elasticsearch::API::HTTP_PUT
|
51
62
|
path = "_watcher/watch/#{Utils.listify(_watch_id)}/_activate"
|
52
|
-
params =
|
63
|
+
params = Utils.process_params(arguments)
|
53
64
|
|
54
65
|
Elasticsearch::API::Response.new(
|
55
66
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -26,9 +26,20 @@ module Elasticsearch
|
|
26
26
|
# A watch can be either active or inactive.
|
27
27
|
#
|
28
28
|
# @option arguments [String] :watch_id The watch identifier. (*Required*)
|
29
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
30
|
+
# when they occur.
|
31
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
32
|
+
# returned by Elasticsearch.
|
33
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
34
|
+
# For example `"exists_time": "1h"` for humans and
|
35
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
36
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
37
|
+
# only by machines.
|
38
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
39
|
+
# this option for debugging only.
|
29
40
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
41
|
#
|
31
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
42
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch
|
32
43
|
#
|
33
44
|
def deactivate_watch(arguments = {})
|
34
45
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.deactivate_watch' }
|
@@ -49,7 +60,7 @@ module Elasticsearch
|
|
49
60
|
|
50
61
|
method = Elasticsearch::API::HTTP_PUT
|
51
62
|
path = "_watcher/watch/#{Utils.listify(_watch_id)}/_deactivate"
|
52
|
-
params =
|
63
|
+
params = Utils.process_params(arguments)
|
53
64
|
|
54
65
|
Elasticsearch::API::Response.new(
|
55
66
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -23,16 +23,27 @@ module Elasticsearch
|
|
23
23
|
module Watcher
|
24
24
|
module Actions
|
25
25
|
# Delete a watch.
|
26
|
-
# When the watch is removed, the document representing the watch in the
|
26
|
+
# When the watch is removed, the document representing the watch in the `.watches` index is gone and it will never be run again.
|
27
27
|
# Deleting a watch does not delete any watch execution records related to this watch from the watch history.
|
28
28
|
# IMPORTANT: Deleting a watch must be done by using only this API.
|
29
|
-
# Do not delete the watch directly from the
|
30
|
-
# When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the
|
29
|
+
# Do not delete the watch directly from the `.watches` index using the Elasticsearch delete document API
|
30
|
+
# When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the `.watches` index.
|
31
31
|
#
|
32
32
|
# @option arguments [String] :id The watch identifier. (*Required*)
|
33
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
34
|
+
# when they occur.
|
35
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
36
|
+
# returned by Elasticsearch.
|
37
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
38
|
+
# For example `"exists_time": "1h"` for humans and
|
39
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
40
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
41
|
+
# only by machines.
|
42
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
43
|
+
# this option for debugging only.
|
33
44
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
45
|
#
|
35
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-delete-watch
|
36
47
|
#
|
37
48
|
def delete_watch(arguments = {})
|
38
49
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.delete_watch' }
|
@@ -30,15 +30,27 @@ module Elasticsearch
|
|
30
30
|
# You can use the run watch API to run watches that are not yet registered by specifying the watch definition inline.
|
31
31
|
# This serves as great tool for testing and debugging your watches prior to adding them to Watcher.
|
32
32
|
# When Elasticsearch security features are enabled on your cluster, watches are run with the privileges of the user that stored the watches.
|
33
|
-
# If your user is allowed to read index
|
33
|
+
# If your user is allowed to read index `a`, but not index `b`, then the exact same set of rules will apply during execution of a watch.
|
34
34
|
# When using the run watch API, the authorization data of the user that called the API will be used as a base, instead of the information who stored the watch.
|
35
|
+
# Refer to the external documentation for examples of watch execution requests, including existing, customized, and inline watches.
|
35
36
|
#
|
36
37
|
# @option arguments [String] :id The watch identifier.
|
37
38
|
# @option arguments [Boolean] :debug Defines whether the watch runs in debug mode.
|
39
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
40
|
+
# when they occur.
|
41
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
42
|
+
# returned by Elasticsearch.
|
43
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
44
|
+
# For example `"exists_time": "1h"` for humans and
|
45
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
46
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
47
|
+
# only by machines.
|
48
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
49
|
+
# this option for debugging only.
|
38
50
|
# @option arguments [Hash] :headers Custom HTTP headers
|
39
51
|
# @option arguments [Hash] :body request body
|
40
52
|
#
|
41
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
53
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch
|
42
54
|
#
|
43
55
|
def execute_watch(arguments = {})
|
44
56
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.execute_watch' }
|
@@ -23,14 +23,25 @@ module Elasticsearch
|
|
23
23
|
module Watcher
|
24
24
|
module Actions
|
25
25
|
# Get Watcher index settings.
|
26
|
-
# Get settings for the Watcher internal index (
|
27
|
-
# Only a subset of settings are shown, for example
|
26
|
+
# Get settings for the Watcher internal index (`.watches`).
|
27
|
+
# Only a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
|
28
28
|
#
|
29
29
|
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
30
30
|
# If no response is received before the timeout expires, the request fails and returns an error.
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
32
|
+
# when they occur.
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
34
|
+
# returned by Elasticsearch.
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
39
|
+
# only by machines.
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
41
|
+
# this option for debugging only.
|
31
42
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
43
|
#
|
33
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
44
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-settings
|
34
45
|
#
|
35
46
|
def get_settings(arguments = {})
|
36
47
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_settings' }
|
@@ -25,9 +25,20 @@ module Elasticsearch
|
|
25
25
|
# Get a watch.
|
26
26
|
#
|
27
27
|
# @option arguments [String] :id The watch identifier. (*Required*)
|
28
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
29
|
+
# when they occur.
|
30
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
31
|
+
# returned by Elasticsearch.
|
32
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
33
|
+
# For example `"exists_time": "1h"` for humans and
|
34
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
35
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
36
|
+
# only by machines.
|
37
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
38
|
+
# this option for debugging only.
|
28
39
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
40
|
#
|
30
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
41
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch
|
31
42
|
#
|
32
43
|
def get_watch(arguments = {})
|
33
44
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.get_watch' }
|
@@ -48,7 +59,7 @@ module Elasticsearch
|
|
48
59
|
|
49
60
|
method = Elasticsearch::API::HTTP_GET
|
50
61
|
path = "_watcher/watch/#{Utils.listify(_id)}"
|
51
|
-
params =
|
62
|
+
params = Utils.process_params(arguments)
|
52
63
|
|
53
64
|
Elasticsearch::API::Response.new(
|
54
65
|
perform_request(method, path, params, body, headers, request_opts)
|
@@ -23,25 +23,36 @@ module Elasticsearch
|
|
23
23
|
module Watcher
|
24
24
|
module Actions
|
25
25
|
# Create or update a watch.
|
26
|
-
# When a watch is registered, a new document that represents the watch is added to the
|
27
|
-
# Typically for the
|
26
|
+
# When a watch is registered, a new document that represents the watch is added to the `.watches` index and its trigger is immediately registered with the relevant trigger engine.
|
27
|
+
# Typically for the `schedule` trigger, the scheduler is the trigger engine.
|
28
28
|
# IMPORTANT: You must use Kibana or this API to create a watch.
|
29
|
-
# Do not add a watch directly to the
|
30
|
-
# If Elasticsearch security features are enabled, do not give users write privileges on the
|
29
|
+
# Do not add a watch directly to the `.watches` index by using the Elasticsearch index API.
|
30
|
+
# If Elasticsearch security features are enabled, do not give users write privileges on the `.watches` index.
|
31
31
|
# When you add a watch you can also define its initial active state by setting the *active* parameter.
|
32
32
|
# When Elasticsearch security features are enabled, your watch can index or search only on indices for which the user that stored the watch has privileges.
|
33
|
-
# If the user is able to read index
|
33
|
+
# If the user is able to read index `a`, but not index `b`, the same will apply when the watch runs.
|
34
34
|
#
|
35
35
|
# @option arguments [String] :id The identifier for the watch. (*Required*)
|
36
36
|
# @option arguments [Boolean] :active The initial state of the watch.
|
37
|
-
# The default value is
|
37
|
+
# The default value is `true`, which means the watch is active by default. Server default: true.
|
38
38
|
# @option arguments [Integer] :if_primary_term only update the watch if the last operation that has changed the watch has the specified primary term
|
39
39
|
# @option arguments [Integer] :if_seq_no only update the watch if the last operation that has changed the watch has the specified sequence number
|
40
40
|
# @option arguments [Integer] :version Explicit version number for concurrency control
|
41
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
42
|
+
# when they occur.
|
43
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
44
|
+
# returned by Elasticsearch.
|
45
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
46
|
+
# For example `"exists_time": "1h"` for humans and
|
47
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
48
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
49
|
+
# only by machines.
|
50
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
51
|
+
# this option for debugging only.
|
41
52
|
# @option arguments [Hash] :headers Custom HTTP headers
|
42
53
|
# @option arguments [Hash] :body request body
|
43
54
|
#
|
44
|
-
# @see https://www.elastic.co/docs/api/doc/elasticsearch/
|
55
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-put-watch
|
45
56
|
#
|
46
57
|
def put_watch(arguments = {})
|
47
58
|
request_opts = { endpoint: arguments[:endpoint] || 'watcher.put_watch' }
|