elasticsearch-api 7.6.0 → 7.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/elasticsearch-api.gemspec +7 -2
  3. data/lib/elasticsearch/api/actions/bulk.rb +6 -3
  4. data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -4
  5. data/lib/elasticsearch/api/actions/cat/allocation.rb +6 -4
  6. data/lib/elasticsearch/api/actions/cat/count.rb +6 -4
  7. data/lib/elasticsearch/api/actions/cat/fielddata.rb +6 -4
  8. data/lib/elasticsearch/api/actions/cat/health.rb +6 -4
  9. data/lib/elasticsearch/api/actions/cat/help.rb +5 -3
  10. data/lib/elasticsearch/api/actions/cat/indices.rb +11 -5
  11. data/lib/elasticsearch/api/actions/cat/master.rb +5 -3
  12. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +5 -3
  13. data/lib/elasticsearch/api/actions/cat/nodes.rb +6 -4
  14. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +6 -4
  15. data/lib/elasticsearch/api/actions/cat/plugins.rb +5 -3
  16. data/lib/elasticsearch/api/actions/cat/recovery.rb +7 -5
  17. data/lib/elasticsearch/api/actions/cat/repositories.rb +5 -3
  18. data/lib/elasticsearch/api/actions/cat/segments.rb +6 -4
  19. data/lib/elasticsearch/api/actions/cat/shards.rb +7 -5
  20. data/lib/elasticsearch/api/actions/cat/snapshots.rb +7 -5
  21. data/lib/elasticsearch/api/actions/cat/tasks.rb +6 -4
  22. data/lib/elasticsearch/api/actions/cat/templates.rb +6 -4
  23. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +6 -4
  24. data/lib/elasticsearch/api/actions/clear_scroll.rb +6 -4
  25. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -3
  26. data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +45 -0
  27. data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +47 -0
  28. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +5 -3
  29. data/lib/elasticsearch/api/actions/cluster/health.rb +7 -4
  30. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +5 -3
  31. data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +49 -0
  32. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +5 -3
  33. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +5 -3
  34. data/lib/elasticsearch/api/actions/cluster/reroute.rb +5 -3
  35. data/lib/elasticsearch/api/actions/cluster/state.rb +7 -4
  36. data/lib/elasticsearch/api/actions/cluster/stats.rb +6 -4
  37. data/lib/elasticsearch/api/actions/count.rb +8 -6
  38. data/lib/elasticsearch/api/actions/create.rb +2 -2
  39. data/lib/elasticsearch/api/actions/delete.rb +6 -3
  40. data/lib/elasticsearch/api/actions/delete_by_query.rb +7 -5
  41. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +5 -3
  42. data/lib/elasticsearch/api/actions/delete_script.rb +5 -3
  43. data/lib/elasticsearch/api/actions/exists.rb +5 -2
  44. data/lib/elasticsearch/api/actions/exists_source.rb +5 -2
  45. data/lib/elasticsearch/api/actions/explain.rb +5 -3
  46. data/lib/elasticsearch/api/actions/field_caps.rb +7 -5
  47. data/lib/elasticsearch/api/actions/get.rb +6 -3
  48. data/lib/elasticsearch/api/actions/get_script.rb +5 -3
  49. data/lib/elasticsearch/api/actions/get_script_context.rb +5 -3
  50. data/lib/elasticsearch/api/actions/get_script_languages.rb +5 -3
  51. data/lib/elasticsearch/api/actions/get_source.rb +5 -2
  52. data/lib/elasticsearch/api/actions/index.rb +5 -3
  53. data/lib/elasticsearch/api/actions/indices/analyze.rb +6 -4
  54. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +7 -5
  55. data/lib/elasticsearch/api/actions/indices/clone.rb +5 -3
  56. data/lib/elasticsearch/api/actions/indices/close.rb +6 -4
  57. data/lib/elasticsearch/api/actions/indices/create.rb +5 -3
  58. data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +37 -0
  59. data/lib/elasticsearch/api/actions/indices/delete.rb +7 -4
  60. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +5 -3
  61. data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +35 -0
  62. data/lib/elasticsearch/api/actions/indices/delete_template.rb +6 -4
  63. data/lib/elasticsearch/api/actions/indices/exists.rb +6 -4
  64. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +6 -4
  65. data/lib/elasticsearch/api/actions/indices/exists_template.rb +5 -3
  66. data/lib/elasticsearch/api/actions/indices/exists_type.rb +6 -4
  67. data/lib/elasticsearch/api/actions/indices/flush.rb +7 -4
  68. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +7 -4
  69. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +7 -5
  70. data/lib/elasticsearch/api/actions/indices/freeze.rb +4 -0
  71. data/lib/elasticsearch/api/actions/indices/get.rb +6 -4
  72. data/lib/elasticsearch/api/actions/indices/get_alias.rb +7 -5
  73. data/lib/elasticsearch/api/actions/indices/get_data_streams.rb +37 -0
  74. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +6 -4
  75. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +7 -5
  76. data/lib/elasticsearch/api/actions/indices/get_settings.rb +7 -5
  77. data/lib/elasticsearch/api/actions/indices/get_template.rb +6 -4
  78. data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +7 -4
  79. data/lib/elasticsearch/api/actions/indices/open.rb +6 -4
  80. data/lib/elasticsearch/api/actions/indices/put_alias.rb +5 -3
  81. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +6 -3
  82. data/lib/elasticsearch/api/actions/indices/put_settings.rb +6 -4
  83. data/lib/elasticsearch/api/actions/indices/put_template.rb +5 -3
  84. data/lib/elasticsearch/api/actions/indices/recovery.rb +6 -4
  85. data/lib/elasticsearch/api/actions/indices/refresh.rb +7 -4
  86. data/lib/elasticsearch/api/actions/indices/rollover.rb +5 -3
  87. data/lib/elasticsearch/api/actions/indices/segments.rb +7 -5
  88. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +7 -4
  89. data/lib/elasticsearch/api/actions/indices/shrink.rb +5 -3
  90. data/lib/elasticsearch/api/actions/indices/split.rb +5 -3
  91. data/lib/elasticsearch/api/actions/indices/stats.rb +6 -4
  92. data/lib/elasticsearch/api/actions/indices/unfreeze.rb +4 -0
  93. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +5 -3
  94. data/lib/elasticsearch/api/actions/indices/upgrade.rb +7 -5
  95. data/lib/elasticsearch/api/actions/indices/validate_query.rb +7 -5
  96. data/lib/elasticsearch/api/actions/info.rb +5 -3
  97. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +5 -3
  98. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +6 -4
  99. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +5 -3
  100. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +5 -3
  101. data/lib/elasticsearch/api/actions/ingest/simulate.rb +5 -3
  102. data/lib/elasticsearch/api/actions/mget.rb +5 -3
  103. data/lib/elasticsearch/api/actions/msearch.rb +7 -4
  104. data/lib/elasticsearch/api/actions/msearch_template.rb +6 -3
  105. data/lib/elasticsearch/api/actions/mtermvectors.rb +6 -3
  106. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +6 -4
  107. data/lib/elasticsearch/api/actions/nodes/info.rb +6 -4
  108. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +8 -5
  109. data/lib/elasticsearch/api/actions/nodes/stats.rb +6 -4
  110. data/lib/elasticsearch/api/actions/nodes/usage.rb +6 -4
  111. data/lib/elasticsearch/api/actions/ping.rb +5 -3
  112. data/lib/elasticsearch/api/actions/put_script.rb +5 -3
  113. data/lib/elasticsearch/api/actions/rank_eval.rb +6 -3
  114. data/lib/elasticsearch/api/actions/reindex.rb +6 -4
  115. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +5 -3
  116. data/lib/elasticsearch/api/actions/render_search_template.rb +6 -4
  117. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +5 -3
  118. data/lib/elasticsearch/api/actions/scroll.rb +6 -4
  119. data/lib/elasticsearch/api/actions/search.rb +8 -6
  120. data/lib/elasticsearch/api/actions/search_shards.rb +7 -4
  121. data/lib/elasticsearch/api/actions/search_template.rb +6 -4
  122. data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +6 -5
  123. data/lib/elasticsearch/api/actions/snapshot/create.rb +5 -3
  124. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +5 -3
  125. data/lib/elasticsearch/api/actions/snapshot/delete.rb +6 -4
  126. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +6 -4
  127. data/lib/elasticsearch/api/actions/snapshot/get.rb +6 -4
  128. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +7 -5
  129. data/lib/elasticsearch/api/actions/snapshot/restore.rb +5 -3
  130. data/lib/elasticsearch/api/actions/snapshot/status.rb +7 -5
  131. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +5 -3
  132. data/lib/elasticsearch/api/actions/tasks/cancel.rb +6 -4
  133. data/lib/elasticsearch/api/actions/tasks/get.rb +5 -3
  134. data/lib/elasticsearch/api/actions/tasks/list.rb +5 -3
  135. data/lib/elasticsearch/api/actions/termvectors.rb +5 -2
  136. data/lib/elasticsearch/api/actions/update.rb +6 -4
  137. data/lib/elasticsearch/api/actions/update_by_query.rb +7 -5
  138. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +5 -3
  139. data/lib/elasticsearch/api/version.rb +1 -1
  140. data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +1 -1
  141. data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +1 -1
  142. data/spec/elasticsearch/api/actions/cat/count_spec.rb +1 -1
  143. data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +2 -2
  144. data/spec/elasticsearch/api/actions/cat/health_spec.rb +1 -1
  145. data/spec/elasticsearch/api/actions/cat/help_spec.rb +1 -1
  146. data/spec/elasticsearch/api/actions/cat/indices_spec.rb +1 -1
  147. data/spec/elasticsearch/api/actions/cat/master_spec.rb +1 -1
  148. data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +1 -1
  149. data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +1 -1
  150. data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +1 -1
  151. data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +1 -1
  152. data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +1 -1
  153. data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +1 -1
  154. data/spec/elasticsearch/api/actions/cat/segments_spec.rb +1 -1
  155. data/spec/elasticsearch/api/actions/cat/shards_spec.rb +1 -1
  156. data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +1 -1
  157. data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +1 -1
  158. data/spec/elasticsearch/api/actions/cat/templates_spec.rb +1 -1
  159. data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +1 -1
  160. data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
  161. data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +1 -1
  162. data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +1 -1
  163. data/spec/elasticsearch/api/actions/cluster/health_spec.rb +3 -3
  164. data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +1 -1
  165. data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +1 -1
  166. data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +1 -1
  167. data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +2 -2
  168. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +2 -2
  169. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +1 -1
  170. data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
  171. data/spec/elasticsearch/api/actions/create_document_spec.rb +8 -4
  172. data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +6 -3
  173. data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
  174. data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
  175. data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
  176. data/spec/elasticsearch/api/actions/explain_document_spec.rb +2 -1
  177. data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
  178. data/spec/elasticsearch/api/actions/get_document_source_spec.rb +2 -1
  179. data/spec/elasticsearch/api/actions/get_document_spec.rb +2 -1
  180. data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
  181. data/spec/elasticsearch/api/actions/index_document_spec.rb +2 -1
  182. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +1 -1
  183. data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +1 -1
  184. data/spec/elasticsearch/api/actions/indices/clone_spec.rb +1 -1
  185. data/spec/elasticsearch/api/actions/indices/close_spec.rb +1 -1
  186. data/spec/elasticsearch/api/actions/indices/create_spec.rb +1 -1
  187. data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +1 -1
  188. data/spec/elasticsearch/api/actions/indices/delete_spec.rb +1 -1
  189. data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +1 -1
  190. data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +1 -1
  191. data/spec/elasticsearch/api/actions/indices/exists_spec.rb +1 -1
  192. data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +1 -1
  193. data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +1 -1
  194. data/spec/elasticsearch/api/actions/indices/flush_spec.rb +1 -1
  195. data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +1 -1
  196. data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +1 -1
  197. data/spec/elasticsearch/api/actions/indices/freeze_spec.rb +4 -0
  198. data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +1 -1
  199. data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +1 -1
  200. data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +1 -1
  201. data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +1 -1
  202. data/spec/elasticsearch/api/actions/indices/get_spec.rb +1 -1
  203. data/spec/elasticsearch/api/actions/indices/open_spec.rb +1 -1
  204. data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +1 -1
  205. data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +1 -1
  206. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +1 -1
  207. data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +1 -1
  208. data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +1 -1
  209. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +1 -1
  210. data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +1 -1
  211. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +1 -1
  212. data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +1 -1
  213. data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +1 -1
  214. data/spec/elasticsearch/api/actions/indices/split_spec.rb +1 -1
  215. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +1 -1
  216. data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +4 -0
  217. data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +1 -1
  218. data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +1 -1
  219. data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +1 -1
  220. data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
  221. data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +1 -1
  222. data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +1 -1
  223. data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +1 -1
  224. data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +1 -1
  225. data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
  226. data/spec/elasticsearch/api/actions/mget_spec.rb +2 -1
  227. data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +3 -2
  228. data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +1 -1
  229. data/spec/elasticsearch/api/actions/nodes/info_spec.rb +1 -1
  230. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +13 -8
  231. data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +1 -1
  232. data/spec/elasticsearch/api/actions/ping_spec.rb +3 -2
  233. data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
  234. data/spec/elasticsearch/api/actions/reindex_spec.rb +3 -2
  235. data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
  236. data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
  237. data/spec/elasticsearch/api/actions/search_shards_spec.rb +3 -2
  238. data/spec/elasticsearch/api/actions/search_spec.rb +2 -1
  239. data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
  240. data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +1 -1
  241. data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +1 -1
  242. data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +1 -1
  243. data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +1 -1
  244. data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +1 -1
  245. data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +1 -1
  246. data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +1 -1
  247. data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +1 -1
  248. data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +1 -1
  249. data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +1 -1
  250. data/spec/elasticsearch/api/actions/tasks/get_spec.rb +1 -1
  251. data/spec/elasticsearch/api/actions/tasks/list_spec.rb +1 -1
  252. data/spec/elasticsearch/api/actions/termvectors_spec.rb +2 -1
  253. data/spec/elasticsearch/api/actions/update_by_query_spec.rb +3 -2
  254. data/spec/elasticsearch/api/actions/update_document_spec.rb +2 -1
  255. data/spec/rest_yaml_tests_helper.rb +4 -0
  256. data/utils/thor/generator/endpoint_specifics.rb +1 -3
  257. data/utils/thor/generator/files_helper.rb +10 -0
  258. data/utils/thor/templates/_documentation_top.erb +3 -2
  259. data/utils/thor/templates/_perform_request.erb +6 -5
  260. data/utils/thor/templates/method.erb +2 -1
  261. metadata +14 -17
  262. data/lib/elasticsearch/api/actions/abort_benchmark.rb +0 -28
  263. data/lib/elasticsearch/api/actions/benchmark.rb +0 -68
  264. data/lib/elasticsearch/api/actions/delete_by_rethrottle.rb +0 -34
  265. data/lib/elasticsearch/api/actions/nodes/shutdown.rb +0 -43
  266. data/lib/elasticsearch/api/actions/remote/info.rb +0 -24
  267. data/spec/elasticsearch/api/actions/abort_benchmark_spec.rb +0 -21
  268. data/spec/elasticsearch/api/actions/benchmark_spec.rb +0 -21
  269. data/spec/elasticsearch/api/actions/nodes/shutdown_spec.rb +0 -63
  270. data/spec/elasticsearch/api/actions/remote/info_spec.rb +0 -22
