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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/api/actions/abort_benchmark.rb +1 -1
  3. data/lib/elasticsearch/api/actions/benchmark.rb +1 -1
  4. data/lib/elasticsearch/api/actions/bulk.rb +4 -6
  5. data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -10
  6. data/lib/elasticsearch/api/actions/cat/allocation.rb +11 -11
  7. data/lib/elasticsearch/api/actions/cat/count.rb +10 -10
  8. data/lib/elasticsearch/api/actions/cat/fielddata.rb +9 -7
  9. data/lib/elasticsearch/api/actions/cat/health.rb +11 -11
  10. data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
  11. data/lib/elasticsearch/api/actions/cat/indices.rb +14 -15
  12. data/lib/elasticsearch/api/actions/cat/master.rb +10 -10
  13. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +6 -4
  14. data/lib/elasticsearch/api/actions/cat/nodes.rb +10 -10
  15. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +10 -10
  16. data/lib/elasticsearch/api/actions/cat/plugins.rb +7 -6
  17. data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -12
  18. data/lib/elasticsearch/api/actions/cat/repositories.rb +7 -3
  19. data/lib/elasticsearch/api/actions/cat/segments.rb +9 -7
  20. data/lib/elasticsearch/api/actions/cat/shards.rb +12 -12
  21. data/lib/elasticsearch/api/actions/cat/snapshots.rb +8 -4
  22. data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -6
  23. data/lib/elasticsearch/api/actions/cat/templates.rb +6 -6
  24. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +13 -17
  25. data/lib/elasticsearch/api/actions/clear_scroll.rb +7 -0
  26. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +2 -3
  27. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -2
  28. data/lib/elasticsearch/api/actions/cluster/health.rb +11 -20
  29. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +2 -3
  30. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +8 -3
  31. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +7 -1
  32. data/lib/elasticsearch/api/actions/cluster/reroute.rb +7 -7
  33. data/lib/elasticsearch/api/actions/cluster/state.rb +18 -15
  34. data/lib/elasticsearch/api/actions/cluster/stats.rb +12 -5
  35. data/lib/elasticsearch/api/actions/count.rb +12 -23
  36. data/lib/elasticsearch/api/actions/count_percolate.rb +1 -1
  37. data/lib/elasticsearch/api/actions/delete.rb +16 -8
  38. data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -9
  39. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +29 -0
  40. data/lib/elasticsearch/api/actions/delete_script.rb +5 -6
  41. data/lib/elasticsearch/api/actions/exists.rb +3 -4
  42. data/lib/elasticsearch/api/actions/exists_source.rb +51 -0
  43. data/lib/elasticsearch/api/actions/explain.rb +11 -25
  44. data/lib/elasticsearch/api/actions/field_caps.rb +2 -2
  45. data/lib/elasticsearch/api/actions/get.rb +13 -19
  46. data/lib/elasticsearch/api/actions/get_script.rb +9 -2
  47. data/lib/elasticsearch/api/actions/get_source.rb +10 -14
  48. data/lib/elasticsearch/api/actions/index.rb +10 -16
  49. data/lib/elasticsearch/api/actions/indices/analyze.rb +3 -27
  50. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +2 -4
  51. data/lib/elasticsearch/api/actions/indices/close.rb +9 -15
  52. data/lib/elasticsearch/api/actions/indices/create.rb +7 -7
  53. data/lib/elasticsearch/api/actions/indices/delete.rb +3 -4
  54. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +7 -4
  55. data/lib/elasticsearch/api/actions/indices/delete_template.rb +5 -2
  56. data/lib/elasticsearch/api/actions/indices/exists.rb +11 -17
  57. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -14
  58. data/lib/elasticsearch/api/actions/indices/exists_template.rb +8 -4
  59. data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -15
  60. data/lib/elasticsearch/api/actions/indices/flush.rb +5 -9
  61. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +1 -1
  62. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +13 -11
  63. data/lib/elasticsearch/api/actions/indices/freeze.rb +0 -1
  64. data/lib/elasticsearch/api/actions/indices/get.rb +9 -15
  65. data/lib/elasticsearch/api/actions/indices/get_alias.rb +6 -14
  66. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +11 -15
  67. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +12 -16
  68. data/lib/elasticsearch/api/actions/indices/get_settings.rb +12 -21
  69. data/lib/elasticsearch/api/actions/indices/get_template.rb +8 -5
  70. data/lib/elasticsearch/api/actions/indices/open.rb +9 -15
  71. data/lib/elasticsearch/api/actions/indices/put_alias.rb +6 -3
  72. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +11 -23
  73. data/lib/elasticsearch/api/actions/indices/put_settings.rb +10 -20
  74. data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -5
  75. data/lib/elasticsearch/api/actions/indices/recovery.rb +2 -4
  76. data/lib/elasticsearch/api/actions/indices/refresh.rb +6 -14
  77. data/lib/elasticsearch/api/actions/indices/rollover.rb +6 -5
  78. data/lib/elasticsearch/api/actions/indices/segments.rb +6 -14
  79. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +2 -4
  80. data/lib/elasticsearch/api/actions/indices/shrink.rb +6 -7
  81. data/lib/elasticsearch/api/actions/indices/split.rb +2 -1
  82. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +7 -4
  83. data/lib/elasticsearch/api/actions/indices/upgrade.rb +10 -13
  84. data/lib/elasticsearch/api/actions/indices/validate_query.rb +14 -25
  85. data/lib/elasticsearch/api/actions/info.rb +6 -0
  86. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +1 -1
  87. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +4 -3
  88. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +29 -0
  89. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +1 -1
  90. data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -5
  91. data/lib/elasticsearch/api/actions/mget.rb +8 -17
  92. data/lib/elasticsearch/api/actions/msearch.rb +7 -2
  93. data/lib/elasticsearch/api/actions/msearch_template.rb +8 -1
  94. data/lib/elasticsearch/api/actions/mtermvectors.rb +21 -22
  95. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +4 -6
  96. data/lib/elasticsearch/api/actions/nodes/info.rb +6 -26
  97. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -4
  98. data/lib/elasticsearch/api/actions/nodes/stats.rb +11 -30
  99. data/lib/elasticsearch/api/actions/nodes/usage.rb +31 -0
  100. data/lib/elasticsearch/api/actions/ping.rb +6 -0
  101. data/lib/elasticsearch/api/actions/put_script.rb +10 -9
  102. data/lib/elasticsearch/api/actions/rank_eval.rb +36 -0
  103. data/lib/elasticsearch/api/actions/reindex.rb +9 -14
  104. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +29 -0
  105. data/lib/elasticsearch/api/actions/render_search_template.rb +1 -1
  106. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +27 -0
  107. data/lib/elasticsearch/api/actions/scroll.rb +3 -2
  108. data/lib/elasticsearch/api/actions/search.rb +36 -53
  109. data/lib/elasticsearch/api/actions/search_shards.rb +7 -14
  110. data/lib/elasticsearch/api/actions/search_template.rb +20 -19
  111. data/lib/elasticsearch/api/actions/snapshot/create.rb +2 -3
  112. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +4 -3
  113. data/lib/elasticsearch/api/actions/snapshot/delete.rb +3 -3
  114. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +1 -2
  115. data/lib/elasticsearch/api/actions/snapshot/get.rb +3 -3
  116. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +3 -6
  117. data/lib/elasticsearch/api/actions/snapshot/restore.rb +1 -1
  118. data/lib/elasticsearch/api/actions/snapshot/status.rb +4 -5
  119. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +1 -2
  120. data/lib/elasticsearch/api/actions/tasks/cancel.rb +7 -13
  121. data/lib/elasticsearch/api/actions/tasks/get.rb +6 -3
  122. data/lib/elasticsearch/api/actions/tasks/list.rb +10 -16
  123. data/lib/elasticsearch/api/actions/termvectors.rb +22 -21
  124. data/lib/elasticsearch/api/actions/update.rb +19 -33
  125. data/lib/elasticsearch/api/actions/update_by_query.rb +13 -33
  126. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +29 -0
  127. data/lib/elasticsearch/api/version.rb +1 -1
  128. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -17
  129. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +17 -0
  130. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -37
  131. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -15
  132. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -15
  133. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -15
  134. data/spec/elasticsearch/api/actions/mget_spec.rb +0 -15
  135. data/spec/elasticsearch/api/actions/mlt_spec.rb +127 -114
  136. data/spec/elasticsearch/api/actions/search_exists_spec.rb +58 -12
  137. data/spec/elasticsearch/api/actions/search_spec.rb +0 -15
  138. data/test/integration/yaml_test_runner.rb +2 -4
  139. data/utils/thor/generate_source.rb +1 -0
  140. data/utils/thor/templates/ruby/method.erb +7 -5
  141. metadata +12 -10
  142. data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +0 -68
  143. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -108
  144. 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] :bytes The unit in which to display byte values (options: b, k, m, g)
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/master/cat-segments.html
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
- path = "_cat/segments"
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
- :v,
39
- :s ].freeze)
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] :bytes The unit in which to display byte values (options: b, k, m, g)
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
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/master/cat-shards.html
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
- :v,
76
- :s ].freeze)
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
- :v,
44
- :s ].freeze)
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/master/tasks.html
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
- :v,
43
- :s ].freeze)
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/master/cat-templates.html
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
- path = "_cat/templates"
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
- :v,
39
- :s ].freeze)
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 avaialable thread pools)
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 [Boolean] :full_id Display the complete node ID
26
- # @option arguments [String] :size The multiplier in which to display values
27
- # (Options: k, m, g, t, p)
28
- # @option arguments [List] :thread_pool_patterns A comma-separated list of regular expressions to filter
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/master/cat-thread-pool.html
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
- :full_id,
51
+ :format,
56
52
  :size,
