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
@@ -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]
@@ -13,18 +13,25 @@ module Elasticsearch
13
13
  # client.delete index: 'myindex', type: 'mytype', id: '1', routing: 'abc123'
14
14
  #
15
15
  # @option arguments [String] :id The document ID (*Required*)
16
- # @option arguments [Number,List] :ignore The list of HTTP errors to ignore; only `404` supported at the moment
17
16
  # @option arguments [String] :index The name of the index (*Required*)
18
17
  # @option arguments [String] :type The type of the document (*Required*)
19
- # @option arguments [String] :consistency Specific write consistency setting for the operation
20
- # (options: one, quorum, all)
18
+ # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before
19
+ # proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all
20
+ # shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for
21
+ # the shard (number of replicas + 1)
21
22
  # @option arguments [String] :parent ID of parent document
22
- # @option arguments [Boolean] :refresh Refresh the index after performing the operation
23
- # @option arguments [String] :replication Specific replication type (options: sync, async)
23
+ # @option arguments [String] :refresh If `true` then refresh the effected shards to make this operation visible
24
+ # to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false`
25
+ # (the default) then do nothing with refreshes. (options: true, false, wait_for)
24
26
  # @option arguments [String] :routing Specific routing value
25
27
  # @option arguments [Time] :timeout Explicit operation timeout
28
+ # @option arguments [Number] :if_seq_no only perform the delete operation if the last operation that has changed
29
+ # the document has the specified sequence number
30
+ # @option arguments [Number] :if_primary_term only perform the delete operation if the last operation that has
31
+ # changed the document has the specified primary term
26
32
  # @option arguments [Number] :version Explicit version number for concurrency control
27
- # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte, force)
33
+ # @option arguments [String] :version_type Specific version type
34
+ # (options: internal, external, external_gte, force)
28
35
  #
29
36
  # @see http://elasticsearch.org/guide/reference/api/delete/
30
37
  #
@@ -52,12 +59,13 @@ module Elasticsearch
52
59
  #
53
60
  # @since 6.2.0
54
61
  ParamsRegistry.register(:delete, [
55
- :consistency,
62
+ :wait_for_active_shards,
56
63
  :parent,
57
64
  :refresh,
58
- :replication,
59
65
  :routing,
60
66
  :timeout,
67
+ :if_seq_no,
68
+ :if_primary_term,
61
69
  :version,
62
70
  :version_type ].freeze)
63
71
  end
@@ -25,7 +25,7 @@ module Elasticsearch
25
25
  # @option arguments [Number] :from Starting offset (default: 0)
26
26
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
27
27
  # @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)
28
- # @option arguments [String] :conflicts What to do when the delete-by-query hits version conflicts? (options: abort, proceed)
28
+ # @option arguments [String] :conflicts What to do when the delete by query hits version conflicts? (options: abort, proceed)
29
29
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, none, all)
30
30
  # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
31
31
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
@@ -37,8 +37,8 @@ module Elasticsearch
37
37
  # @option arguments [Number] :size Number of hits to return (default: 10)
38
38
  # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
39
39
  # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
40
- # @option arguments [List] :_source_exclude A list of fields to exclude from the returned _source field
41
- # @option arguments [List] :_source_include A list of fields to extract and return from the _source field
40
+ # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
41
+ # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
42
42
  # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
43
43
  # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
44
44
  # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
@@ -46,12 +46,12 @@ module Elasticsearch
46
46
  # @option arguments [Boolean] :refresh Should the effected indexes be refreshed?
47
47
  # @option arguments [Time] :timeout Time each individual bulk request should wait for shards that are unavailable.
48
48
  # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
49
- # @option arguments [Number] :scroll_size Size on the scroll request powering the update_by_query
50
- # @option arguments [Boolean] :wait_for_completion Should the request should block until the delete-by-query is complete.
49
+ # @option arguments [Number] :scroll_size Size on the scroll request powering the delete by query
50
+ # @option arguments [Boolean] :wait_for_completion Should the request should block until the delete by query is complete.
51
51
  # @option arguments [Number] :requests_per_second The throttle for this request in sub-requests per second. -1 means no throttle.
52
- # @option arguments [Integer] :slices The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
52
+ # @option arguments [Number] :slices The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
53
53
  #
54
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html
54
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
55
55
  #
56
56
  def delete_by_query(arguments={})
57
57
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
@@ -89,9 +89,7 @@ module Elasticsearch
89
89
  :size,
90
90
  :sort,
91
91
  :_source,
92
- :_source_exclude,
93
92
  :_source_excludes,
94
- :_source_include,
95
93
  :_source_includes,
96
94
  :terminate_after,
97
95
  :stats,
@@ -0,0 +1,29 @@
1
+ module Elasticsearch
2
+ module API
3
+ module Actions
4
+
5
+ # The value of requests_per_second can be changed on a running delete by query using the _rethrottle API
6
+ #
7
+ # @option arguments [String] :task_id The task id to rethrottle (*Required*)
8
+ # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
9
+ #
10
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
11
+ #
12
+ def delete_by_query_rethrottle(arguments={})
13
+ raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
14
+ method = Elasticsearch::API::HTTP_POST
15
+ path = "_delete_by_query/#{arguments[:task_id]}/_rethrottle"
16
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
17
+ body = nil
18
+
19
+ perform_request(method, path, params, body).body
20
+ end
21
+
22
+ # Register this action with its valid params when the module is loaded.
23
+ #
24
+ # @since 6.2.0
25
+ ParamsRegistry.register(:delete_by_query_rethrottle, [
26
+ :requests_per_second ].freeze)
27
+ end
28
+ end
29
+ end
@@ -5,11 +5,10 @@ module Elasticsearch
5
5
  # Remove an indexed script from Elasticsearch
6
6
  #
7
7
  # @option arguments [String] :id Script ID (*Required*)
8
- # @option arguments [String] :lang Script language
9
- # @option arguments [Number] :version Explicit version number for concurrency control
10
- # @option arguments [String] :version_type Specific version type (options: internal, external, external_gte, force)
8
+ # @option arguments [Time] :timeout Explicit operation timeout
9
+ # @option arguments [Time] :master_timeout Specify timeout for connection to master
11
10
  #
12
- # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-scripting.html
11
+ # @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html
13
12
  #
14
13
  def delete_script(arguments={})
15
14
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
@@ -25,8 +24,8 @@ module Elasticsearch
25
24
  #
26
25
  # @since 6.2.0
27
26
  ParamsRegistry.register(:delete_script, [
28
- :version,
29
- :version_type ].freeze)
27
+ :timeout,
28
+ :master_timeout ].freeze)
30
29
  end
31
30
  end
32
31
  end