@@ -13,7 +13,7 @@ module Elasticsearch
13
13
  # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
14
14
  # @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)
15
15
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
16
- # (options: open,closed,none,all)
16
+ # (options: open,closed,hidden,none,all)
17
17
 
18
18
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
19
19
  # @option arguments [List] :routing A comma-separated list of specific routing values
@@ -26,7 +26,7 @@ module Elasticsearch
26
26
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
27
27
  # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
28
28
  # @option arguments [Boolean] :ccs_minimize_roundtrips Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution
29
-
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
30
  # @option arguments [Hash] :body The search definition template and its params (*Required*)
31
31
  #
32
32
  # *Deprecation notice*:
@@ -34,11 +34,13 @@ module Elasticsearch
34
34
  # Deprecated since version 7.0.0
35
35
  #
36
36
  #
37
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/search-template.html
37
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/search-template.html
38
38
  #
39
39
  def search_template(arguments = {})
40
40
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
41
41
 
42
+ headers = arguments.delete(:headers) || {}
43
+
42
44
  arguments = arguments.clone
43
45
 
44
46
  _index = arguments.delete(:index)
@@ -56,7 +58,7 @@ module Elasticsearch
56
58
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
57
59
 
58
60
  body = arguments[:body]
59
- perform_request(method, path, params, body).body
61
+ perform_request(method, path, params, body, headers).body
60
62
  end
