elasticsearch-api 7.6.0 → 7.7.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/elasticsearch-api.gemspec +7 -2
- 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/freeze.rb +4 -0
- 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/unfreeze.rb +4 -0
- 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 +8 -5
- 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/freeze_spec.rb +4 -0
- 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/unfreeze_spec.rb +4 -0
- 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 +13 -8
- 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/spec/rest_yaml_tests_helper.rb +4 -0
- data/utils/thor/generator/endpoint_specifics.rb +1 -3
- data/utils/thor/generator/files_helper.rb +10 -0
- 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 +14 -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
@@ -16,8 +16,9 @@ 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
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
21
22
|
# @option arguments [Hash] :body The mapping definition (*Required*)
|
22
23
|
#
|
23
24
|
# *Deprecation notice*:
|
@@ -25,11 +26,13 @@ module Elasticsearch
|
|
25
26
|
# Deprecated since version 7.0.0
|
26
27
|
#
|
27
28
|
#
|
28
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-put-mapping.html
|
29
30
|
#
|
30
31
|
def put_mapping(arguments = {})
|
31
32
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
32
33
|
|
34
|
+
headers = arguments.delete(:headers) || {}
|
35
|
+
|
33
36
|
arguments = arguments.clone
|
34
37
|
|
35
38
|
_index = arguments.delete(:index)
|
@@ -47,7 +50,7 @@ module Elasticsearch
|
|
47
50
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
48
51
|
|
49
52
|
body = arguments[:body]
|
50
|
-
perform_request(method, path, params, body).body
|
53
|
+
perform_request(method, path, params, body, headers).body
|
51
54
|
end
|
52
55
|
|
53
56
|
# Register this action with its valid params when the module is loaded.
|
@@ -15,17 +15,19 @@ module Elasticsearch
|
|
15
15
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
16
16
|
# @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)
|
17
17
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
18
|
-
# (options: open,closed,none,all)
|
18
|
+
# (options: open,closed,hidden,none,all)
|
19
19
|
|
20
20
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
21
|
-
|
21
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
22
22
|
# @option arguments [Hash] :body The index settings to be updated (*Required*)
|
23
23
|
#
|
24
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
24
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-update-settings.html
|
25
25
|
#
|
26
26
|
def put_settings(arguments = {})
|
27
27
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
28
28
|
|
29
|
+
headers = arguments.delete(:headers) || {}
|
30
|
+
|
29
31
|
arguments = arguments.clone
|
30
32
|
|
31
33
|
_index = arguments.delete(:index)
|
@@ -39,7 +41,7 @@ module Elasticsearch
|
|
39
41
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
40
42
|
|
41
43
|
body = arguments[:body]
|
42
|
-
perform_request(method, path, params, body).body
|
44
|
+
perform_request(method, path, params, body, headers).body
|
43
45
|
end
|
44
46
|
|
45
47
|
# Register this action with its valid params when the module is loaded.
|
@@ -13,15 +13,17 @@ module Elasticsearch
|
|
13
13
|
# @option arguments [Number] :order The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
|
14
14
|
# @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one
|
15
15
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
16
|
-
|
16
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
17
17
|
# @option arguments [Hash] :body The template definition (*Required*)
|
18
18
|
#
|
19
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-templates.html
|
20
20
|
#
|
21
21
|
def put_template(arguments = {})
|
22
22
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
23
23
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
24
24
|
|
25
|
+
headers = arguments.delete(:headers) || {}
|
26
|
+
|
25
27
|
arguments = arguments.clone
|
26
28
|
|
27
29
|
_name = arguments.delete(:name)
|
@@ -31,7 +33,7 @@ module Elasticsearch
|
|
31
33
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
32
34
|
|
33
35
|
body = arguments[:body]
|
34
|
-
perform_request(method, path, params, body).body
|
36
|
+
perform_request(method, path, params, body, headers).body
|
35
37
|
end
|
36
38
|
|
37
39
|
# Register this action with its valid params when the module is loaded.
|
@@ -11,11 +11,13 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
12
12
|
# @option arguments [Boolean] :detailed Whether to display detailed information about shard recovery
|
13
13
|
# @option arguments [Boolean] :active_only Display only those recoveries that are currently on-going
|
14
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
15
15
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-recovery.html
|
17
17
|
#
|
18
18
|
def recovery(arguments = {})
|
19
|
+
headers = arguments.delete(:headers) || {}
|
20
|
+
|
19
21
|
arguments = arguments.clone
|
20
22
|
|
21
23
|
_index = arguments.delete(:index)
|
@@ -25,11 +27,11 @@ module Elasticsearch
|
|
25
27
|
"#{Utils.__listify(_index)}/_recovery"
|
26
28
|
else
|
27
29
|
"_recovery"
|
28
|
-
end
|
30
|
+
end
|
29
31
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
30
32
|
|
31
33
|
body = nil
|
32
|
-
perform_request(method, path, params, body).body
|
34
|
+
perform_request(method, path, params, body, headers).body
|
33
35
|
end
|
34
36
|
|
35
37
|
# Register this action with its valid params when the module is loaded.
|
@@ -12,12 +12,15 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
13
13
|
# @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)
|
14
14
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
15
|
-
# (options: open,closed,none,all)
|
15
|
+
# (options: open,closed,hidden,none,all)
|
16
16
|
|
17
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
17
18
|
#
|
18
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
19
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-refresh.html
|
19
20
|
#
|
20
21
|
def refresh(arguments = {})
|
22
|
+
headers = arguments.delete(:headers) || {}
|
23
|
+
|
21
24
|
arguments = arguments.clone
|
22
25
|
|
23
26
|
_index = arguments.delete(:index)
|
@@ -27,11 +30,11 @@ module Elasticsearch
|
|
27
30
|
"#{Utils.__listify(_index)}/_refresh"
|
28
31
|
else
|
29
32
|
"_refresh"
|
30
|
-
end
|
33
|
+
end
|
31
34
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
32
35
|
|
33
36
|
body = nil
|
34
|
-
perform_request(method, path, params, body).body
|
37
|
+
perform_request(method, path, params, body, headers).body
|
35
38
|
end
|
36
39
|
|
37
40
|
# Register this action with its valid params when the module is loaded.
|
@@ -16,14 +16,16 @@ module Elasticsearch
|
|
16
16
|
# @option arguments [Boolean] :dry_run If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
|
17
17
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
18
18
|
# @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the newly created rollover index before the operation returns.
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
# @option arguments [Hash] :body The conditions that needs to be met for executing rollover
|
21
21
|
#
|
22
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-rollover-index.html
|
23
23
|
#
|
24
24
|
def rollover(arguments = {})
|
25
25
|
raise ArgumentError, "Required argument 'alias' missing" unless arguments[:alias]
|
26
26
|
|
27
|
+
headers = arguments.delete(:headers) || {}
|
28
|
+
|
27
29
|
arguments = arguments.clone
|
28
30
|
|
29
31
|
_alias = arguments.delete(:alias)
|
@@ -39,7 +41,7 @@ module Elasticsearch
|
|
39
41
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
40
42
|
|
41
43
|
body = arguments[:body]
|
42
|
-
perform_request(method, path, params, body).body
|
44
|
+
perform_request(method, path, params, body, headers).body
|
43
45
|
end
|
44
46
|
|
45
47
|
# Register this action with its valid params when the module is loaded.
|
@@ -12,14 +12,16 @@ module Elasticsearch
|
|
12
12
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
13
13
|
# @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)
|
14
14
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
15
|
-
# (options: open,closed,none,all)
|
15
|
+
# (options: open,closed,hidden,none,all)
|
16
16
|
|
17
17
|
# @option arguments [Boolean] :verbose Includes detailed memory usage by Lucene.
|
18
|
-
|
18
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
19
19
|
#
|
20
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-segments.html
|
21
21
|
#
|
22
22
|
def segments(arguments = {})
|
23
|
+
headers = arguments.delete(:headers) || {}
|
24
|
+
|
23
25
|
arguments = arguments.clone
|
24
26
|
|
25
27
|
_index = arguments.delete(:index)
|
@@ -29,11 +31,11 @@ module Elasticsearch
|
|
29
31
|
"#{Utils.__listify(_index)}/_segments"
|
30
32
|
else
|
31
33
|
"_segments"
|
32
|
-
end
|
34
|
+
end
|
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.
|
@@ -15,12 +15,15 @@ module Elasticsearch
|
|
15
15
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
16
16
|
# @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)
|
17
17
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
18
|
-
# (options: open,closed,none,all)
|
18
|
+
# (options: open,closed,hidden,none,all)
|
19
19
|
|
20
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
21
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
22
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-shards-stores.html
|
22
23
|
#
|
23
24
|
def shard_stores(arguments = {})
|
25
|
+
headers = arguments.delete(:headers) || {}
|
26
|
+
|
24
27
|
arguments = arguments.clone
|
25
28
|
|
26
29
|
_index = arguments.delete(:index)
|
@@ -30,11 +33,11 @@ module Elasticsearch
|
|
30
33
|
"#{Utils.__listify(_index)}/_shard_stores"
|
31
34
|
else
|
32
35
|
"_shard_stores"
|
33
|
-
end
|
36
|
+
end
|
34
37
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
35
38
|
|
36
39
|
body = nil
|
37
|
-
perform_request(method, path, params, body).body
|
40
|
+
perform_request(method, path, params, body, headers).body
|
38
41
|
end
|
39
42
|
|
40
43
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,15 +14,17 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [Time] :timeout Explicit operation timeout
|
15
15
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
16
16
|
# @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns.
|
17
|
-
|
17
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
18
18
|
# @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`)
|
19
19
|
#
|
20
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-shrink-index.html
|
21
21
|
#
|
22
22
|
def shrink(arguments = {})
|
23
23
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
24
24
|
raise ArgumentError, "Required argument 'target' missing" unless arguments[:target]
|
25
25
|
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
26
28
|
arguments = arguments.clone
|
27
29
|
|
28
30
|
_index = arguments.delete(:index)
|
@@ -34,7 +36,7 @@ module Elasticsearch
|
|
34
36
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
35
37
|
|
36
38
|
body = arguments[:body]
|
37
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
38
40
|
end
|
39
41
|
|
40
42
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,15 +14,17 @@ module Elasticsearch
|
|
14
14
|
# @option arguments [Time] :timeout Explicit operation timeout
|
15
15
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
16
16
|
# @option arguments [String] :wait_for_active_shards Set the number of active shards to wait for on the shrunken index before the operation returns.
|
17
|
-
|
17
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
18
18
|
# @option arguments [Hash] :body The configuration for the target index (`settings` and `aliases`)
|
19
19
|
#
|
20
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-split-index.html
|
21
21
|
#
|
22
22
|
def split(arguments = {})
|
23
23
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
24
24
|
raise ArgumentError, "Required argument 'target' missing" unless arguments[:target]
|
25
25
|
|
26
|
+
headers = arguments.delete(:headers) || {}
|
27
|
+
|
26
28
|
arguments = arguments.clone
|
27
29
|
|
28
30
|
_index = arguments.delete(:index)
|
@@ -34,7 +36,7 @@ module Elasticsearch
|
|
34
36
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
35
37
|
|
36
38
|
body = arguments[:body]
|
37
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
38
40
|
end
|
39
41
|
|
40
42
|
# Register this action with its valid params when the module is loaded.
|
@@ -23,14 +23,16 @@ module Elasticsearch
|
|
23
23
|
# @option arguments [Boolean] :include_segment_file_sizes Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested)
|
24
24
|
# @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory
|
25
25
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
26
|
-
# (options: open,closed,none,all)
|
26
|
+
# (options: open,closed,hidden,none,all)
|
27
27
|
|
28
28
|
# @option arguments [Boolean] :forbid_closed_indices If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices
|
29
|
-
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-stats.html
|
32
32
|
#
|
33
33
|
def stats(arguments = {})
|
34
|
+
headers = arguments.delete(:headers) || {}
|
35
|
+
|
34
36
|
method = HTTP_GET
|
35
37
|
parts = Utils.__extract_parts arguments, ParamsRegistry.get(:stats_parts)
|
36
38
|
path = Utils.__pathify Utils.__listify(arguments[:index]), '_stats', Utils.__listify(parts)
|
@@ -39,7 +41,7 @@ module Elasticsearch
|
|
39
41
|
params[:groups] = Utils.__listify(params[:groups], :escape => false) if params[:groups]
|
40
42
|
|
41
43
|
body = nil
|
42
|
-
perform_request(method, path, params, body).body
|
44
|
+
perform_request(method, path, params, body, headers).body
|
43
45
|
end
|
44
46
|
|
45
47
|
# Register this action with its valid params when the module is loaded.
|
@@ -10,14 +10,16 @@ module Elasticsearch
|
|
10
10
|
#
|
11
11
|
# @option arguments [Time] :timeout Request timeout
|
12
12
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
13
|
-
|
13
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
14
14
|
# @option arguments [Hash] :body The definition of `actions` to perform (*Required*)
|
15
15
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-aliases.html
|
17
17
|
#
|
18
18
|
def update_aliases(arguments = {})
|
19
19
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
20
20
|
|
21
|
+
headers = arguments.delete(:headers) || {}
|
22
|
+
|
21
23
|
arguments = arguments.clone
|
22
24
|
|
23
25
|
method = Elasticsearch::API::HTTP_POST
|
@@ -25,7 +27,7 @@ module Elasticsearch
|
|
25
27
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
26
28
|
|
27
29
|
body = arguments[:body]
|
28
|
-
perform_request(method, path, params, body).body
|
30
|
+
perform_request(method, path, params, body, headers).body
|
29
31
|
end
|
30
32
|
|
31
33
|
# Register this action with its valid params when the module is loaded.
|
@@ -11,16 +11,18 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
12
12
|
# @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)
|
13
13
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
|
14
|
-
# (options: open,closed,none,all)
|
14
|
+
# (options: open,closed,hidden,none,all)
|
15
15
|
|
16
16
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
17
17
|
# @option arguments [Boolean] :wait_for_completion Specify whether the request should block until the all segments are upgraded (default: false)
|
18
18
|
# @option arguments [Boolean] :only_ancient_segments If true, only ancient (an older Lucene major release) segments will be upgraded
|
19
|
-
|
19
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
20
20
|
#
|
21
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
21
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-upgrade.html
|
22
22
|
#
|
23
23
|
def upgrade(arguments = {})
|
24
|
+
headers = arguments.delete(:headers) || {}
|
25
|
+
|
24
26
|
arguments = arguments.clone
|
25
27
|
|
26
28
|
_index = arguments.delete(:index)
|
@@ -30,11 +32,11 @@ module Elasticsearch
|
|
30
32
|
"#{Utils.__listify(_index)}/_upgrade"
|
31
33
|
else
|
32
34
|
"_upgrade"
|
33
|
-
end
|
35
|
+
end
|
34
36
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
35
37
|
|
36
38
|
body = nil
|
37
|
-
perform_request(method, path, params, body).body
|
39
|
+
perform_request(method, path, params, body, headers).body
|
38
40
|
end
|
39
41
|
|
40
42
|
# Register this action with its valid params when the module is loaded.
|
@@ -14,7 +14,7 @@ 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
19
|
# @option arguments [String] :q Query in the Lucene query string syntax
|
20
20
|
# @option arguments [String] :analyzer The analyzer to use for the query string
|
@@ -26,7 +26,7 @@ module Elasticsearch
|
|
26
26
|
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
27
27
|
# @option arguments [Boolean] :rewrite Provide a more detailed explanation showing the actual Lucene query that will be executed.
|
28
28
|
# @option arguments [Boolean] :all_shards Execute validation on all shards instead of one random shard per index
|
29
|
-
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
# @option arguments [Hash] :body The query definition specified with the Query DSL
|
31
31
|
#
|
32
32
|
# *Deprecation notice*:
|
@@ -34,9 +34,11 @@ module Elasticsearch
|
|
34
34
|
# Deprecated since version 7.0.0
|
35
35
|
#
|
36
36
|
#
|
37
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-validate.html
|
38
38
|
#
|
39
39
|
def validate_query(arguments = {})
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
|
+
|
40
42
|
arguments = arguments.clone
|
41
43
|
|
42
44
|
_index = arguments.delete(:index)
|
@@ -50,11 +52,11 @@ module Elasticsearch
|
|
50
52
|
"#{Utils.__listify(_index)}/_validate/query"
|
51
53
|
else
|
52
54
|
"_validate/query"
|
53
|
-
end
|
55
|
+
end
|
54
56
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
55
57
|
|
56
58
|
body = arguments[:body]
|
57
|
-
perform_request(method, path, params, body).body
|
59
|
+
perform_request(method, path, params, body, headers).body
|
58
60
|
end
|
59
61
|
|
60
62
|
# Register this action with its valid params when the module is loaded.
|
@@ -7,11 +7,13 @@ module Elasticsearch
|
|
7
7
|
module Actions
|
8
8
|
# Returns basic information about the cluster.
|
9
9
|
#
|
10
|
-
|
10
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
11
11
|
#
|
12
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
12
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/index.html
|
13
13
|
#
|
14
14
|
def info(arguments = {})
|
15
|
+
headers = arguments.delete(:headers) || {}
|
16
|
+
|
15
17
|
arguments = arguments.clone
|
16
18
|
|
17
19
|
method = Elasticsearch::API::HTTP_GET
|
@@ -19,7 +21,7 @@ module Elasticsearch
|
|
19
21
|
params = {}
|
20
22
|
|
21
23
|
body = nil
|
22
|
-
perform_request(method, path, params, body).body
|
24
|
+
perform_request(method, path, params, body, headers).body
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
@@ -11,13 +11,15 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [String] :id Pipeline ID
|
12
12
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
13
13
|
# @option arguments [Time] :timeout Explicit operation timeout
|
14
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
15
15
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/delete-pipeline-api.html
|
17
17
|
#
|
18
18
|
def delete_pipeline(arguments = {})
|
19
19
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
20
20
|
|
21
|
+
headers = arguments.delete(:headers) || {}
|
22
|
+
|
21
23
|
arguments = arguments.clone
|
22
24
|
|
23
25
|
_id = arguments.delete(:id)
|
@@ -27,7 +29,7 @@ module Elasticsearch
|
|
27
29
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
28
30
|
|
29
31
|
body = nil
|
30
|
-
perform_request(method, path, params, body).body
|
32
|
+
perform_request(method, path, params, body, headers).body
|
31
33
|
end
|
32
34
|
|
33
35
|
# Register this action with its valid params when the module is loaded.
|
@@ -10,11 +10,13 @@ module Elasticsearch
|
|
10
10
|
#
|
11
11
|
# @option arguments [String] :id Comma separated list of pipeline ids. Wildcards supported
|
12
12
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
13
|
-
|
13
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
14
14
|
#
|
15
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
15
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/get-pipeline-api.html
|
16
16
|
#
|
17
17
|
def get_pipeline(arguments = {})
|
18
|
+
headers = arguments.delete(:headers) || {}
|
19
|
+
|
18
20
|
arguments = arguments.clone
|
19
21
|
|
20
22
|
_id = arguments.delete(:id)
|
@@ -24,11 +26,11 @@ module Elasticsearch
|
|
24
26
|
"_ingest/pipeline/#{Utils.__listify(_id)}"
|
25
27
|
else
|
26
28
|
"_ingest/pipeline"
|
27
|
-
end
|
29
|
+
end
|
28
30
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
29
31
|
|
30
32
|
body = nil
|
31
|
-
perform_request(method, path, params, body).body
|
33
|
+
perform_request(method, path, params, body, headers).body
|
32
34
|
end
|
33
35
|
|
34
36
|
# Register this action with its valid params when the module is loaded.
|
@@ -8,11 +8,13 @@ module Elasticsearch
|
|
8
8
|
module Actions
|
9
9
|
# Returns a list of the built-in patterns.
|
10
10
|
#
|
11
|
-
|
11
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
12
12
|
#
|
13
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
13
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/grok-processor.html#grok-processor-rest-get
|
14
14
|
#
|
15
15
|
def processor_grok(arguments = {})
|
16
|
+
headers = arguments.delete(:headers) || {}
|
17
|
+
|
16
18
|
arguments = arguments.clone
|
17
19
|
|
18
20
|
method = Elasticsearch::API::HTTP_GET
|
@@ -20,7 +22,7 @@ module Elasticsearch
|
|
20
22
|
params = {}
|
21
23
|
|
22
24
|
body = nil
|
23
|
-
perform_request(method, path, params, body).body
|
25
|
+
perform_request(method, path, params, body, headers).body
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
@@ -11,15 +11,17 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [String] :id Pipeline ID
|
12
12
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
13
13
|
# @option arguments [Time] :timeout Explicit operation timeout
|
14
|
-
|
14
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
15
15
|
# @option arguments [Hash] :body The ingest definition (*Required*)
|
16
16
|
#
|
17
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
17
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/put-pipeline-api.html
|
18
18
|
#
|
19
19
|
def put_pipeline(arguments = {})
|
20
20
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
21
21
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
22
22
|
|
23
|
+
headers = arguments.delete(:headers) || {}
|
24
|
+
|
23
25
|
arguments = arguments.clone
|
24
26
|
|
25
27
|
_id = arguments.delete(:id)
|
@@ -29,7 +31,7 @@ module Elasticsearch
|
|
29
31
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
30
32
|
|
31
33
|
body = arguments[:body]
|
32
|
-
perform_request(method, path, params, body).body
|
34
|
+
perform_request(method, path, params, body, headers).body
|
33
35
|
end
|
34
36
|
|
35
37
|
# Register this action with its valid params when the module is loaded.
|
@@ -10,14 +10,16 @@ module Elasticsearch
|
|
10
10
|
#
|
11
11
|
# @option arguments [String] :id Pipeline ID
|
12
12
|
# @option arguments [Boolean] :verbose Verbose mode. Display data output for each processor in executed pipeline
|
13
|
-
|
13
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
14
14
|
# @option arguments [Hash] :body The simulate definition (*Required*)
|
15
15
|
#
|
16
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.
|
16
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/simulate-pipeline-api.html
|
17
17
|
#
|
18
18
|
def simulate(arguments = {})
|
19
19
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
20
20
|
|
21
|
+
headers = arguments.delete(:headers) || {}
|
22
|
+
|
21
23
|
arguments = arguments.clone
|
22
24
|
|
23
25
|
_id = arguments.delete(:id)
|
@@ -31,7 +33,7 @@ module Elasticsearch
|
|
31
33
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
32
34
|
|
33
35
|
body = arguments[:body]
|
34
|
-
perform_request(method, path, params, body).body
|
36
|
+
perform_request(method, path, params, body, headers).body
|
35
37
|
end
|
36
38
|
|
37
39
|
# Register this action with its valid params when the module is loaded.
|