elasticsearch-api 6.2.0 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) 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/search_spec.rb +0 -15
  136. data/test/integration/yaml_test_runner.rb +2 -4
  137. data/utils/thor/generate_source.rb +1 -0
  138. data/utils/thor/templates/ruby/method.erb +7 -5
  139. metadata +12 -73
  140. data/lib/elasticsearch/api/actions/delete_template.rb +0 -21
  141. data/lib/elasticsearch/api/actions/field_stats.rb +0 -36
  142. data/lib/elasticsearch/api/actions/get_template.rb +0 -27
  143. data/lib/elasticsearch/api/actions/indices/delete_mapping.rb +0 -26
  144. data/lib/elasticsearch/api/actions/indices/delete_warmer.rb +0 -32
  145. data/lib/elasticsearch/api/actions/indices/get_aliases.rb +0 -37
  146. data/lib/elasticsearch/api/actions/indices/get_warmer.rb +0 -62
  147. data/lib/elasticsearch/api/actions/indices/optimize.rb +0 -77
  148. data/lib/elasticsearch/api/actions/indices/put_warmer.rb +0 -65
  149. data/lib/elasticsearch/api/actions/indices/seal.rb +0 -24
  150. data/lib/elasticsearch/api/actions/indices/snapshot_index.rb +0 -44
  151. data/lib/elasticsearch/api/actions/indices/status.rb +0 -63
  152. data/lib/elasticsearch/api/actions/list_benchmarks.rb +0 -27
  153. data/lib/elasticsearch/api/actions/mlt.rb +0 -130
  154. data/lib/elasticsearch/api/actions/mpercolate.rb +0 -62
  155. data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -39
  156. data/lib/elasticsearch/api/actions/percolate.rb +0 -73
  157. data/lib/elasticsearch/api/actions/put_template.rb +0 -25
  158. data/lib/elasticsearch/api/actions/remote/info.rb +0 -21
  159. data/lib/elasticsearch/api/actions/search_exists.rb +0 -63
  160. data/lib/elasticsearch/api/actions/suggest.rb +0 -49
  161. data/spec/elasticsearch/api/actions/delete_template_spec.rb +0 -17
  162. data/spec/elasticsearch/api/actions/field_stats_spec.rb +0 -17
  163. data/spec/elasticsearch/api/actions/get_template_spec.rb +0 -52
  164. data/spec/elasticsearch/api/actions/indices/delete_mapping_spec.rb +0 -77
  165. data/spec/elasticsearch/api/actions/indices/delete_warmer_spec.rb +0 -86
  166. data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +0 -68
  167. data/spec/elasticsearch/api/actions/indices/get_aliases_spec.rb +0 -55
  168. data/spec/elasticsearch/api/actions/indices/get_warmer_spec.rb +0 -48
  169. data/spec/elasticsearch/api/actions/indices/optimize_spec.rb +0 -63
  170. data/spec/elasticsearch/api/actions/indices/put_warmer_spec.rb +0 -101
  171. data/spec/elasticsearch/api/actions/indices/seal_spec.rb +0 -18
  172. data/spec/elasticsearch/api/actions/indices/snapshot_index_spec.rb +0 -89
  173. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -108
  174. data/spec/elasticsearch/api/actions/indices/status_spec.rb +0 -92
  175. data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +0 -68
  176. data/spec/elasticsearch/api/actions/list_benchmarks_spec.rb +0 -17
  177. data/spec/elasticsearch/api/actions/mlt_spec.rb +0 -117
  178. data/spec/elasticsearch/api/actions/mpercolate_spec.rb +0 -49
  179. data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -59
  180. data/spec/elasticsearch/api/actions/percolate_spec.rb +0 -67
  181. data/spec/elasticsearch/api/actions/put_template_spec.rb +0 -17
  182. data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -18
  183. data/spec/elasticsearch/api/actions/search_exists_spec.rb +0 -17
  184. data/spec/elasticsearch/api/actions/suggest_spec.rb +0 -77
@@ -17,16 +17,15 @@ module Elasticsearch
17
17
  #
18
18
  # client.cat.pending_tasks format: 'json'
19
19
  #