61
63
 
62
64
  # Register this action with its valid params when the module is loaded.
@@ -11,14 +11,15 @@ module Elasticsearch
11
11
  # @option arguments [String] :repository A repository name
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
-
15
- # @option arguments [Hash] :body TODO: Description
14
+ # @option arguments [Hash] :headers Custom HTTP headers
16
15
  #
17
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
18
17
  #
19
18
  def cleanup_repository(arguments = {})
20
19
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
21
20
 
21
+ headers = arguments.delete(:headers) || {}
22
+
22
23
  arguments = arguments.clone
23
24
 
24
25
  _repository = arguments.delete(:repository)
@@ -27,8 +28,8 @@ module Elasticsearch
27
28
  path = "_snapshot/#{Utils.__listify(_repository)}/_cleanup"
28
29
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
29
30
 
30
- body = arguments[:body]
31
- perform_request(method, path, params, body).body
31
+ body = nil
32
+ perform_request(method, path, params, body, headers).body
32
33
  end
33
34
 
34
35
  # Register this action with its valid params when the module is loaded.
@@ -12,15 +12,17 @@ module Elasticsearch
12
12
  # @option arguments [String] :snapshot A snapshot name
13
13
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
14
14
  # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  # @option arguments [Hash] :body The snapshot definition
17
17
  #
