elasticsearch-api 7.4.0 → 7.5.0.pre.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +16 -23
- data/lib/elasticsearch/api/actions/abort_benchmark.rb +1 -2
- data/lib/elasticsearch/api/actions/benchmark.rb +2 -3
- data/lib/elasticsearch/api/actions/bulk.rb +35 -68
- data/lib/elasticsearch/api/actions/cat/aliases.rb +30 -52
- data/lib/elasticsearch/api/actions/cat/allocation.rb +36 -50
- data/lib/elasticsearch/api/actions/cat/count.rb +25 -46
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +31 -33
- data/lib/elasticsearch/api/actions/cat/health.rb +27 -37
- data/lib/elasticsearch/api/actions/cat/help.rb +14 -10
- data/lib/elasticsearch/api/actions/cat/indices.rb +45 -62
- data/lib/elasticsearch/api/actions/cat/master.rb +24 -34
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +20 -16
- data/lib/elasticsearch/api/actions/cat/nodes.rb +34 -46
- data/lib/elasticsearch/api/actions/cat/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +29 -35
- data/lib/elasticsearch/api/actions/cat/plugins.rb +21 -18
- data/lib/elasticsearch/api/actions/cat/recovery.rb +40 -56
- data/lib/elasticsearch/api/actions/cat/repositories.rb +21 -24
- data/lib/elasticsearch/api/actions/cat/segments.rb +29 -22
- data/lib/elasticsearch/api/actions/cat/shards.rb +38 -59
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +32 -27
- data/lib/elasticsearch/api/actions/cat/tasks.rb +25 -19
- data/lib/elasticsearch/api/actions/cat/templates.rb +26 -18
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +36 -46
- data/lib/elasticsearch/api/actions/clear_scroll.rb +21 -8
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +15 -13
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +18 -18
- data/lib/elasticsearch/api/actions/cluster/health.rb +42 -44
- data/lib/elasticsearch/api/actions/cluster/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +15 -17
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +20 -17
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +8 -6
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +25 -37
- data/lib/elasticsearch/api/actions/cluster/state.rb +37 -41
- data/lib/elasticsearch/api/actions/cluster/stats.rb +20 -12
- data/lib/elasticsearch/api/actions/count.rb +52 -39
- data/lib/elasticsearch/api/actions/create.rb +25 -26
- data/lib/elasticsearch/api/actions/delete.rb +43 -36
- data/lib/elasticsearch/api/actions/delete_by_query.rb +74 -62
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +39 -0
- data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +4 -3
- data/lib/elasticsearch/api/actions/delete_script.rb +19 -13
- data/lib/elasticsearch/api/actions/exists.rb +44 -34
- data/lib/elasticsearch/api/actions/exists_source.rb +43 -25
- data/lib/elasticsearch/api/actions/explain.rb +46 -51
- data/lib/elasticsearch/api/actions/field_caps.rb +27 -20
- data/lib/elasticsearch/api/actions/get.rb +42 -41
- data/lib/elasticsearch/api/actions/get_script.rb +19 -14
- data/lib/elasticsearch/api/actions/get_source.rb +38 -44
- data/lib/elasticsearch/api/actions/index.rb +60 -89
- data/lib/elasticsearch/api/actions/indices/analyze.rb +19 -48
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +29 -41
- data/lib/elasticsearch/api/actions/indices/clone.rb +21 -21
- data/lib/elasticsearch/api/actions/indices/close.rb +28 -32
- data/lib/elasticsearch/api/actions/indices/create.rb +22 -70
- data/lib/elasticsearch/api/actions/indices/delete.rb +23 -35
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +24 -20
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +18 -20
- data/lib/elasticsearch/api/actions/indices/exists.rb +32 -34
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +33 -29
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +21 -16
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +29 -29
- data/lib/elasticsearch/api/actions/indices/flush.rb +28 -28
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +23 -12
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +26 -41
- data/lib/elasticsearch/api/actions/indices/freeze.rb +7 -8
- data/lib/elasticsearch/api/actions/indices/get.rb +25 -19
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +31 -23
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +42 -38
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +39 -31
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +34 -37
- data/lib/elasticsearch/api/actions/indices/get_template.rb +21 -23
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +48 -0
- data/lib/elasticsearch/api/actions/indices/open.rb +24 -21
- data/lib/elasticsearch/api/actions/indices/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +25 -27
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +40 -39
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +30 -37
- data/lib/elasticsearch/api/actions/indices/put_template.rb +23 -23
- data/lib/elasticsearch/api/actions/indices/recovery.rb +20 -23
- data/lib/elasticsearch/api/actions/indices/refresh.rb +22 -26
- data/lib/elasticsearch/api/actions/indices/rollover.rb +28 -19
- data/lib/elasticsearch/api/actions/indices/segments.rb +24 -17
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +27 -15
- data/lib/elasticsearch/api/actions/indices/shrink.rb +23 -17
- data/lib/elasticsearch/api/actions/indices/split.rb +23 -17
- data/lib/elasticsearch/api/actions/indices/stats.rb +53 -104
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +7 -7
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +15 -32
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +26 -16
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +46 -59
- data/lib/elasticsearch/api/actions/info.rb +9 -6
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +18 -12
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +21 -11
- data/lib/elasticsearch/api/actions/ingest/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +12 -13
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +19 -14
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +23 -13
- data/lib/elasticsearch/api/actions/mget.rb +37 -44
- data/lib/elasticsearch/api/actions/msearch.rb +54 -54
- data/lib/elasticsearch/api/actions/msearch_template.rb +46 -35
- data/lib/elasticsearch/api/actions/mtermvectors.rb +39 -35
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +30 -25
- data/lib/elasticsearch/api/actions/nodes/info.rb +29 -63
- data/lib/elasticsearch/api/actions/nodes/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +24 -22
- data/lib/elasticsearch/api/actions/nodes/shutdown.rb +4 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +43 -36
- data/lib/elasticsearch/api/actions/nodes/usage.rb +31 -10
- data/lib/elasticsearch/api/actions/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/ping.rb +12 -13
- data/lib/elasticsearch/api/actions/put_script.rb +26 -30
- data/lib/elasticsearch/api/actions/rank_eval.rb +24 -15
- data/lib/elasticsearch/api/actions/reindex.rb +25 -48
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +18 -12
- data/lib/elasticsearch/api/actions/remote/info.rb +1 -2
- data/lib/elasticsearch/api/actions/render_search_template.rb +17 -15
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +8 -6
- data/lib/elasticsearch/api/actions/scroll.rb +28 -51
- data/lib/elasticsearch/api/actions/search.rb +104 -165
- data/lib/elasticsearch/api/actions/search_shards.rb +31 -28
- data/lib/elasticsearch/api/actions/search_template.rb +48 -40
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +44 -0
- data/lib/elasticsearch/api/actions/snapshot/create.rb +22 -29
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +19 -24
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +20 -22
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +16 -18
- data/lib/elasticsearch/api/actions/snapshot/get.rb +22 -31
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +21 -25
- data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +21 -32
- data/lib/elasticsearch/api/actions/snapshot/status.rb +23 -24
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +18 -13
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +19 -13
- data/lib/elasticsearch/api/actions/tasks/get.rb +16 -13
- data/lib/elasticsearch/api/actions/tasks/list.rb +20 -18
- data/lib/elasticsearch/api/actions/tasks/params_registry.rb +0 -1
- data/lib/elasticsearch/api/actions/termvectors.rb +52 -70
- data/lib/elasticsearch/api/actions/update.rb +53 -98
- data/lib/elasticsearch/api/actions/update_by_query.rb +77 -66
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +17 -11
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +9 -11
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/count_spec.rb +8 -8
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +12 -7
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +0 -14
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/index_document_spec.rb +6 -15
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -4
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -5
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +2 -2
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +0 -11
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -1
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +3 -3
- data/spec/elasticsearch/api/actions/put_script_spec.rb +20 -15
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +23 -7
- data/spec/elasticsearch/api/actions/scroll_spec.rb +37 -0
- data/spec/elasticsearch/api/actions/search_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +0 -11
- data/spec/elasticsearch/api/actions/update_document_spec.rb +3 -7
- data/spec/rest_yaml_tests_helper.rb +12 -0
- data/utils/Gemfile +1 -0
- data/utils/Thorfile +0 -1
- data/utils/thor/generate_source.rb +192 -85
- data/utils/thor/generator/endpoint_specifics.rb +157 -0
- data/utils/thor/generator/files_helper.rb +37 -0
- data/utils/thor/lister.rb +3 -4
- data/utils/thor/templates/_documentation_top.erb +27 -0
- data/utils/thor/templates/_method_setup.erb +35 -0
- data/utils/thor/templates/_params_registry.erb +12 -0
- data/utils/thor/templates/_perform_request.erb +37 -0
- data/utils/thor/templates/method.erb +59 -0
- data/utils/thor/templates/{ruby/test.erb → test.erb} +0 -0
- data/utils/thor/templates/{ruby/test_helper.rb → test_helper.rb} +0 -0
- metadata +19 -11
- data/spec/elasticsearch/api/actions/scoll_spec.rb +0 -21
- data/utils/thor/generate_api.rb +0 -193
- data/utils/thor/templates/ruby/method.erb +0 -62
@@ -6,39 +6,43 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Display custom node attributes
|
9
|
+
# Returns information about custom node attributes.
|
11
10
|
#
|
11
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
12
12
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
13
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
14
14
|
# @option arguments [List] :h Comma-separated list of column names to display
|
15
15
|
# @option arguments [Boolean] :help Return help information
|
16
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
17
16
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
17
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
18
|
+
|
18
19
|
#
|
19
|
-
# @see
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-nodeattrs.html
|
20
21
|
#
|
21
|
-
def nodeattrs(arguments={})
|
22
|
-
|
22
|
+
def nodeattrs(arguments = {})
|
23
|
+
arguments = arguments.clone
|
24
|
+
|
25
|
+
method = Elasticsearch::API::HTTP_GET
|
23
26
|
path = "_cat/nodeattrs"
|
24
27
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
25
|
-
body = nil
|
26
28
|
|
29
|
+
body = nil
|
27
30
|
perform_request(method, path, params, body).body
|
28
31
|
end
|
29
32
|
|
30
33
|
# Register this action with its valid params when the module is loaded.
|
31
34
|
#
|
32
|
-
# @since 6.
|
35
|
+
# @since 6.2.0
|
33
36
|
ParamsRegistry.register(:nodeattrs, [
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
:format,
|
38
|
+
:local,
|
39
|
+
:master_timeout,
|
40
|
+
:h,
|
41
|
+
:help,
|
42
|
+
:s,
|
43
|
+
:v
|
44
|
+
].freeze)
|
45
|
+
end
|
41
46
|
end
|
42
|
-
end
|
43
47
|
end
|
44
48
|
end
|
@@ -6,66 +6,54 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Display information about cluster topology and nodes statistics
|
11
|
-
#
|
12
|
-
# @example Display basic information about nodes in the cluster (host, node name, memory usage, master, etc.)
|
13
|
-
#
|
14
|
-
# puts client.cat.nodes
|
15
|
-
#
|
16
|
-
# @example Display header names in the output
|
17
|
-
#
|
18
|
-
# puts client.cat.nodes v: true
|
19
|
-
#
|
20
|
-
# @example Display only specific columns in the output (see the `help` parameter)
|
21
|
-
#
|
22
|
-
# puts client.cat.nodes h: %w(name version jdk disk.avail heap.percent load merges.total_time), v: true
|
23
|
-
#
|
24
|
-
# @example Display only specific columns in the output, using the short names
|
25
|
-
#
|
26
|
-
# puts client.cat.nodes h: 'n,v,j,d,hp,l,mtt', v: true
|
27
|
-
#
|
28
|
-
# @example Return the information as Ruby objects
|
29
|
-
#
|
30
|
-
# client.cat.nodes format: 'json'
|
9
|
+
# Returns basic statistics about performance of cluster nodes.
|
31
10
|
#
|
11
|
+
# @option arguments [String] :bytes The unit in which to display byte values
|
12
|
+
# (options: b,k,kb,m,mb,g,gb,t,tb,p,pb)
|
13
|
+
|
14
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
32
15
|
# @option arguments [Boolean] :full_id Return the full node ID instead of the shortened version (default: false)
|
33
|
-
# @option arguments [
|
34
|
-
# @option arguments [Boolean] :v Display column headers as part of the output
|
35
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
36
|
-
# @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
|
37
|
-
# @option arguments [Boolean] :help Return information about headers
|
38
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
39
|
-
# (default: false)
|
16
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
40
17
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
18
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
19
|
+
# @option arguments [Boolean] :help Return help information
|
20
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
21
|
+
# @option arguments [String] :time The unit in which to display time values
|
22
|
+
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
|
23
|
+
|
24
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
25
|
+
|
41
26
|
#
|
42
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
27
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-nodes.html
|
43
28
|
#
|
44
|
-
def nodes(arguments={})
|
45
|
-
|
46
|
-
path = "_cat/nodes"
|
29
|
+
def nodes(arguments = {})
|
30
|
+
arguments = arguments.clone
|
47
31
|
|
32
|
+
method = Elasticsearch::API::HTTP_GET
|
33
|
+
path = "_cat/nodes"
|
48
34
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
49
|
-
params[:h] = Utils.__listify(params[:h], :
|
50
|
-
|
51
|
-
body = nil
|
35
|
+
params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]
|
52
36
|
|
37
|
+
body = nil
|
53
38
|
perform_request(method, path, params, body).body
|
54
39
|
end
|
55
40
|
|
56
41
|
# Register this action with its valid params when the module is loaded.
|
57
42
|
#
|
58
|
-
# @since 6.
|
43
|
+
# @since 6.2.0
|
59
44
|
ParamsRegistry.register(:nodes, [
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
45
|
+
:bytes,
|
46
|
+
:format,
|
47
|
+
:full_id,
|
48
|
+
:local,
|
49
|
+
:master_timeout,
|
50
|
+
:h,
|
51
|
+
:help,
|
52
|
+
:s,
|
53
|
+
:time,
|
54
|
+
:v
|
55
|
+
].freeze)
|
56
|
+
end
|
68
57
|
end
|
69
|
-
end
|
70
58
|
end
|
71
59
|
end
|
@@ -6,54 +6,48 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Display the information from the {Cluster::Actions#pending_tasks} API in a tabular format
|
11
|
-
#
|
12
|
-
# @example
|
13
|
-
#
|
14
|
-
# puts client.cat.pending_tasks
|
15
|
-
#
|
16
|
-
# @example Display header names in the output
|
17
|
-
#
|
18
|
-
# puts client.cat.pending_tasks v: true
|
19
|
-
#
|
20
|
-
# @example Return the information as Ruby objects
|
21
|
-
#
|
22
|
-
# client.cat.pending_tasks format: 'json'
|
9
|
+
# Returns a concise representation of the cluster pending tasks.
|
23
10
|
#
|
24
|
-
# @option arguments [
|
25
|
-
# @option arguments [Boolean] :
|
26
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
27
|
-
# @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
|
28
|
-
# @option arguments [Boolean] :help Return information about headers
|
29
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
30
|
-
# (default: false)
|
11
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
12
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
31
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
14
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
15
|
+
# @option arguments [Boolean] :help Return help information
|
16
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
17
|
+
# @option arguments [String] :time The unit in which to display time values
|
18
|
+
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
|
19
|
+
|
20
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
21
|
+
|
32
22
|
#
|
33
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
23
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-pending-tasks.html
|
34
24
|
#
|
35
|
-
def pending_tasks(arguments={})
|
36
|
-
|
25
|
+
def pending_tasks(arguments = {})
|
26
|
+
arguments = arguments.clone
|
27
|
+
|
28
|
+
method = Elasticsearch::API::HTTP_GET
|
37
29
|
path = "_cat/pending_tasks"
|
38
|
-
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
30
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
39
31
|
params[:h] = Utils.__listify(params[:h]) if params[:h]
|
40
|
-
body = nil
|
41
32
|
|
33
|
+
body = nil
|
42
34
|
perform_request(method, path, params, body).body
|
43
35
|
end
|
44
36
|
|
45
37
|
# Register this action with its valid params when the module is loaded.
|
46
38
|
#
|
47
|
-
# @since 6.
|
39
|
+
# @since 6.2.0
|
48
40
|
ParamsRegistry.register(:pending_tasks, [
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
41
|
+
:format,
|
42
|
+
:local,
|
43
|
+
:master_timeout,
|
44
|
+
:h,
|
45
|
+
:help,
|
46
|
+
:s,
|
47
|
+
:time,
|
48
|
+
:v
|
49
|
+
].freeze)
|
50
|
+
end
|
56
51
|
end
|
57
|
-
end
|
58
52
|
end
|
59
53
|
end
|
@@ -6,40 +6,43 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Return information about installed plugins
|
9
|
+
# Returns information about installed plugins across nodes node.
|
11
10
|
#
|
12
|
-
# @option arguments [
|
13
|
-
#
|
11
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
12
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
14
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
15
14
|
# @option arguments [List] :h Comma-separated list of column names to display
|
16
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
17
15
|
# @option arguments [Boolean] :help Return help information
|
16
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
18
17
|
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
18
|
+
|
19
19
|
#
|
20
|
-
# @see
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-plugins.html
|
21
21
|
#
|
22
|
-
def plugins(arguments={})
|
23
|
-
|
22
|
+
def plugins(arguments = {})
|
23
|
+
arguments = arguments.clone
|
24
|
+
|
25
|
+
method = Elasticsearch::API::HTTP_GET
|
24
26
|
path = "_cat/plugins"
|
25
27
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
26
|
-
body = nil
|
27
28
|
|
29
|
+
body = nil
|
28
30
|
perform_request(method, path, params, body).body
|
29
31
|
end
|
30
32
|
|
31
33
|
# Register this action with its valid params when the module is loaded.
|
32
34
|
#
|
33
|
-
# @since 6.
|
35
|
+
# @since 6.2.0
|
34
36
|
ParamsRegistry.register(:plugins, [
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
:format,
|
38
|
+
:local,
|
39
|
+
:master_timeout,
|
40
|
+
:h,
|
41
|
+
:help,
|
42
|
+
:s,
|
43
|
+
:v
|
44
|
+
].freeze)
|
45
|
+
end
|
42
46
|
end
|
43
|
-
end
|
44
47
|
end
|
45
48
|
end
|
@@ -6,77 +6,61 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Display information about the recovery process (allocating shards)
|
11
|
-
#
|
12
|
-
# @example Display information for all indices
|
13
|
-
#
|
14
|
-
# puts client.cat.recovery
|
15
|
-
#
|
16
|
-
# @example Display information for a specific index
|
17
|
-
#
|
18
|
-
# puts client.cat.recovery index: 'index-a'
|
19
|
-
#
|
20
|
-
# @example Display information for indices matching a pattern
|
21
|
-
#
|
22
|
-
# puts client.cat.recovery index: 'index-*'
|
23
|
-
#
|
24
|
-
# @example Display header names in the output
|
25
|
-
#
|
26
|
-
# puts client.cat.recovery v: true
|
27
|
-
#
|
28
|
-
# @example Display only specific columns in the output (see the `help` parameter)
|
29
|
-
#
|
30
|
-
# puts client.cat.recovery h: ['node', 'index', 'shard', 'percent']
|
9
|
+
# Returns information about index shard recoveries, both on-going completed.
|
31
10
|
#
|
32
|
-
# @
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
|
38
|
-
#
|
39
|
-
#
|
40
|
-
# @option arguments [
|
41
|
-
# @option arguments [
|
42
|
-
# @option arguments [List] :h Comma-separated list of column names to display -- see the `help` argument
|
43
|
-
# @option arguments [Boolean] :v Display column headers as part of the output
|
11
|
+
# @option arguments [List] :index Comma-separated list or wildcard expression of index names to limit the returned information
|
12
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
13
|
+
# @option arguments [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries
|
14
|
+
# @option arguments [String] :bytes The unit in which to display byte values
|
15
|
+
# (options: b,k,kb,m,mb,g,gb,t,tb,p,pb)
|
16
|
+
|
17
|
+
# @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries
|
18
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
19
|
+
# @option arguments [Boolean] :help Return help information
|
20
|
+
# @option arguments [List] :index Comma-separated list or wildcard expression of index names to limit the returned information
|
44
21
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
45
|
-
# @option arguments [String] :
|
46
|
-
#
|
47
|
-
|
48
|
-
#
|
49
|
-
|
22
|
+
# @option arguments [String] :time The unit in which to display time values
|
23
|
+
# (options: d (Days),h (Hours),m (Minutes),s (Seconds),ms (Milliseconds),micros (Microseconds),nanos (Nanoseconds))
|
24
|
+
|
25
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
26
|
+
|
50
27
|
#
|
51
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
28
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-recovery.html
|
52
29
|
#
|
53
|
-
def recovery(arguments={})
|
54
|
-
|
55
|
-
|
56
|
-
method = HTTP_GET
|
30
|
+
def recovery(arguments = {})
|
31
|
+
arguments = arguments.clone
|
57
32
|
|
58
|
-
|
33
|
+
_index = arguments.delete(:index)
|
59
34
|
|
35
|
+
method = Elasticsearch::API::HTTP_GET
|
36
|
+
path = if _index
|
37
|
+
"_cat/recovery/#{Utils.__listify(_index)}"
|
38
|
+
else
|
39
|
+
"_cat/recovery"
|
40
|
+
end
|
60
41
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
61
42
|
params[:h] = Utils.__listify(params[:h]) if params[:h]
|
62
43
|
|
63
|
-
body
|
64
|
-
|
44
|
+
body = nil
|
65
45
|
perform_request(method, path, params, body).body
|
66
46
|
end
|
67
47
|
|
68
48
|
# Register this action with its valid params when the module is loaded.
|
69
49
|
#
|
70
|
-
# @since 6.
|
50
|
+
# @since 6.2.0
|
71
51
|
ParamsRegistry.register(:recovery, [
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
52
|
+
:format,
|
53
|
+
:active_only,
|
54
|
+
:bytes,
|
55
|
+
:detailed,
|
56
|
+
:h,
|
57
|
+
:help,
|
58
|
+
:index,
|
59
|
+
:s,
|
60
|
+
:time,
|
61
|
+
:v
|
62
|
+
].freeze)
|
63
|
+
end
|
79
64
|
end
|
80
|
-
end
|
81
65
|
end
|
82
66
|
end
|
@@ -6,46 +6,43 @@ module Elasticsearch
|
|
6
6
|
module API
|
7
7
|
module Cat
|
8
8
|
module Actions
|
9
|
-
|
10
|
-
# Shows all repositories registered in a cluster
|
11
|
-
#
|
12
|
-
# @example Return list of repositories
|
13
|
-
#
|
14
|
-
# client.cat.repositories
|
15
|
-
#
|
16
|
-
# @example Return only id for each repository
|
17
|
-
#
|
18
|
-
# client.cat.repositories h: 'id'
|
9
|
+
# Returns information about snapshot repositories registered in the cluster.
|
19
10
|
#
|
11
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
12
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
20
13
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
21
14
|
# @option arguments [List] :h Comma-separated list of column names to display
|
22
15
|
# @option arguments [Boolean] :help Return help information
|
23
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
24
16
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
17
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
18
|
+
|
25
19
|
#
|
26
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/
|
20
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/cat-repositories.html
|
27
21
|
#
|
28
|
-
def repositories(arguments={})
|
29
|
-
|
22
|
+
def repositories(arguments = {})
|
23
|
+
arguments = arguments.clone
|
24
|
+
|
25
|
+
method = Elasticsearch::API::HTTP_GET
|
30
26
|
path = "_cat/repositories"
|
31
27
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
32
|
-
body = nil
|
33
28
|
|
29
|
+
body = nil
|
34
30
|
perform_request(method, path, params, body).body
|
35
31
|
end
|
36
32
|
|
37
33
|
# Register this action with its valid params when the module is loaded.
|
38
34
|
#
|
39
|
-
# @since 6.
|
35
|
+
# @since 6.2.0
|
40
36
|
ParamsRegistry.register(:repositories, [
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
37
|
+
:format,
|
38
|
+
:local,
|
39
|
+
:master_timeout,
|
40
|
+
:h,
|
41
|
+
:help,
|
42
|
+
:s,
|
43
|
+
:v
|
44
|
+
].freeze)
|
45
|
+
end
|
48
46
|
end
|
49
|
-
end
|
50
47
|
end
|
51
48
|
end
|