elasticsearch-api 6.2.0 → 6.8.0
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/abort_benchmark.rb +1 -1
- data/lib/elasticsearch/api/actions/benchmark.rb +1 -1
- data/lib/elasticsearch/api/actions/bulk.rb +4 -6
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/allocation.rb +11 -11
- data/lib/elasticsearch/api/actions/cat/count.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +9 -7
- data/lib/elasticsearch/api/actions/cat/health.rb +11 -11
- data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +14 -15
- data/lib/elasticsearch/api/actions/cat/master.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +6 -4
- data/lib/elasticsearch/api/actions/cat/nodes.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +10 -10
- data/lib/elasticsearch/api/actions/cat/plugins.rb +7 -6
- data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -12
- data/lib/elasticsearch/api/actions/cat/repositories.rb +7 -3
- data/lib/elasticsearch/api/actions/cat/segments.rb +9 -7
- data/lib/elasticsearch/api/actions/cat/shards.rb +12 -12
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +8 -4
- data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -6
- data/lib/elasticsearch/api/actions/cat/templates.rb +6 -6
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +13 -17
- data/lib/elasticsearch/api/actions/clear_scroll.rb +7 -0
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +2 -3
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -2
- data/lib/elasticsearch/api/actions/cluster/health.rb +11 -20
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +2 -3
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +8 -3
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +7 -1
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +7 -7
- data/lib/elasticsearch/api/actions/cluster/state.rb +18 -15
- data/lib/elasticsearch/api/actions/cluster/stats.rb +12 -5
- data/lib/elasticsearch/api/actions/count.rb +12 -23
- data/lib/elasticsearch/api/actions/count_percolate.rb +1 -1
- data/lib/elasticsearch/api/actions/delete.rb +16 -8
- data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -9
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/actions/delete_script.rb +5 -6
- data/lib/elasticsearch/api/actions/exists.rb +3 -4
- data/lib/elasticsearch/api/actions/exists_source.rb +51 -0
- data/lib/elasticsearch/api/actions/explain.rb +11 -25
- data/lib/elasticsearch/api/actions/field_caps.rb +2 -2
- data/lib/elasticsearch/api/actions/get.rb +13 -19
- data/lib/elasticsearch/api/actions/get_script.rb +9 -2
- data/lib/elasticsearch/api/actions/get_source.rb +10 -14
- data/lib/elasticsearch/api/actions/index.rb +10 -16
- data/lib/elasticsearch/api/actions/indices/analyze.rb +3 -27
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/close.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/create.rb +7 -7
- data/lib/elasticsearch/api/actions/indices/delete.rb +3 -4
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +5 -2
- data/lib/elasticsearch/api/actions/indices/exists.rb +11 -17
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +8 -4
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -15
- data/lib/elasticsearch/api/actions/indices/flush.rb +5 -9
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +13 -11
- data/lib/elasticsearch/api/actions/indices/freeze.rb +0 -1
- data/lib/elasticsearch/api/actions/indices/get.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +11 -15
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +12 -16
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +12 -21
- data/lib/elasticsearch/api/actions/indices/get_template.rb +8 -5
- data/lib/elasticsearch/api/actions/indices/open.rb +9 -15
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +6 -3
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +11 -23
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +10 -20
- data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -5
- data/lib/elasticsearch/api/actions/indices/recovery.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/refresh.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/rollover.rb +6 -5
- data/lib/elasticsearch/api/actions/indices/segments.rb +6 -14
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +2 -4
- data/lib/elasticsearch/api/actions/indices/shrink.rb +6 -7
- data/lib/elasticsearch/api/actions/indices/split.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +7 -4
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +10 -13
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +14 -25
- data/lib/elasticsearch/api/actions/info.rb +6 -0
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +4 -3
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +29 -0
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +1 -1
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -5
- data/lib/elasticsearch/api/actions/mget.rb +8 -17
- data/lib/elasticsearch/api/actions/msearch.rb +7 -2
- data/lib/elasticsearch/api/actions/msearch_template.rb +8 -1
- data/lib/elasticsearch/api/actions/mtermvectors.rb +21 -22
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +4 -6
- data/lib/elasticsearch/api/actions/nodes/info.rb +6 -26
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -4
- data/lib/elasticsearch/api/actions/nodes/stats.rb +11 -30
- data/lib/elasticsearch/api/actions/nodes/usage.rb +31 -0
- data/lib/elasticsearch/api/actions/ping.rb +6 -0
- data/lib/elasticsearch/api/actions/put_script.rb +10 -9
- data/lib/elasticsearch/api/actions/rank_eval.rb +36 -0
- data/lib/elasticsearch/api/actions/reindex.rb +9 -14
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/actions/render_search_template.rb +1 -1
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +27 -0
- data/lib/elasticsearch/api/actions/scroll.rb +3 -2
- data/lib/elasticsearch/api/actions/search.rb +36 -53
- data/lib/elasticsearch/api/actions/search_shards.rb +7 -14
- data/lib/elasticsearch/api/actions/search_template.rb +20 -19
- data/lib/elasticsearch/api/actions/snapshot/create.rb +2 -3
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +4 -3
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +1 -2
- data/lib/elasticsearch/api/actions/snapshot/get.rb +3 -3
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +3 -6
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/status.rb +4 -5
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +1 -2
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +7 -13
- data/lib/elasticsearch/api/actions/tasks/get.rb +6 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +10 -16
- data/lib/elasticsearch/api/actions/termvectors.rb +22 -21
- data/lib/elasticsearch/api/actions/update.rb +19 -33
- data/lib/elasticsearch/api/actions/update_by_query.rb +13 -33
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +29 -0
- data/lib/elasticsearch/api/version.rb +1 -1
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -17
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +17 -0
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -37
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/mget_spec.rb +0 -15
- data/spec/elasticsearch/api/actions/mlt_spec.rb +127 -114
- data/spec/elasticsearch/api/actions/search_exists_spec.rb +58 -12
- data/spec/elasticsearch/api/actions/search_spec.rb +0 -15
- data/test/integration/yaml_test_runner.rb +2 -4
- data/utils/thor/generate_source.rb +1 -0
- data/utils/thor/templates/ruby/method.erb +7 -5
- metadata +12 -10
- data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +0 -68
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +0 -68
@@ -10,17 +10,19 @@ module Elasticsearch
|
|
10
10
|
# puts client.cat.segments
|
11
11
|
#
|
12
12
|
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
|
13
|
-
# @option arguments [String] :
|
13
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
14
|
+
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
|
14
15
|
# @option arguments [List] :h Comma-separated list of column names to display
|
15
16
|
# @option arguments [Boolean] :help Return help information
|
16
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
17
17
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
18
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
18
19
|
#
|
19
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
20
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-segments.html
|
20
21
|
#
|
21
22
|
def segments(arguments={})
|
22
23
|
method = 'GET'
|
23
|
-
|
24
|
+
index = arguments.delete(:index)
|
25
|
+
path = Utils.__pathify( '_cat/segments', Utils.__escape(index))
|
24
26
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
25
27
|
body = nil
|
26
28
|
|
@@ -31,12 +33,12 @@ module Elasticsearch
|
|
31
33
|
#
|
32
34
|
# @since 6.2.0
|
33
35
|
ParamsRegistry.register(:segments, [
|
36
|
+
:format,
|
34
37
|
:bytes,
|
35
|
-
:index,
|
36
38
|
:h,
|
37
39
|
:help,
|
38
|
-
:
|
39
|
-
:
|
40
|
+
:s,
|
41
|
+
:v ].freeze)
|
40
42
|
end
|
41
43
|
end
|
42
44
|
end
|
@@ -38,17 +38,16 @@ module Elasticsearch
|
|
38
38
|
# client.cat.shards format: 'json'
|
39
39
|
#
|
40
40
|
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
|
41
|
-
# @option arguments [String] :
|
42
|
-
# @option arguments [
|
43
|
-
# @option arguments [Boolean] :
|
44
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
45
|
-
# @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
|
46
|
-
# @option arguments [Boolean] :help Return information about headers
|
47
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
48
|
-
# (default: false)
|
41
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
42
|
+
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
|
43
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
49
44
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
45
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
46
|
+
# @option arguments [Boolean] :help Return help information
|
47
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
48
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
50
49
|
#
|
51
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
50
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-shards.html
|
52
51
|
#
|
53
52
|
def shards(arguments={})
|
54
53
|
index = arguments.delete(:index)
|
@@ -67,13 +66,14 @@ module Elasticsearch
|
|
67
66
|
#
|
68
67
|
# @since 6.2.0
|
69
68
|
ParamsRegistry.register(:shards, [
|
69
|
+
:format,
|
70
|
+
:bytes,
|
70
71
|
:local,
|
71
72
|
:master_timeout,
|
72
|
-
:bytes,
|
73
73
|
:h,
|
74
74
|
:help,
|
75
|
-
:
|
76
|
-
:
|
75
|
+
:s,
|
76
|
+
:v ].freeze)
|
77
77
|
end
|
78
78
|
end
|
79
79
|
end
|
@@ -13,11 +13,14 @@ module Elasticsearch
|
|
13
13
|
#
|
14
14
|
# client.cat.snapshots repository: 'my_repository', h: 'id,status,start_epoch'
|
15
15
|
#
|
16
|
+
# @option arguments [List] :repository Name of repository from which to fetch the snapshot information
|
17
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
18
|
+
# @option arguments [Boolean] :ignore_unavailable Set to true to ignore unavailable snapshots
|
16
19
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
17
20
|
# @option arguments [List] :h Comma-separated list of column names to display
|
18
21
|
# @option arguments [Boolean] :help Return help information
|
19
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
20
22
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
23
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
21
24
|
#
|
22
25
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html
|
23
26
|
#
|
@@ -37,13 +40,14 @@ module Elasticsearch
|
|
37
40
|
#
|
38
41
|
# @since 6.2.0
|
39
42
|
ParamsRegistry.register(:snapshots, [
|
43
|
+
:format,
|
44
|
+
:ignore_unavailable,
|
40
45
|
:master_timeout,
|
41
46
|
:h,
|
42
47
|
:help,
|
43
|
-
:
|
44
|
-
:
|
48
|
+
:s,
|
49
|
+
:v ].freeze)
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
48
53
|
end
|
49
|
-
|
@@ -9,14 +9,13 @@ module Elasticsearch
|
|
9
9
|
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
|
10
10
|
# @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all.
|
11
11
|
# @option arguments [Boolean] :detailed Return detailed task information (default: false)
|
12
|
-
# @option arguments [String] :parent_node Return tasks with specified parent node.
|
13
12
|
# @option arguments [Number] :parent_task Return tasks with specified parent task id. Set to -1 to return all.
|
14
13
|
# @option arguments [List] :h Comma-separated list of column names to display
|
15
14
|
# @option arguments [Boolean] :help Return help information
|
16
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
17
15
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
16
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
18
17
|
#
|
19
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
18
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
|
20
19
|
#
|
21
20
|
def tasks(arguments={})
|
22
21
|
method = 'GET'
|
@@ -35,12 +34,11 @@ module Elasticsearch
|
|
35
34
|
:node_id,
|
36
35
|
:actions,
|
37
36
|
:detailed,
|
38
|
-
:parent_node,
|
39
37
|
:parent_task,
|
40
38
|
:h,
|
41
39
|
:help,
|
42
|
-
:
|
43
|
-
:
|
40
|
+
:s,
|
41
|
+
:v ].freeze)
|
44
42
|
end
|
45
43
|
end
|
46
44
|
end
|
@@ -11,14 +11,15 @@ module Elasticsearch
|
|
11
11
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
12
12
|
# @option arguments [List] :h Comma-separated list of column names to display
|
13
13
|
# @option arguments [Boolean] :help Return help information
|
14
|
-
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
15
14
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
15
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
16
16
|
#
|
17
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
17
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html
|
18
18
|
#
|
19
19
|
def templates(arguments={})
|
20
20
|
method = HTTP_GET
|
21
|
-
|
21
|
+
name = arguments.delete(:name)
|
22
|
+
path = Utils.__pathify( '_cat/templates', Utils.__escape(name))
|
22
23
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
23
24
|
body = nil
|
24
25
|
|
@@ -29,14 +30,13 @@ module Elasticsearch
|
|
29
30
|
#
|
30
31
|
# @since 6.2.0
|
31
32
|
ParamsRegistry.register(:templates, [
|
32
|
-
:name,
|
33
33
|
:format,
|
34
34
|
:local,
|
35
35
|
:master_timeout,
|
36
36
|
:h,
|
37
37
|
:help,
|
38
|
-
:
|
39
|
-
:
|
38
|
+
:s,
|
39
|
+
:v ].freeze)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -4,7 +4,7 @@ module Elasticsearch
|
|
4
4
|
module Actions
|
5
5
|
|
6
6
|
# Display thread pool statistics across nodes (use the `help` parameter to display a list
|
7
|
-
# of
|
7
|
+
# of available thread pools)
|
8
8
|
#
|
9
9
|
# @example Display information about all thread pools across nodes
|
10
10
|
#
|
@@ -22,21 +22,17 @@ module Elasticsearch
|
|
22
22
|
#
|
23
23
|
# puts client.cat.thread_pool h: 'host,ia,is,iq,ir,sa,ss,sq,sr', v: true
|
24
24
|
#
|
25
|
-
# @option arguments [
|
26
|
-
# @option arguments [String] :
|
27
|
-
#
|
28
|
-
# @option arguments [
|
29
|
-
# the thread pools in the output
|
30
|
-
# @option arguments [List] :h Comma-separated list of column names to display -- see the `help` argument
|
31
|
-
# @option arguments [Boolean] :v Display column headers as part of the output
|
32
|
-
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
33
|
-
# @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
|
34
|
-
# @option arguments [Boolean] :help Return information about headers
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
36
|
-
# (default: false)
|
25
|
+
# @option arguments [List] :thread_pool_patterns A comma-separated list of regular-expressions to filter the thread pools in the output
|
26
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
27
|
+
# @option arguments [String] :size The multiplier in which to display values (options: , k, m, g, t, p)
|
28
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
37
29
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
30
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
31
|
+
# @option arguments [Boolean] :help Return help information
|
32
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
33
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
38
34
|
#
|
39
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
35
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-thread-pool.html
|
40
36
|
#
|
41
37
|
def thread_pool(arguments={})
|
42
38
|
method = HTTP_GET
|
@@ -52,15 +48,15 @@ module Elasticsearch
|
|
52
48
|
#
|
53
49
|
# @since 6.2.0
|
54
50
|
ParamsRegistry.register(:thread_pool, [
|
55
|
-
:
|
51
|
+
:format,
|
56
52
|
:size,
|
57
53
|
:local,
|
58
54
|
:thread_pool_patterns,
|
59
55
|
:master_timeout,
|
60
56
|
:h,
|
61
57
|
:help,
|
62
|
-
:
|
63
|
-
:
|
58
|
+
:s,
|
59
|
+
:v ].freeze)
|
64
60
|
end
|
65
61
|
end
|
66
62
|
end
|
@@ -6,6 +6,7 @@ module Elasticsearch
|
|
6
6
|
#
|
7
7
|
# @option arguments [List] :scroll_id A comma-separated list of scroll IDs to clear;
|
8
8
|
# use `_all` clear all scroll search contexts
|
9
|
+
# @option arguments [Hash] :body A comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter
|
9
10
|
#
|
10
11
|
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-search-type.html#clear-scroll
|
11
12
|
#
|
@@ -19,6 +20,12 @@ module Elasticsearch
|
|
19
20
|
|
20
21
|
perform_request(method, path, params, body).body
|
21
22
|
end
|
23
|
+
|
24
|
+
# Register this action with its valid params when the module is loaded.
|
25
|
+
#
|
26
|
+
# @since 6.2.0
|
27
|
+
ParamsRegistry.register(:clear_scroll, [
|
28
|
+
].freeze)
|
22
29
|
end
|
23
30
|
end
|
24
31
|
end
|
@@ -7,10 +7,9 @@ module Elasticsearch
|
|
7
7
|
#
|
8
8
|
# @option arguments [Hash] :body The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
|
9
9
|
# @option arguments [Boolean] :include_yes_decisions Return 'YES' decisions in explanation (default: false)
|
10
|
-
# @option arguments [Boolean] :include_disk_info Return information about disk usage and shard sizes
|
11
|
-
# (default: false)
|
10
|
+
# @option arguments [Boolean] :include_disk_info Return information about disk usage and shard sizes (default: false)
|
12
11
|
#
|
13
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
12
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html
|
14
13
|
#
|
15
14
|
def allocation_explain(arguments={})
|
16
15
|
method = 'GET'
|
@@ -10,8 +10,9 @@ module Elasticsearch
|
|
10
10
|
# client.cluster.get_settings
|
11
11
|
#
|
12
12
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
13
|
-
# @option arguments [
|
14
|
-
#
|
13
|
+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
14
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
15
|
+
# @option arguments [Boolean] :include_defaults Whether to return all default clusters setting.
|
15
16
|
#
|
16
17
|
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-update-settings/
|
17
18
|
#
|
@@ -29,6 +30,8 @@ module Elasticsearch
|
|
29
30
|
# @since 6.2.0
|
30
31
|
ParamsRegistry.register(:get_settings, [
|
31
32
|
:flat_settings,
|
33
|
+
:master_timeout,
|
34
|
+
:timeout,
|
32
35
|
:include_defaults ].freeze)
|
33
36
|
end
|
34
37
|
end
|
@@ -13,25 +13,17 @@ module Elasticsearch
|
|
13
13
|
#
|
14
14
|
# client.cluster.health wait_for_status: 'yellow'
|
15
15
|
#
|
16
|
-
# @option arguments [
|
17
|
-
# @option arguments [String] :level Specify the level of detail for returned information
|
18
|
-
#
|
19
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
20
|
-
# (default: false)
|
16
|
+
# @option arguments [List] :index Limit the information returned to a specific index
|
17
|
+
# @option arguments [String] :level Specify the level of detail for returned information (options: cluster, indices, shards)
|
18
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
21
19
|
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
22
20
|
# @option arguments [Time] :timeout Explicit operation timeout
|
23
|
-
# @option arguments [
|
24
|
-
# @option arguments [
|
25
|
-
# @option arguments [
|
26
|
-
#
|
27
|
-
# @option arguments [Boolean] :
|
28
|
-
#
|
29
|
-
# @option arguments [Boolean] :wait_for_no_initializing_shards Whether to wait until there are no
|
30
|
-
# initializing shards in the cluster
|
31
|
-
# @option arguments [String] :wait_for_status Wait until cluster is in a specific state
|
32
|
-
# (options: green, yellow, red)
|
33
|
-
# @option arguments [List] :wait_for_events Wait until all currently queued events with the given priorty
|
34
|
-
# are processed (immediate, urgent, high, normal, low, languid)
|
21
|
+
# @option arguments [String] :wait_for_active_shards Wait until the specified number of shards is active
|
22
|
+
# @option arguments [String] :wait_for_nodes Wait until the specified number of nodes is available
|
23
|
+
# @option arguments [String] :wait_for_events Wait until all currently queued events with the given priority are processed (options: immediate, urgent, high, normal, low, languid)
|
24
|
+
# @option arguments [Boolean] :wait_for_no_relocating_shards Whether to wait until there are no relocating shards in the cluster
|
25
|
+
# @option arguments [Boolean] :wait_for_no_initializing_shards Whether to wait until there are no initializing shards in the cluster
|
26
|
+
# @option arguments [String] :wait_for_status Wait until cluster is in a specific state (options: green, yellow, red)
|
35
27
|
#
|
36
28
|
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-health/
|
37
29
|
#
|
@@ -57,11 +49,10 @@ module Elasticsearch
|
|
57
49
|
:timeout,
|
58
50
|
:wait_for_active_shards,
|
59
51
|
:wait_for_nodes,
|
60
|
-
:
|
52
|
+
:wait_for_events,
|
61
53
|
:wait_for_no_relocating_shards,
|
62
54
|
:wait_for_no_initializing_shards,
|
63
|
-
:wait_for_status
|
64
|
-
:wait_for_events ].freeze)
|
55
|
+
:wait_for_status ].freeze)
|
65
56
|
end
|
66
57
|
end
|
67
58
|
end
|
@@ -10,11 +10,10 @@ module Elasticsearch
|
|
10
10
|
#
|
11
11
|
# client.cluster.pending_tasks
|
12
12
|
#
|
13
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
14
|
-
# (default: false)
|
13
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
|
15
14
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
16
15
|
#
|
17
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
16
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-pending.html
|
18
17
|
#
|
19
18
|
def pending_tasks(arguments={})
|
20
19
|
method = HTTP_GET
|
@@ -9,8 +9,10 @@ module Elasticsearch
|
|
9
9
|
#
|
10
10
|
# client.cluster.put_settings body: { transient: { 'cluster.routing.allocation.disable_allocation' => true } }
|
11
11
|
#
|
12
|
-
# @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent`
|
13
|
-
#
|
12
|
+
# @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (*Required*)
|
13
|
+
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
14
|
+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
15
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
14
16
|
#
|
15
17
|
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-update-settings/
|
16
18
|
#
|
@@ -26,7 +28,10 @@ module Elasticsearch
|
|
26
28
|
# Register this action with its valid params when the module is loaded.
|
27
29
|
#
|
28
30
|
# @since 6.2.0
|
29
|
-
ParamsRegistry.register(:put_settings, [
|
31
|
+
ParamsRegistry.register(:put_settings, [
|
32
|
+
:flat_settings,
|
33
|
+
:master_timeout,
|
34
|
+
:timeout ].freeze)
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
@@ -6,7 +6,7 @@ module Elasticsearch
|
|
6
6
|
# Returns the configured remote cluster information
|
7
7
|
#
|
8
8
|
#
|
9
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
9
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-remote-info.html
|
10
10
|
#
|
11
11
|
def remote_info(arguments={})
|
12
12
|
method = Elasticsearch::API::HTTP_GET
|
@@ -16,6 +16,12 @@ module Elasticsearch
|
|
16
16
|
|
17
17
|
perform_request(method, path, params, body).body
|
18
18
|
end
|
19
|
+
|
20
|
+
# Register this action with its valid params when the module is loaded.
|
21
|
+
#
|
22
|
+
# @since 6.2.0
|
23
|
+
ParamsRegistry.register(:remote_info, [
|
24
|
+
].freeze)
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|
@@ -21,13 +21,13 @@ module Elasticsearch
|
|
21
21
|
#
|
22
22
|
# @option arguments [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`)
|
23
23
|
# @option arguments [Boolean] :dry_run Simulate the operation only and return the resulting state
|
24
|
-
# @option arguments [Boolean] :explain Return an explanation
|
25
|
-
# @option arguments [Boolean] :metric Limit the information returned to the specified metrics.
|
26
|
-
# Defaults to all but metadata. (Options: _all, blocks, metadata,
|
27
|
-
# nodes, routing_table, master_node, version)
|
28
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
24
|
+
# @option arguments [Boolean] :explain Return an explanation of why the commands can or cannot be executed
|
29
25
|
# @option arguments [Boolean] :retry_failed Retries allocation of shards that are blocked due to too many
|
30
|
-
#
|
26
|
+
# subsequent allocation failures
|
27
|
+
# @option arguments [List] :metric Limit the information returned to the specified metrics. Defaults to all
|
28
|
+
# but metadata (options: _all, blocks, metadata, nodes, routing_table, master_node, version)
|
29
|
+
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
30
|
+
# @option arguments [Time] :timeout Explicit operation timeout
|
31
31
|
#
|
32
32
|
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-reroute/
|
33
33
|
#
|
@@ -47,9 +47,9 @@ module Elasticsearch
|
|
47
47
|
ParamsRegistry.register(:reroute, [
|
48
48
|
:dry_run,
|
49
49
|
:explain,
|
50
|
+
:retry_failed,
|
50
51
|
:metric,
|
51
52
|
:master_timeout,
|
52
|
-
:retry_failed,
|
53
53
|
:timeout ].freeze)
|
54
54
|
end
|
55
55
|
end
|
@@ -9,21 +9,24 @@ module Elasticsearch
|
|
9
9
|
#
|
10
10
|
# client.cluster.state
|
11
11
|
#
|
12
|
-
# @option arguments [List] :index A comma-separated list of index names; use `_all` or
|
13
|
-
#
|
12
|
+
# @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform
|
13
|
+
# the operation on all indices
|
14
14
|
# @option arguments [List] :metric Limit the information returned to the specified metrics
|
15
|
-
#
|
16
|
-
# master_node, version)
|
17
|
-
# @option arguments [List] :index_templates A comma separated list to return specific index templates when
|
18
|
-
# returning metadata
|
15
|
+
# (options: _all,blocks,metadata,nodes,routing_table,routing_nodes,master_node,version)
|
19
16
|
# @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
|
20
|
-
#
|
17
|
+
# (default: false)
|
21
18
|
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
22
|
-
# @option arguments [
|
23
|
-
#
|
24
|
-
#
|
19
|
+
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
20
|
+
# @option arguments [Number] :wait_for_metadata_version Wait for the metadata version to be equal or greater
|
21
|
+
# than the specified metadata version
|
22
|
+
# @option arguments [Time] :wait_for_timeout The maximum time to wait for wait_for_metadata_version before
|
23
|
+
# timing out
|
25
24
|
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when
|
26
|
-
#
|
25
|
+
# unavailable (missing or closed)
|
26
|
+
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves
|
27
|
+
# into no concrete indices. (This includes `_all` string or when no indices have been specified)
|
28
|
+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that
|
29
|
+
# are open, closed or both. (options: open, closed, none, all)
|
27
30
|
#
|
28
31
|
# @see http://elasticsearch.org/guide/reference/api/admin-cluster-state/
|
29
32
|
#
|
@@ -51,14 +54,14 @@ module Elasticsearch
|
|
51
54
|
#
|
52
55
|
# @since 6.2.0
|
53
56
|
ParamsRegistry.register(:state, [
|
54
|
-
:metric,
|
55
|
-
:index_templates,
|
56
57
|
:local,
|
57
58
|
:master_timeout,
|
58
59
|
:flat_settings,
|
60
|
+
:wait_for_metadata_version,
|
61
|
+
:wait_for_timeout,
|
62
|
+
:ignore_unavailable,
|
59
63
|
:allow_no_indices,
|
60
|
-
:expand_wildcards
|
61
|
-
:ignore_unavailable ].freeze)
|
64
|
+
:expand_wildcards ].freeze)
|
62
65
|
end
|
63
66
|
end
|
64
67
|
end
|
@@ -5,16 +5,24 @@ module Elasticsearch
|
|
5
5
|
|
6
6
|
# Returns statistical information about the cluster
|
7
7
|
#
|
8
|
-
#
|
8
|
+
#
|
9
|
+
# @option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned
|
10
|
+
# information; use `_local` to return information from the node you're connecting to, leave empty to get
|
11
|
+
# information from all nodes
|
9
12
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
10
|
-
# @option arguments [Boolean] :human Whether to return time and byte values in human-readable format.
|
11
13
|
# @option arguments [Time] :timeout Explicit operation timeout
|
12
14
|
#
|
13
|
-
# @see http://www.elastic.co/guide/en/elasticsearch/reference/
|
15
|
+
# @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html
|
14
16
|
#
|
15
17
|
def stats(arguments={})
|
16
18
|
method = 'GET'
|
17
|
-
|
19
|
+
node_id = arguments.delete(:node_id)
|
20
|
+
|
21
|
+
if node_id
|
22
|
+
path = Utils.__pathify("_cluster/stats/nodes", node_id)
|
23
|
+
else
|
24
|
+
path = "_cluster/stats"
|
25
|
+
end
|
18
26
|
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
19
27
|
body = nil
|
20
28
|
|
@@ -26,7 +34,6 @@ module Elasticsearch
|
|
26
34
|
# @since 6.2.0
|
27
35
|
ParamsRegistry.register(:stats, [
|
28
36
|
:flat_settings,
|
29
|
-
:human,
|
30
37
|
:timeout ].freeze)
|
31
38
|
end
|
32
39
|
end
|
@@ -19,31 +19,20 @@ module Elasticsearch
|
|
19
19
|
# @option arguments [List] :index A comma-separated list of indices to restrict the results
|
20
20
|
# @option arguments [List] :type A comma-separated list of types to restrict the results
|
21
21
|
# @option arguments [Hash] :body A query to restrict the results specified with the Query DSL (optional)
|
22
|
-
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when
|
23
|
-
#
|
24
|
-
# @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves
|
25
|
-
#
|
26
|
-
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices
|
27
|
-
# that are open, closed or both.
|
28
|
-
# (options: open, closed, none, all)
|
22
|
+
# @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
|
23
|
+
# @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
|
24
|
+
# @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)
|
25
|
+
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
|
29
26
|
# @option arguments [Number] :min_score Include only documents with a specific `_score` value in the result
|
30
|
-
# @option arguments [String] :preference Specify the node or shard the operation should be performed on
|
31
|
-
#
|
32
|
-
# @option arguments [String] :routing Specific routing value
|
27
|
+
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
|
28
|
+
# @option arguments [List] :routing A comma-separated list of specific routing values
|
33
29
|
# @option arguments [String] :q Query in the Lucene query string syntax
|
34
30
|
# @option arguments [String] :analyzer The analyzer to use for the query string
|
35
|
-
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be
|
36
|
-
#
|
37
|
-
# @option arguments [String] :
|
38
|
-
#
|
39
|
-
# @option arguments [
|
40
|
-
# string
|
41
|
-
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text
|
42
|
-
# to a numeric field) should be ignored
|
43
|
-
# @option arguments [Boolean] :lowercase_expanded_terms Specify whether query terms should be lowercased
|
44
|
-
#
|
45
|
-
# @option arguments [Boolean] :terminate_after Specify the maximum count for each shard, upon reaching
|
46
|
-
# which the query execution will terminate early.
|
31
|
+
# @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
|
32
|
+
# @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
|
33
|
+
# @option arguments [String] :df The field to use as default where no field prefix is given in the query string
|
34
|
+
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
35
|
+
# @option arguments [Number] :terminate_after The maximum count for each shard, upon reaching which the query execution will terminate early
|
47
36
|
#
|
48
37
|
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html
|
49
38
|
#
|
@@ -62,6 +51,7 @@ module Elasticsearch
|
|
62
51
|
# @since 6.2.0
|
63
52
|
ParamsRegistry.register(:count, [
|
64
53
|
:ignore_unavailable,
|
54
|
+
:ignore_throttled,
|
65
55
|
:allow_no_indices,
|
66
56
|
:expand_wildcards,
|
67
57
|
:min_score,
|
@@ -73,7 +63,6 @@ module Elasticsearch
|
|
73
63
|
:default_operator,
|
74
64
|
:df,
|
75
65
|
:lenient,
|
76
|
-
:lowercase_expanded_terms,
|
77
66
|
:terminate_after ].freeze)
|
78
67
|
end
|
79
68
|
end
|
@@ -46,7 +46,7 @@ module Elasticsearch
|
|
46
46
|
# @option arguments [Number] :version Explicit version number for concurrency control
|
47
47
|
# @option arguments [String] :version_type Specific version type (options: internal, external, external_gte, force)
|
48
48
|
#
|
49
|
-
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/
|
49
|
+
# @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html
|
50
50
|
#
|
51
51
|
def count_percolate(arguments={})
|
52
52
|
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|