18
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
18
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
19
19
  #
20
20
  def create(arguments = {})
21
21
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
22
22
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
23
23
 
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _repository = arguments.delete(:repository)
@@ -32,7 +34,7 @@ module Elasticsearch
32
34
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
33
35
 
34
36
  body = arguments[:body]
35
- perform_request(method, path, params, body).body
37
+ perform_request(method, path, params, body, headers).body
36
38
  end
37
39
 
38
40
  # Register this action with its valid params when the module is loaded.
@@ -12,15 +12,17 @@ module Elasticsearch
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
14
  # @option arguments [Boolean] :verify Whether to verify the repository after creation
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  # @option arguments [Hash] :body The repository definition (*Required*)
17
17
  #
18
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
18
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
19
19
  #
20
20
  def create_repository(arguments = {})
21
21
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
22
22
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
23
23
 
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _repository = arguments.delete(:repository)
@@ -30,7 +32,7 @@ module Elasticsearch
30
32
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
31
33
 
32
34
  body = arguments[:body]
33
- perform_request(method, path, params, body).body
35
+ perform_request(method, path, params, body, headers).body
34
36
  end
35
37
 
36
38
  # Register this action with its valid params when the module is loaded.
@@ -11,14 +11,16 @@ module Elasticsearch
11
11
  # @option arguments [String] :repository A repository name
