elasticsearch-api 7.6.0 → 7.7.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/bulk.rb +6 -3
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -4
- data/lib/elasticsearch/api/actions/cat/allocation.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/count.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/health.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/help.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/indices.rb +11 -5
- data/lib/elasticsearch/api/actions/cat/master.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/nodes.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/plugins.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/recovery.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/repositories.rb +5 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/shards.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +7 -5
- data/lib/elasticsearch/api/actions/cat/tasks.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/templates.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +6 -4
- data/lib/elasticsearch/api/actions/clear_scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +45 -0
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +47 -0
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/health.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +49 -0
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +5 -3
- data/lib/elasticsearch/api/actions/cluster/state.rb +7 -4
- data/lib/elasticsearch/api/actions/cluster/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/count.rb +8 -6
- data/lib/elasticsearch/api/actions/create.rb +2 -2
- data/lib/elasticsearch/api/actions/delete.rb +6 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/delete_script.rb +5 -3
- data/lib/elasticsearch/api/actions/exists.rb +5 -2
- data/lib/elasticsearch/api/actions/exists_source.rb +5 -2
- data/lib/elasticsearch/api/actions/explain.rb +5 -3
- data/lib/elasticsearch/api/actions/field_caps.rb +7 -5
- data/lib/elasticsearch/api/actions/get.rb +6 -3
- data/lib/elasticsearch/api/actions/get_script.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_context.rb +5 -3
- data/lib/elasticsearch/api/actions/get_script_languages.rb +5 -3
- data/lib/elasticsearch/api/actions/get_source.rb +5 -2
- data/lib/elasticsearch/api/actions/index.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/clone.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/close.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/create.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +35 -0
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/flush.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +37 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/get_template.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/open.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -3
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/put_template.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/recovery.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/refresh.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/rollover.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/segments.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/shrink.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/split.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +5 -3
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +7 -5
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +7 -5
- data/lib/elasticsearch/api/actions/info.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +6 -4
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +5 -3
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -3
- data/lib/elasticsearch/api/actions/mget.rb +5 -3
- data/lib/elasticsearch/api/actions/msearch.rb +7 -4
- data/lib/elasticsearch/api/actions/msearch_template.rb +6 -3
- data/lib/elasticsearch/api/actions/mtermvectors.rb +6 -3
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/info.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +6 -4
- data/lib/elasticsearch/api/actions/nodes/usage.rb +6 -4
- data/lib/elasticsearch/api/actions/ping.rb +5 -3
- data/lib/elasticsearch/api/actions/put_script.rb +5 -3
- data/lib/elasticsearch/api/actions/rank_eval.rb +6 -3
- data/lib/elasticsearch/api/actions/reindex.rb +6 -4
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/actions/render_search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +5 -3
- data/lib/elasticsearch/api/actions/scroll.rb +6 -4
- data/lib/elasticsearch/api/actions/search.rb +8 -6
- data/lib/elasticsearch/api/actions/search_shards.rb +7 -4
- data/lib/elasticsearch/api/actions/search_template.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +6 -5
- data/lib/elasticsearch/api/actions/snapshot/create.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get.rb +6 -4
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +5 -3
- data/lib/elasticsearch/api/actions/snapshot/status.rb +7 -5
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +6 -4
- data/lib/elasticsearch/api/actions/tasks/get.rb +5 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
- data/lib/elasticsearch/api/actions/termvectors.rb +5 -2
- data/lib/elasticsearch/api/actions/update.rb +6 -4
- data/lib/elasticsearch/api/actions/update_by_query.rb +7 -5
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +5 -3
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +8 -4
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/index_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/mget_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/ping_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/reindex_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +3 -2
- data/spec/elasticsearch/api/actions/update_document_spec.rb +2 -1
- data/utils/thor/generator/endpoint_specifics.rb +1 -1
- data/utils/thor/templates/_documentation_top.erb +3 -2
- data/utils/thor/templates/_perform_request.erb +6 -5
- data/utils/thor/templates/method.erb +2 -1
- metadata +10 -17
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -28
- data/lib/elasticsearch/api/actions/benchmark.rb +0 -68
- data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -34
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -43
- data/lib/elasticsearch/api/actions/remote/info.rb +0 -24
- data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/benchmark_spec.rb +0 -21
- data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -22
@@ -12,14 +12,16 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [List] :name A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
|
13
13
|
# @option arguments [Time] :timeout Explicit timestamp for the document
|
14
14
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
15
|
-
|
15
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
16
|
#
|
17
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
17
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
18
18
|
#
|
19
19
|
def delete_alias(arguments = {})
|
20
20
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
21
21
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
22
22
|
|
23
|
+
headers = arguments.delete(:headers) || {}
|
24
|
+
|
23
25
|
arguments = arguments.clone
|
24
26
|
|
25
27
|
_index = arguments.delete(:index)
|
@@ -33,7 +35,7 @@ module Elasticsearch
|
|
33
35
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
36
|
|
35
37
|
body = nil
|
36
|
-
perform_request(method, path, params, body).body
|
38
|
+
perform_request(method, path, params, body, headers).body
|
37
39
|
end
|
38
40
|
|
39
41
|
# Register this action with its valid params when the module is loaded.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
module Elasticsearch
|
6
|
+
module API
|
7
|
+
module Indices
|
8
|
+
module Actions
|
9
|
+
# Deletes a data stream.
|
10
|
+
#
|
11
|
+
# @option arguments [String] :name The name of the data stream
|
12
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
13
|
+
#
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
15
|
+
#
|
16
|
+
def delete_data_stream(arguments = {})
|
17
|
+
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
18
|
+
|
19
|
+
headers = arguments.delete(:headers) || {}
|
20
|
+
|
21
|
+
arguments = arguments.clone
|
22
|
+
|
23
|
+
_name = arguments.delete(:name)
|
24
|
+
|
25
|
+
method = Elasticsearch::API::HTTP_DELETE
|
26
|
+
path = "_data_stream/#{Utils.__listify(_name)}"
|
27
|
+
params = {}
|
28
|
+
|
29
|
+
body = nil
|
30
|
+
perform_request(method, path, params, body, headers).body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -11,13 +11,15 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [String] :name The name of the template
|
12
12
|
# @option arguments [Time] :timeout Explicit operation timeout
|
13
13
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
14
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
15
15
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
17
17
|
#
|
18
18
|
def delete_template(arguments = {})
|
19
19
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
20
20
|
|
21
|
+
headers = arguments.delete(:headers) || {}
|
22
|
+
|
21
23
|
arguments = arguments.clone
|
22
24
|
|
23
25
|
_name = arguments.delete(:name)
|
@@ -28,9 +30,9 @@ module Elasticsearch
|
|
28
30
|
|
29
31
|
body = nil
|
30
32
|
if Array(arguments[:ignore]).include?(404)
|
31
|
-
Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
|
33
|
+
Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
|
32
34
|
else
|
33
|
-
perform_request(method, path, params, body).body
|
35
|
+
perform_request(method, path, params, body, headers).body
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
@@ -13,17 +13,19 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false)
|
14
14
|
# @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
15
15
|
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
16
|
-
# (options: open,closed,none,all)
|
16
|
+
# (options: open,closed,hidden,none,all)
|
17
17
|
|
18
18
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
19
19
|
# @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices.
|
20
|
-
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
21
|
#
|
22
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html
|
23
23
|
#
|
24
24
|
def exists(arguments = {})
|
25
25
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
26
26
|
|
27
|
+
headers = arguments.delete(:headers) || {}
|
28
|
+
|
27
29
|
arguments = arguments.clone
|
28
30
|
|
29
31
|
_index = arguments.delete(:index)
|
@@ -35,7 +37,7 @@ module Elasticsearch
|
|
35
37
|
body = nil
|
36
38
|
|
37
39
|
Utils.__rescue_from_not_found do
|
38
|
-
perform_request(method, path, params, body).status == 200 ? true : false
|
40
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -13,16 +13,18 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
14
14
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
15
15
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
16
|
-
# (options: open,closed,none,all)
|
16
|
+
# (options: open,closed,hidden,none,all)
|
17
17
|
|
18
18
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
22
22
|
#
|
23
23
|
def exists_alias(arguments = {})
|
24
24
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
25
25
|
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
26
28
|
arguments = arguments.clone
|
27
29
|
|
28
30
|
_name = arguments.delete(:name)
|
@@ -40,7 +42,7 @@ module Elasticsearch
|
|
40
42
|
body = nil
|
41
43
|
|
42
44
|
Utils.__rescue_from_not_found do
|
43
|
-
perform_request(method, path, params, body).status == 200 ? true : false
|
45
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
@@ -12,13 +12,15 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
13
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
14
14
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
15
|
-
|
15
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
16
16
|
#
|
17
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
17
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html
|
18
18
|
#
|
19
19
|
def exists_template(arguments = {})
|
20
20
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
21
21
|
|
22
|
+
headers = arguments.delete(:headers) || {}
|
23
|
+
|
22
24
|
arguments = arguments.clone
|
23
25
|
|
24
26
|
_name = arguments.delete(:name)
|
@@ -30,7 +32,7 @@ module Elasticsearch
|
|
30
32
|
body = nil
|
31
33
|
|
32
34
|
Utils.__rescue_from_not_found do
|
33
|
-
perform_request(method, path, params, body).status == 200 ? true : false
|
35
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
@@ -13,17 +13,19 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
14
14
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
15
15
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
16
|
-
# (options: open,closed,none,all)
|
16
|
+
# (options: open,closed,hidden,none,all)
|
17
17
|
|
18
18
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html
|
22
22
|
#
|
23
23
|
def exists_type(arguments = {})
|
24
24
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
25
25
|
raise ArgumentError, "Required argument 'type' missing" unless arguments[:type]
|
26
26
|
|
27
|
+
headers = arguments.delete(:headers) || {}
|
28
|
+
|
27
29
|
arguments = arguments.clone
|
28
30
|
|
29
31
|
_index = arguments.delete(:index)
|
@@ -37,7 +39,7 @@ module Elasticsearch
|
|
37
39
|
body = nil
|
38
40
|
|
39
41
|
Utils.__rescue_from_not_found do
|
40
|
-
perform_request(method, path, params, body).status == 200 ? true : false
|
42
|
+
perform_request(method, path, params, body, headers).status == 200 ? true : false
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
@@ -14,12 +14,15 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
15
15
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
16
16
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
17
|
-
# (options: open,closed,none,all)
|
17
|
+
# (options: open,closed,hidden,none,all)
|
18
18
|
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
19
20
|
#
|
20
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html
|
21
22
|
#
|
22
23
|
def flush(arguments = {})
|
24
|
+
headers = arguments.delete(:headers) || {}
|
25
|
+
|
23
26
|
arguments = arguments.clone
|
24
27
|
|
25
28
|
_index = arguments.delete(:index)
|
@@ -29,11 +32,11 @@ module Elasticsearch
|
|
29
32
|
"#{Utils.__listify(_index)}/_flush"
|
30
33
|
else
|
31
34
|
"_flush"
|
32
|
-
end
|
35
|
+
end
|
33
36
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
34
37
|
|
35
38
|
body = nil
|
36
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
37
40
|
end
|
38
41
|
|
39
42
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,10 +14,13 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
15
15
|
# (options: open,closed,none,all)
|
16
16
|
|
17
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
17
18
|
#
|
18
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush-api.html
|
19
20
|
#
|
20
21
|
def flush_synced(arguments = {})
|
22
|
+
headers = arguments.delete(:headers) || {}
|
23
|
+
|
21
24
|
arguments = arguments.clone
|
22
25
|
|
23
26
|
_index = arguments.delete(:index)
|
@@ -27,14 +30,14 @@ module Elasticsearch
|
|
27
30
|
"#{Utils.__listify(_index)}/_flush/synced"
|
28
31
|
else
|
29
32
|
"_flush/synced"
|
30
|
-
end
|
33
|
+
end
|
31
34
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
32
35
|
|
33
36
|
body = nil
|
34
37
|
if Array(arguments[:ignore]).include?(404)
|
35
|
-
Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
|
38
|
+
Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
|
36
39
|
else
|
37
|
-
perform_request(method, path, params, body).body
|
40
|
+
perform_request(method, path, params, body, headers).body
|
38
41
|
end
|
39
42
|
end
|
40
43
|
|
@@ -13,15 +13,17 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
14
14
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
15
15
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
16
|
-
# (options: open,closed,none,all)
|
16
|
+
# (options: open,closed,hidden,none,all)
|
17
17
|
|
18
18
|
# @option arguments [Number] :max_num_segments The number of segments the index should be merged into (default: dynamic)
|
19
19
|
# @option arguments [Boolean] :only_expunge_deletes Specify whether the operation should only expunge deleted documents
|
20
|
-
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
21
|
#
|
22
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html
|
23
23
|
#
|
24
24
|
def forcemerge(arguments = {})
|
25
|
+
headers = arguments.delete(:headers) || {}
|
26
|
+
|
25
27
|
arguments = arguments.clone
|
26
28
|
|
27
29
|
_index = arguments.delete(:index)
|
@@ -31,11 +33,11 @@ module Elasticsearch
|
|
31
33
|
"#{Utils.__listify(_index)}/_forcemerge"
|
32
34
|
else
|
33
35
|
"_forcemerge"
|
34
|
-
end
|
36
|
+
end
|
35
37
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
36
38
|
|
37
39
|
body = nil
|
38
|
-
perform_request(method, path, params, body).body
|
40
|
+
perform_request(method, path, params, body, headers).body
|
39
41
|
end
|
40
42
|
|
41
43
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,18 +14,20 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [Boolean] :ignore_unavailable Ignore unavailable indexes (default: false)
|
15
15
|
# @option arguments [Boolean] :allow_no_indices Ignore if a wildcard expression resolves to no concrete indices (default: false)
|
16
16
|
# @option arguments [String] :expand_wildcards Whether wildcard expressions should get expanded to open or closed indices (default: open)
|
17
|
-
# (options: open,closed,none,all)
|
17
|
+
# (options: open,closed,hidden,none,all)
|
18
18
|
|
19
19
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
20
20
|
# @option arguments [Boolean] :include_defaults Whether to return all default setting for each of the indices.
|
21
21
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
22
|
-
|
22
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
23
23
|
#
|
24
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
24
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html
|
25
25
|
#
|
26
26
|
def get(arguments = {})
|
27
27
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
28
28
|
|
29
|
+
headers = arguments.delete(:headers) || {}
|
30
|
+
|
29
31
|
arguments = arguments.clone
|
30
32
|
|
31
33
|
_index = arguments.delete(:index)
|
@@ -35,7 +37,7 @@ module Elasticsearch
|
|
35
37
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
36
38
|
|
37
39
|
body = nil
|
38
|
-
perform_request(method, path, params, body).body
|
40
|
+
perform_request(method, path, params, body, headers).body
|
39
41
|
end
|
40
42
|
|
41
43
|
# Register this action with its valid params when the module is loaded.
|
@@ -13,14 +13,16 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
14
14
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
15
15
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
16
|
-
# (options: open,closed,none,all)
|
16
|
+
# (options: open,closed,hidden,none,all)
|
17
17
|
|
18
18
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html
|
22
22
|
#
|
23
23
|
def get_alias(arguments = {})
|
24
|
+
headers = arguments.delete(:headers) || {}
|
25
|
+
|
24
26
|
arguments = arguments.clone
|
25
27
|
|
26
28
|
_name = arguments.delete(:name)
|
@@ -36,11 +38,11 @@ module Elasticsearch
|
|
36
38
|
"_alias/#{Utils.__listify(_name)}"
|
37
39
|
else
|
38
40
|
"_alias"
|
39
|
-
end
|
41
|
+
end
|
40
42
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
41
43
|
|
42
44
|
body = nil
|
43
|
-
perform_request(method, path, params, body).body
|
45
|
+
perform_request(method, path, params, body, headers).body
|
44
46
|
end
|
45
47
|
|
46
48
|
# Register this action with its valid params when the module is loaded.
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V under one or more agreements.
|
2
|
+
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
3
|
+
# See the LICENSE file in the project root for more information
|
4
|
+
|
5
|
+
module Elasticsearch
|
6
|
+
module API
|
7
|
+
module Indices
|
8
|
+
module Actions
|
9
|
+
# Returns data streams.
|
10
|
+
#
|
11
|
+
# @option arguments [List] :name The comma separated names of data streams
|
12
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
13
|
+
#
|
14
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
15
|
+
#
|
16
|
+
def get_data_streams(arguments = {})
|
17
|
+
headers = arguments.delete(:headers) || {}
|
18
|
+
|
19
|
+
arguments = arguments.clone
|
20
|
+
|
21
|
+
_name = arguments.delete(:name)
|
22
|
+
|
23
|
+
method = Elasticsearch::API::HTTP_GET
|
24
|
+
path = if _name
|
25
|
+
"_data_streams/#{Utils.__listify(_name)}"
|
26
|
+
else
|
27
|
+
"_data_streams"
|
28
|
+
end
|
29
|
+
params = {}
|
30
|
+
|
31
|
+
body = nil
|
32
|
+
perform_request(method, path, params, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -16,22 +16,24 @@ module Elasticsearch
|
|
16
16
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
17
17
|
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
18
18
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
19
|
-
# (options: open,closed,none,all)
|
19
|
+
# (options: open,closed,hidden,none,all)
|
20
20
|
|
21
21
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
22
|
-
|
22
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
23
23
|
#
|
24
24
|
# *Deprecation notice*:
|
25
25
|
# Specifying types in urls has been deprecated
|
26
26
|
# Deprecated since version 7.0.0
|
27
27
|
#
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html
|
30
30
|
#
|
31
31
|
def get_field_mapping(arguments = {})
|
32
32
|
_fields = arguments.delete(:field) || arguments.delete(:fields)
|
33
33
|
raise ArgumentError, "Required argument 'field' missing" unless _fields
|
34
34
|
|
35
|
+
headers = arguments.delete(:headers) || {}
|
36
|
+
|
35
37
|
arguments = arguments.clone
|
36
38
|
|
37
39
|
_index = arguments.delete(:index)
|
@@ -51,7 +53,7 @@ module Elasticsearch
|
|
51
53
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
52
54
|
|
53
55
|
body = nil
|
54
|
-
perform_request(method, path, params, body).body
|
56
|
+
perform_request(method, path, params, body, headers).body
|
55
57
|
end
|
56
58
|
|
57
59
|
# Register this action with its valid params when the module is loaded.
|