20
- # @option arguments [List] :h Comma-separated list of column names to display -- see the `help` argument
21
- # @option arguments [Boolean] :v Display column headers as part of the output
22
- # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
23
- # @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
24
- # @option arguments [Boolean] :help Return information about headers
25
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
26
- # (default: false)
20
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
21
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
27
22
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
23
+ # @option arguments [List] :h Comma-separated list of column names to display
24
+ # @option arguments [Boolean] :help Return help information
25
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
26
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
28
27
  #
29
- # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-pending-tasks.html
28
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-pending-tasks.html
30
29
  #
31
30
  def pending_tasks(arguments={})
32
31
  method = HTTP_GET
@@ -42,12 +41,13 @@ module Elasticsearch
42
41
  #
43
42
  # @since 6.2.0
44
43
  ParamsRegistry.register(:pending_tasks, [
44
+ :format,
45
45
  :local,
46
46
  :master_timeout,
47
47
  :h,
48
48
  :help,
49
- :v,
50
- :s ].freeze)
49
+ :s,
50
+ :v ].freeze)
51
51
  end
52
52
  end
53
53
  end
@@ -5,15 +5,15 @@ module Elasticsearch
5
5
 
6
6
  # Return information about installed plugins
7
7
  #
8
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
9
- # (default: false)
8
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
9
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
10
10
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
11
11
  # @option arguments [List] :h Comma-separated list of column names to display
12
- # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
13
12
  # @option arguments [Boolean] :help Return help information
13
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
14
14
  # @option arguments [Boolean] :v Verbose mode. Display column headers
15
15
  #
16
- # @see http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html
16
+ # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html
17
17
  #
18
18
  def plugins(arguments={})
19
19
  method = 'GET'
@@ -28,12 +28,13 @@ module Elasticsearch
28
28
  #
29
29
  # @since 6.2.0
30
30
  ParamsRegistry.register(:plugins, [
31
+ :format,
31
32
  :local,
32
33
  :master_timeout,
33
34
  :h,
34
35
  :help,
35
- :v,
36
- :s ].freeze)
36
+ :s,
37
+ :v ].freeze)
37
38
  end
38
39
  end
39
40
  end
@@ -34,17 +34,15 @@ module Elasticsearch
34
34
  # client.cat.recovery format: 'json'
35
35
  #
36
36
  # @option arguments [List] :index A comma-separated list of index names to limit the returned information
37
- # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, m, g)
38
- # @option arguments [List] :h Comma-separated list of column names to display -- see the `help` argument
39
- # @option arguments [Boolean] :v Display column headers as part of the output
40
- # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
41
- # @option arguments [String] :format The output format. Options: 'text', 'json'; default: 'text'
42
- # @option arguments [Boolean] :help Return information about headers
43
- # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
44
- # (default: false)
37
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
38
+ # @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
45
39
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
40
+ # @option arguments [List] :h Comma-separated list of column names to display
41
+ # @option arguments [Boolean] :help Return help information
42
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
43
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
46
44
  #
47
- # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-recovery.html
45
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cat-recovery.html
48
46
  #
49
47
  def recovery(arguments={})
50
48
  index = arguments.delete(:index)
@@ -65,13 +63,13 @@ module Elasticsearch
65
63
  #
66
64
  # @since 6.2.0
67
65
  ParamsRegistry.register(:recovery, [
66
+ :format,
68
67
  :bytes,
69
- :local,
70
68
  :master_timeout,
71
69
  :h,
72
70
  :help,
73
- :v,
74
- :s ].freeze)
71
+ :s,
72
+ :v ].freeze)
75
73
  end
76
74
  end
77
75
  end
@@ -13,11 +13,13 @@ module Elasticsearch
13
13
  #
14
14
  # client.cat.repositories h: 'id'
15
15
  #
16
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
17
+ # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node
16
18
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
17
19
  # @option arguments [List] :h Comma-separated list of column names to display
18
20
  # @option arguments [Boolean] :help Return help information
19
- # @option arguments [Boolean] :v Verbose mode. Display column headers
20
21
  # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
22
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
21
23
  #
22
24
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html
23
25
  #
@@ -34,11 +36,13 @@ module Elasticsearch
34
36
  #
35
37
  # @since 6.2.0
36
38
  ParamsRegistry.register(:repositories, [
39
+ :format,
40
+ :local,
37
41
  :master_timeout,
38
42
  :h,
39
43
  :help,
40
- :v,
41
- :s ].freeze)
44
+ :s,
45
+ :v ].freeze)
42
46
  end
43
47
  end
44
48
  end
@@ -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