12
12
  # @option arguments [String] :snapshot A snapshot name
13
13
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
17
17
  #
18
18
  def delete(arguments = {})
19
19
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
20
20
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
21
21
 
22
+ headers = arguments.delete(:headers) || {}
23
+
22
24
  arguments = arguments.clone
23
25
 
24
26
  _repository = arguments.delete(:repository)
@@ -31,9 +33,9 @@ module Elasticsearch
31
33
 
32
34
  body = nil
33
35
  if Array(arguments[:ignore]).include?(404)
34
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
36
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
35
37
  else
36
- perform_request(method, path, params, body).body
38
+ perform_request(method, path, params, body, headers).body
37
39
  end
38
40
  end
39
41
 
@@ -11,13 +11,15 @@ module Elasticsearch
11
11
  # @option arguments [List] :repository A comma-separated list of repository names
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
17
17
  #
18
18
  def delete_repository(arguments = {})
19
19
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
20
20
 
21
+ headers = arguments.delete(:headers) || {}
22
+
21
23
  arguments = arguments.clone
22
24
 
23
25
  _repository = arguments.delete(:repository)
@@ -28,9 +30,9 @@ module Elasticsearch
28
30
 
29
31
  body = nil
30
32
  if Array(arguments[:ignore]).include?(404)
31
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
33
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
32
34
  else
33
- perform_request(method, path, params, body).body
35
+ perform_request(method, path, params, body, headers).body
34
36
  end
35
37
  end
36
38
 
@@ -13,14 +13,16 @@ module Elasticsearch
13
13
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
14
14
  # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
15
15
  # @option arguments [Boolean] :verbose Whether to show verbose snapshot info or only show the basic info found in the repository index blob
16
-
16
+ # @option arguments [Hash] :headers Custom HTTP headers
17
17
  #
18
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
18
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
19
19
  #
20
20
  def get(arguments = {})
21
21
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
22
22
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
23
23
 
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _repository = arguments.delete(:repository)
@@ -33,9 +35,9 @@ module Elasticsearch
33
35
 
34
36
  body = nil
35
37
  if Array(arguments[:ignore]).include?(404)
36
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
38
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
37
39
  else
38
- perform_request(method, path, params, body).body
40
+ perform_request(method, path, params, body, headers).body
39
41
  end
40
42
  end
41
43
 
@@ -11,11 +11,13 @@ module Elasticsearch
11
11
  # @option arguments [List] :repository A comma-separated list of repository names
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false)
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
17
17
  #