57
53
  :local,
58
54
  :thread_pool_patterns,
59
55
  :master_timeout,
60
56
  :h,
61
57
  :help,
62
- :v,
63
- :s ].freeze)
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/master/cluster-allocation-explain.html
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 [Boolean] :include_defaults Whether to return all default clusters setting
14
- # (default: false)
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 [String] :index Limit the information returned to a specific index
17
- # @option arguments [String] :level Specify the level of detail for returned information
18
- # (options: cluster, indices, shards)
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 [Number] :wait_for_active_shards Wait until the specified number of shards is active
24
- # @option arguments [Number] :wait_for_nodes Wait until the specified number of nodes is available
25
- # @option arguments [Number] :wait_for_relocating_shards Wait until the specified number of relocating
26
- # shards is finished
27
- # @option arguments [Boolean] :wait_for_no_relocating_shards Whether to wait until there are no relocating
28
- # shards in the cluster
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
- :wait_for_relocating_shards,
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/master/cluster-pending.html
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
- # (survives cluster restart).
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, [ :flat_settings ].freeze)
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/master/cluster-remote-info.html
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 for why the commands can or cannot be executed
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
- # subsequent allocation failures
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 omit to
13
- # perform the operation on all indices
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
- # (options: _all, blocks, index_templates, metadata, nodes, routing_table,
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
- # (default: false)
17
+ # (default: false)
21
18
  # @option arguments [Time] :master_timeout Specify timeout for connection to master
22
- # @option arguments [String] :expand_wildcards Whether to expand wildcard expression for inidices
23
- # (options: open, closed)
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)
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
- # unavailable (missing, closed, etc)
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
- # @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
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/master/cluster-stats.html
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
- path = "_cluster/stats"
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
- # unavailable (missing or closed)
24
- # @option arguments [Boolean] :allow_no_indices Whether to ignore if a wildcard indices expression resolves
25
- # into no concrete indices.
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
- # (default: random)
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
- # analyzed (default: false)
37
- # @option arguments [String] :default_operator The default operator for query string query (AND or OR)
38
- # (options: AND, OR)
39
- # @option arguments [String] :df The field to use as default where no field prefix is given in the query
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/master/search-percolate.html
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]