18
18
  def get_repository(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
19
21
  arguments = arguments.clone
20
22
 
21
23
  _repository = arguments.delete(:repository)
@@ -25,14 +27,14 @@ module Elasticsearch
25
27
  "_snapshot/#{Utils.__listify(_repository)}"
26
28
  else
27
29
  "_snapshot"
28
- end
30
+ end
29
31
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
34
  if Array(arguments[:ignore]).include?(404)
33
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
35
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
34
36
  else
35
- perform_request(method, path, params, body).body
37
+ perform_request(method, path, params, body, headers).body
36
38
  end
37
39
  end
38
40
 
@@ -12,15 +12,17 @@ module Elasticsearch
12
12
  # @option arguments [String] :snapshot A snapshot name
13
13
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
14
14
  # @option arguments [Boolean] :wait_for_completion Should this request wait until the operation has completed before returning
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  # @option arguments [Hash] :body Details of what to restore
17
17
  #
18
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
18
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
19
19
  #
20
20
  def restore(arguments = {})
21
21
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
22
22
  raise ArgumentError, "Required argument 'snapshot' missing" unless arguments[:snapshot]
23
23
 
24
+ headers = arguments.delete(:headers) || {}
25
+
24
26
  arguments = arguments.clone
25
27
 
26
28
  _repository = arguments.delete(:repository)
@@ -32,7 +34,7 @@ module Elasticsearch
32
34
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
33
35
 
34
36
  body = arguments[:body]
35
- perform_request(method, path, params, body).body
37
+ perform_request(method, path, params, body, headers).body
36
38
  end
37
39
 
38
40
  # Register this action with its valid params when the module is loaded.
@@ -12,11 +12,13 @@ module Elasticsearch
12
12
  # @option arguments [List] :snapshot A comma-separated list of snapshot names
13
13
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
14
14
  # @option arguments [Boolean] :ignore_unavailable Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  #
17
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
18
18
  #
19
19
  def status(arguments = {})
20
+ headers = arguments.delete(:headers) || {}
21
+
20
22
  arguments = arguments.clone
21
23
 
22
24
  _repository = arguments.delete(:repository)
@@ -30,14 +32,14 @@ module Elasticsearch
30
32
  "_snapshot/#{Utils.__listify(_repository)}/_status"
31
33
  else
32
34
  "_snapshot/_status"
33
- end
35
+ end
34
36
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
35
37
 
36
38
  body = nil
37
39
  if Array(arguments[:ignore]).include?(404)
38
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
40
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
39
41
  else
40
- perform_request(method, path, params, body).body
42
+ perform_request(method, path, params, body, headers).body
41
43
  end
42
44
  end
43
45
 
@@ -11,13 +11,15 @@ module Elasticsearch
11
11
  # @option arguments [String] :repository A repository name
12
12
  # @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/modules-snapshots.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/modules-snapshots.html
17
17
  #
18
18
  def verify_repository(arguments = {})
19
19
  raise ArgumentError, "Required argument 'repository' missing" unless arguments[:repository]
20
20
 
21
+ headers = arguments.delete(:headers) || {}
22
+
21
23
  arguments = arguments.clone
22
24
 
23
25
  _repository = arguments.delete(:repository)
@@ -27,7 +29,7 @@ module Elasticsearch
27
29
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
28
30
 
29
31
  body = nil
30
- perform_request(method, path, params, body).body
32
+ perform_request(method, path, params, body, headers).body
31
33
  end
32
34
 
33
35
  # Register this action with its valid params when the module is loaded.
@@ -12,11 +12,13 @@ module Elasticsearch
12
12
  # @option arguments [List] :nodes 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
13
13
  # @option arguments [List] :actions A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
14
14
  # @option arguments [String] :parent_task_id Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
15
-
15
+ # @option arguments [Hash] :headers Custom HTTP headers
16
16
  #
17
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/tasks.html
17
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
18
18
  #
19
19
  def cancel(arguments = {})
20
+ headers = arguments.delete(:headers) || {}
21
+
20
22
  arguments = arguments.clone
21
23
 
22
24
  _task_id = arguments.delete(:task_id)
@@ -26,11 +28,11 @@ module Elasticsearch
26
28
  "_tasks/#{Utils.__listify(_task_id)}/_cancel"
27
29
  else
28
30
  "_tasks/_cancel"
29
- end
31
+ end
30
32
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
31
33
 
32
34
  body = nil
33
- perform_request(method, path, params, body).body
35
+ perform_request(method, path, params, body, headers).body
34
36
  end
35
37
 
36
38
  # Register this action with its valid params when the module is loaded.
@@ -11,11 +11,13 @@ module Elasticsearch
11
11
  # @option arguments [String] :task_id Return the task with specified id (node_id:task_number)
12
12
  # @option arguments [Boolean] :wait_for_completion Wait for the matching tasks to complete (default: false)
13
13
  # @option arguments [Time] :timeout Explicit operation timeout
14
-
14
+ # @option arguments [Hash] :headers Custom HTTP headers
15
15
  #
16
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/tasks.html
16
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
17
17
  #
18
18
  def get(arguments = {})
19
+ headers = arguments.delete(:headers) || {}
20
+
19
21
  arguments = arguments.clone
20
22
 
21
23
  _task_id = arguments.delete(:task_id)
@@ -25,7 +27,7 @@ module Elasticsearch
25
27
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
26
28
 
27
29
  body = nil
28
- perform_request(method, path, params, body).body
30
+ perform_request(method, path, params, body, headers).body
29
31
  end
30
32
 
31
33
  # Register this action with its valid params when the module is loaded.
@@ -17,11 +17,13 @@ module Elasticsearch
17
17
  # (options: nodes,parents,none)
18
18
 
19
19
  # @option arguments [Time] :timeout Explicit operation timeout
20
-
20
+ # @option arguments [Hash] :headers Custom HTTP headers
21
21
  #
22
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/tasks.html
22
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/tasks.html
23
23
  #
24
24
  def list(arguments = {})
25
+ headers = arguments.delete(:headers) || {}
26
+
25
27
  arguments = arguments.clone
26
28
 
27
29
  method = Elasticsearch::API::HTTP_GET
@@ -29,7 +31,7 @@ module Elasticsearch
29
31
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
30
32
 
31
33
  body = nil
32
- perform_request(method, path, params, body).body
34
+ perform_request(method, path, params, body, headers).body
33
35
  end
34
36
 
35
37
  # Register this action with its valid params when the module is loaded.
@@ -23,6 +23,7 @@ module Elasticsearch
23
23
  # @option arguments [String] :version_type Specific version type
24
24
  # (options: internal,external,external_gte,force)
25
25
 
26
+ # @option arguments [Hash] :headers Custom HTTP headers
26
27
  # @option arguments [Hash] :body Define parameters and or supply a document to get termvectors for. See documentation.
27
28
  #
28
29
  # *Deprecation notice*:
@@ -30,11 +31,13 @@ module Elasticsearch
30
31
  # Deprecated since version 7.0.0
31
32
  #
32
33
  #
33
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-termvectors.html
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-termvectors.html
34
35
  #
35
36
  def termvectors(arguments = {})
36
37
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
37
38
 
39
+ headers = arguments.delete(:headers) || {}
40
+
38
41
  arguments = arguments.clone
39
42
 
40
43
  _index = arguments.delete(:index)
@@ -59,7 +62,7 @@ module Elasticsearch
59
62
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
60
63
 
61
64
  body = arguments[:body]
62
- perform_request(method, path, params, body).body
65
+ perform_request(method, path, params, body, headers).body
63
66
  end
64
67
 
65
68
  # Deprecated: Use the plural version, {#termvectors}
@@ -23,7 +23,7 @@ module Elasticsearch
23
23
  # @option arguments [Time] :timeout Explicit operation timeout
24
24
  # @option arguments [Number] :if_seq_no only perform the update operation if the last operation that has changed the document has the specified sequence number
25
25
  # @option arguments [Number] :if_primary_term only perform the update operation if the last operation that has changed the document has the specified primary term
26
-
26
+ # @option arguments [Hash] :headers Custom HTTP headers
27
27
  # @option arguments [Hash] :body The request definition requires either `script` or partial `doc` (*Required*)
28
28
  #
29
29
  # *Deprecation notice*:
@@ -31,13 +31,15 @@ module Elasticsearch
31
31
  # Deprecated since version 7.0.0
32
32
  #
33
33
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-update.html
34
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update.html
35
35
  #
36
36
  def update(arguments = {})
37
37
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
38
38
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
39
39
  raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
40
40
 
41
+ headers = arguments.delete(:headers) || {}
42
+
41
43
  arguments = arguments.clone
42
44
 
43
45
  _id = arguments.delete(:id)
@@ -56,9 +58,9 @@ module Elasticsearch
56
58
 
57
59
  body = arguments[:body]
58
60
  if Array(arguments[:ignore]).include?(404)
59
- Utils.__rescue_from_not_found { perform_request(method, path, params, body).body }
61
+ Utils.__rescue_from_not_found { perform_request(method, path, params, body, headers).body }
60
62
  else
61
- perform_request(method, path, params, body).body
63
+ perform_request(method, path, params, body, headers).body
62
64
  end
63
65
  end
64
66
 
@@ -23,7 +23,7 @@ module Elasticsearch
23
23
  # (options: abort,proceed)
24
24
 
25
25
  # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
26
- # (options: open,closed,none,all)
26
+ # (options: open,closed,hidden,none,all)
27
27
 
28
28
  # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
29
29
  # @option arguments [String] :pipeline Ingest pipeline to set on index requests made by this action. (default: none)
@@ -52,8 +52,8 @@ module Elasticsearch
52
52
  # @option arguments [Number] :scroll_size Size on the scroll request powering the update by query
53
53
  # @option arguments [Boolean] :wait_for_completion Should the request should block until the update by query operation is complete.
54
54
  # @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle.
55
- # @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.
56
-
55
+ # @option arguments [Number|string] :slices The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`.
56
+ # @option arguments [Hash] :headers Custom HTTP headers
57
57
  # @option arguments [Hash] :body The search definition using the Query DSL
58
58
  #
59
59
  # *Deprecation notice*:
@@ -61,11 +61,13 @@ module Elasticsearch
61
61
  # Deprecated since version 7.0.0
62
62
  #
63
63
  #
64
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-update-by-query.html
64
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update-by-query.html
65
65
  #
66
66
  def update_by_query(arguments = {})
67
67
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
68
68
 
69
+ headers = arguments.delete(:headers) || {}
70
+
69
71
  arguments = arguments.clone
70
72
 
71
73
  _index = arguments.delete(:index)
@@ -81,7 +83,7 @@ module Elasticsearch
81
83
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
82
84
 
83
85
  body = arguments[:body]
84
- perform_request(method, path, params, body).body
86
+ perform_request(method, path, params, body, headers).body
85
87
  end
86
88
 
87
89
  # Register this action with its valid params when the module is loaded.
@@ -9,13 +9,15 @@ module Elasticsearch
9
9
  #
10
10
  # @option arguments [String] :task_id The task id to rethrottle
11
11
  # @option arguments [Number] :requests_per_second The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. (*Required*)
12
-
12
+ # @option arguments [Hash] :headers Custom HTTP headers
13
13
  #
14
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.5/docs-update-by-query.html
14
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.7/docs-update-by-query.html
15
15
  #
16
16
  def update_by_query_rethrottle(arguments = {})
17
17
  raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
18
18
 
19
+ headers = arguments.delete(:headers) || {}
20
+
19
21
  arguments = arguments.clone
20
22
 
21
23
  _task_id = arguments.delete(:task_id)
@@ -25,7 +27,7 @@ module Elasticsearch
25
27
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
26
28
 
27
29
  body = nil
28
- perform_request(method, path, params, body).body
30
+ perform_request(method, path, params, body, headers).body
29
31
  end
30
32
 
31
33
  # Register this action with its valid params when the module is loaded.
@@ -4,6 +4,6 @@
4
4
 
5
5
  module Elasticsearch
6
6
  module API
7
- VERSION = "7.6.0"
7
+ VERSION = "7.7.0"
8
8
  end
9
9
  end
@@ -12,7 +12,7 @@ describe 'client.cat#aliases' do
12
12
  '_cat/aliases',
13
13
  {},
14
14
  nil,
15
- nil
15
+ {}
16
16
  ]
17
17
  end
18
18
 
@@ -12,7 +12,7 @@ describe 'client.cat#allocation' do
12
12
  '_cat/allocation',
13
13
  {},
14
14
  nil,
15
- nil
15
+ {}
16
16
  ]
17
17
  end
18
18
 
@@ -12,7 +12,7 @@ describe 'client.cat#count' do
12
12
  '_cat/count',
13
13
  {},
14
14
  nil,
15
- nil
15
+ {}
16
16
  ]
17
17
  end
18
18
 
@@ -12,7 +12,7 @@ describe 'client.cat#fielddata' do
12
12
  '_cat/fielddata',
13
13
  {},
14
14
  nil,
15
- nil
15
+ {}
16
16
  ]
17
17
  end
18
18
 
@@ -28,7 +28,7 @@ describe 'client.cat#fielddata' do
28
28
  '_cat/fielddata/foo,bar',
29
29
  {},
30
30
  nil,
31
- nil
31
+ {}
32
32
  ]
33
33
  end
34
34
 
@@ -12,7 +12,7 @@ describe 'client.cat#health' do
12
12
  '_cat/health',
13
13
  {},
14
14
  nil,
15
- nil
15
+ {}
16
16
  ]
17
17
  end
18
18