elasticsearch-api 7.17.11 → 9.0.2

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 (711) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -163
  3. data/elasticsearch-api.gemspec +19 -33
  4. data/lib/elasticsearch/api/actions/async_search/delete.rb +63 -0
  5. data/lib/elasticsearch/api/actions/async_search/get.rb +71 -0
  6. data/lib/elasticsearch/api/actions/async_search/status.rb +66 -0
  7. data/lib/elasticsearch/api/actions/async_search/submit.rb +113 -0
  8. data/lib/elasticsearch/api/actions/bulk.rb +135 -49
  9. data/lib/elasticsearch/api/actions/cat/aliases.rb +41 -31
  10. data/lib/elasticsearch/api/actions/cat/allocation.rb +40 -33
  11. data/lib/elasticsearch/api/actions/cat/component_templates.rb +82 -0
  12. data/lib/elasticsearch/api/actions/cat/count.rb +38 -27
  13. data/lib/elasticsearch/api/actions/cat/fielddata.rb +36 -29
  14. data/lib/elasticsearch/api/actions/cat/health.rb +36 -29
  15. data/lib/elasticsearch/api/actions/cat/help.rb +16 -18
  16. data/lib/elasticsearch/api/actions/cat/indices.rb +51 -43
  17. data/lib/elasticsearch/api/actions/cat/master.rb +31 -28
  18. data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +77 -0
  19. data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +84 -0
  20. data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +85 -0
  21. data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +80 -0
  22. data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +31 -28
  23. data/lib/elasticsearch/api/actions/cat/nodes.rb +32 -37
  24. data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +33 -31
  25. data/lib/elasticsearch/api/actions/cat/plugins.rb +31 -29
  26. data/lib/elasticsearch/api/actions/cat/recovery.rb +41 -36
  27. data/lib/elasticsearch/api/actions/cat/repositories.rb +31 -28
  28. data/lib/elasticsearch/api/actions/cat/segments.rb +42 -28
  29. data/lib/elasticsearch/api/actions/cat/shards.rb +40 -35
  30. data/lib/elasticsearch/api/actions/cat/snapshots.rb +40 -32
  31. data/lib/elasticsearch/api/actions/cat/tasks.rb +38 -34
  32. data/lib/elasticsearch/api/actions/cat/templates.rb +40 -30
  33. data/lib/elasticsearch/api/actions/cat/thread_pool.rb +42 -34
  34. data/lib/elasticsearch/api/actions/cat/transforms.rb +80 -0
  35. data/lib/elasticsearch/api/actions/clear_scroll.rb +28 -14
  36. data/lib/elasticsearch/api/actions/close_point_in_time.rb +19 -8
  37. data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +24 -20
  38. data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +26 -19
  39. data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +23 -16
  40. data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +29 -20
  41. data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +30 -20
  42. data/lib/elasticsearch/api/actions/cluster/get_settings.rb +22 -22
  43. data/lib/elasticsearch/api/actions/cluster/health.rb +40 -38
  44. data/lib/elasticsearch/api/actions/cluster/info.rb +61 -0
  45. data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +23 -19
  46. data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +38 -20
  47. data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +42 -22
  48. data/lib/elasticsearch/api/actions/cluster/put_settings.rb +31 -20
  49. data/lib/elasticsearch/api/actions/cluster/remote_info.rb +16 -7
  50. data/lib/elasticsearch/api/actions/cluster/reroute.rb +32 -27
  51. data/lib/elasticsearch/api/actions/cluster/state.rb +43 -32
  52. data/lib/elasticsearch/api/actions/cluster/stats.rb +27 -20
  53. data/lib/elasticsearch/api/actions/connector/check_in.rb +65 -0
  54. data/lib/elasticsearch/api/actions/connector/delete.rb +70 -0
  55. data/lib/elasticsearch/api/actions/connector/get.rb +66 -0
  56. data/lib/elasticsearch/api/actions/connector/list.rb +62 -0
  57. data/lib/elasticsearch/api/actions/connector/post.rb +58 -0
  58. data/lib/elasticsearch/api/actions/connector/put.rb +67 -0
  59. data/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +69 -0
  60. data/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +70 -0
  61. data/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +76 -0
  62. data/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +69 -0
  63. data/lib/elasticsearch/api/actions/connector/sync_job_error.rb +73 -0
  64. data/lib/elasticsearch/api/actions/connector/sync_job_get.rb +67 -0
  65. data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +60 -0
  66. data/lib/elasticsearch/api/actions/connector/sync_job_post.rb +58 -0
  67. data/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +75 -0
  68. data/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +65 -0
  69. data/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +70 -0
  70. data/lib/elasticsearch/api/actions/connector/update_configuration.rb +67 -0
  71. data/lib/elasticsearch/api/actions/connector/update_error.rb +69 -0
  72. data/lib/elasticsearch/api/actions/connector/update_features.rb +76 -0
  73. data/lib/elasticsearch/api/actions/connector/update_filtering.rb +69 -0
  74. data/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +67 -0
  75. data/lib/elasticsearch/api/actions/connector/update_index_name.rb +67 -0
  76. data/lib/elasticsearch/api/actions/connector/update_name.rb +66 -0
  77. data/lib/elasticsearch/api/actions/connector/update_native.rb +66 -0
  78. data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +67 -0
  79. data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +66 -0
  80. data/lib/elasticsearch/api/actions/connector/update_service_type.rb +66 -0
  81. data/lib/elasticsearch/api/actions/connector/update_status.rb +66 -0
  82. data/lib/elasticsearch/api/actions/count.rb +63 -57
  83. data/lib/elasticsearch/api/actions/create.rb +117 -25
  84. data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +64 -0
  85. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +69 -0
  86. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +65 -0
  87. data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +64 -0
  88. data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +72 -0
  89. data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +67 -0
  90. data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +69 -0
  91. data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +67 -0
  92. data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +68 -0
  93. data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +66 -0
  94. data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +66 -0
  95. data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +55 -0
  96. data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +66 -0
  97. data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +25 -20
  98. data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +26 -20
  99. data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +17 -7
  100. data/lib/elasticsearch/api/actions/delete.rb +66 -45
  101. data/lib/elasticsearch/api/actions/delete_by_query.rb +133 -88
  102. data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +25 -17
  103. data/lib/elasticsearch/api/actions/delete_script.rb +28 -19
  104. data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +62 -0
  105. data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +63 -0
  106. data/lib/elasticsearch/api/actions/enrich/get_policy.rb +65 -0
  107. data/lib/elasticsearch/api/actions/enrich/put_policy.rb +64 -0
  108. data/lib/elasticsearch/api/actions/enrich/stats.rb +52 -0
  109. data/lib/elasticsearch/api/actions/eql/delete.rb +64 -0
  110. data/lib/elasticsearch/api/actions/eql/get.rb +65 -0
  111. data/lib/elasticsearch/api/actions/eql/get_status.rb +61 -0
  112. data/lib/elasticsearch/api/actions/eql/search.rb +73 -0
  113. data/lib/elasticsearch/api/actions/esql/async_query.rb +70 -0
  114. data/lib/elasticsearch/api/actions/esql/async_query_delete.rb +67 -0
  115. data/lib/elasticsearch/api/actions/esql/async_query_get.rb +72 -0
  116. data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +66 -0
  117. data/lib/elasticsearch/api/actions/esql/query.rb +61 -0
  118. data/lib/elasticsearch/api/actions/exists.rb +58 -51
  119. data/lib/elasticsearch/api/actions/exists_source.rb +42 -47
  120. data/lib/elasticsearch/api/actions/explain.rb +50 -54
  121. data/lib/elasticsearch/api/actions/features/get_features.rb +23 -16
  122. data/lib/elasticsearch/api/actions/features/reset_features.rb +26 -8
  123. data/lib/elasticsearch/api/actions/field_caps.rb +40 -28
  124. data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +70 -0
  125. data/lib/elasticsearch/api/actions/fleet/msearch.rb +110 -0
  126. data/lib/elasticsearch/api/actions/fleet/search.rb +119 -0
  127. data/lib/elasticsearch/api/actions/get.rb +94 -49
  128. data/lib/elasticsearch/api/actions/get_script.rb +25 -17
  129. data/lib/elasticsearch/api/actions/get_script_context.rb +15 -7
  130. data/lib/elasticsearch/api/actions/get_script_languages.rb +15 -7
  131. data/lib/elasticsearch/api/actions/get_source.rb +44 -46
  132. data/lib/elasticsearch/api/actions/graph/explore.rb +75 -0
  133. data/lib/elasticsearch/api/actions/health_report.rb +75 -0
  134. data/lib/elasticsearch/api/actions/index.rb +138 -53
  135. data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +63 -0
  136. data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +67 -0
  137. data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +64 -0
  138. data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +51 -0
  139. data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +66 -0
  140. data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +71 -0
  141. data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +65 -0
  142. data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +62 -0
  143. data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +63 -0
  144. data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +55 -0
  145. data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +56 -0
  146. data/lib/elasticsearch/api/actions/indices/add_block.rb +40 -26
  147. data/lib/elasticsearch/api/actions/indices/analyze.rb +31 -19
  148. data/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +65 -0
  149. data/lib/elasticsearch/api/actions/indices/clear_cache.rb +41 -31
  150. data/lib/elasticsearch/api/actions/indices/clone.rb +59 -23
  151. data/lib/elasticsearch/api/actions/indices/close.rb +47 -27
  152. data/lib/elasticsearch/api/actions/indices/create.rb +43 -24
  153. data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +68 -0
  154. data/lib/elasticsearch/api/actions/indices/create_from.rb +71 -0
  155. data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +67 -0
  156. data/lib/elasticsearch/api/actions/indices/delete.rb +45 -26
  157. data/lib/elasticsearch/api/actions/indices/delete_alias.rb +29 -22
  158. data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +64 -0
  159. data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +63 -0
  160. data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +26 -23
  161. data/lib/elasticsearch/api/actions/indices/delete_template.rb +31 -20
  162. data/lib/elasticsearch/api/actions/indices/disk_usage.rb +39 -25
  163. data/lib/elasticsearch/api/actions/indices/downsample.rb +76 -0
  164. data/lib/elasticsearch/api/actions/indices/exists.rb +32 -30
  165. data/lib/elasticsearch/api/actions/indices/exists_alias.rb +34 -28
  166. data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +26 -25
  167. data/lib/elasticsearch/api/actions/indices/exists_template.rb +30 -24
  168. data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +63 -0
  169. data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +34 -23
  170. data/lib/elasticsearch/api/actions/indices/flush.rb +42 -26
  171. data/lib/elasticsearch/api/actions/indices/forcemerge.rb +64 -25
  172. data/lib/elasticsearch/api/actions/indices/get.rb +36 -31
  173. data/lib/elasticsearch/api/actions/indices/get_alias.rb +39 -27
  174. data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +68 -0
  175. data/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +51 -0
  176. data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +69 -0
  177. data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +42 -44
  178. data/lib/elasticsearch/api/actions/indices/get_index_template.rb +27 -22
  179. data/lib/elasticsearch/api/actions/indices/get_mapping.rb +36 -41
  180. data/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +65 -0
  181. data/lib/elasticsearch/api/actions/indices/get_settings.rb +45 -33
  182. data/lib/elasticsearch/api/actions/indices/get_template.rb +30 -24
  183. data/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +60 -0
  184. data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +72 -0
  185. data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +54 -0
  186. data/lib/elasticsearch/api/actions/indices/open.rb +54 -27
  187. data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +69 -0
  188. data/lib/elasticsearch/api/actions/indices/put_alias.rb +32 -23
  189. data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +72 -0
  190. data/lib/elasticsearch/api/actions/indices/put_index_template.rb +45 -21
  191. data/lib/elasticsearch/api/actions/indices/put_mapping.rb +54 -44
  192. data/lib/elasticsearch/api/actions/indices/put_settings.rb +58 -31
  193. data/lib/elasticsearch/api/actions/indices/put_template.rb +43 -24
  194. data/lib/elasticsearch/api/actions/indices/recovery.rb +42 -20
  195. data/lib/elasticsearch/api/actions/indices/refresh.rb +40 -22
  196. data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +74 -0
  197. data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +115 -0
  198. data/lib/elasticsearch/api/actions/indices/resolve_index.rb +32 -17
  199. data/lib/elasticsearch/api/actions/indices/rollover.rb +60 -29
  200. data/lib/elasticsearch/api/actions/indices/segments.rb +33 -24
  201. data/lib/elasticsearch/api/actions/indices/shard_stores.rb +37 -24
  202. data/lib/elasticsearch/api/actions/indices/shrink.rb +51 -25
  203. data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +25 -21
  204. data/lib/elasticsearch/api/actions/indices/simulate_template.rb +28 -22
  205. data/lib/elasticsearch/api/actions/indices/split.rb +52 -25
  206. data/lib/elasticsearch/api/actions/indices/stats.rb +53 -58
  207. data/lib/elasticsearch/api/actions/indices/update_aliases.rb +21 -19
  208. data/lib/elasticsearch/api/actions/indices/validate_query.rb +46 -53
  209. data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +63 -0
  210. data/lib/elasticsearch/api/actions/inference/completion.rb +62 -0
  211. data/lib/elasticsearch/api/actions/inference/delete.rb +69 -0
  212. data/lib/elasticsearch/api/actions/inference/get.rb +67 -0
  213. data/lib/elasticsearch/api/actions/inference/inference.rb +73 -0
  214. data/lib/elasticsearch/api/actions/inference/put.rb +77 -0
  215. data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +75 -0
  216. data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +70 -0
  217. data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +76 -0
  218. data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +75 -0
  219. data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +80 -0
  220. data/lib/elasticsearch/api/actions/inference/put_cohere.rb +75 -0
  221. data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +71 -0
  222. data/lib/elasticsearch/api/actions/inference/put_elser.rb +67 -0
  223. data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +75 -0
  224. data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +75 -0
  225. data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +86 -0
  226. data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +77 -0
  227. data/lib/elasticsearch/api/actions/inference/put_mistral.rb +76 -0
  228. data/lib/elasticsearch/api/actions/inference/put_openai.rb +76 -0
  229. data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +71 -0
  230. data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +78 -0
  231. data/lib/elasticsearch/api/actions/inference/rerank.rb +62 -0
  232. data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +62 -0
  233. data/lib/elasticsearch/api/actions/inference/stream_completion.rb +65 -0
  234. data/lib/elasticsearch/api/actions/inference/text_embedding.rb +62 -0
  235. data/lib/elasticsearch/api/actions/inference/update.rb +73 -0
  236. data/lib/elasticsearch/api/actions/info.rb +15 -7
  237. data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +64 -0
  238. data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +66 -0
  239. data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +27 -19
  240. data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +15 -7
  241. data/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +65 -0
  242. data/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +67 -0
  243. data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +28 -19
  244. data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +17 -7
  245. data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +66 -0
  246. data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +68 -0
  247. data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +25 -21
  248. data/lib/elasticsearch/api/actions/ingest/simulate.rb +27 -19
  249. data/lib/elasticsearch/api/actions/license/delete.rb +54 -0
  250. data/lib/elasticsearch/api/actions/license/get.rb +54 -0
  251. data/lib/elasticsearch/api/actions/{shutdown/get_node.rb → license/get_basic_status.rb} +15 -15
  252. data/lib/elasticsearch/api/actions/{shutdown/delete_node.rb → license/get_trial_status.rb} +16 -14
  253. data/lib/elasticsearch/api/actions/license/post.rb +60 -0
  254. data/lib/elasticsearch/api/actions/license/post_start_basic.rb +58 -0
  255. data/lib/elasticsearch/api/actions/license/post_start_trial.rb +57 -0
  256. data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +62 -0
  257. data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +63 -0
  258. data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +64 -0
  259. data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +64 -0
  260. data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +70 -0
  261. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +61 -0
  262. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +65 -0
  263. data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +65 -0
  264. data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +62 -0
  265. data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +65 -0
  266. data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +75 -0
  267. data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +62 -0
  268. data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +80 -0
  269. data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +73 -0
  270. data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +67 -0
  271. data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +63 -0
  272. data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +67 -0
  273. data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +56 -0
  274. data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +57 -0
  275. data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +76 -0
  276. data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +79 -0
  277. data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +77 -0
  278. data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +86 -0
  279. data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +65 -0
  280. data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +70 -0
  281. data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +80 -0
  282. data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +81 -0
  283. data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +76 -0
  284. data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +78 -0
  285. data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +80 -0
  286. data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +65 -0
  287. data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +83 -0
  288. data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +73 -0
  289. data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +79 -0
  290. data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +69 -0
  291. data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +73 -0
  292. data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +82 -0
  293. data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +105 -0
  294. data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +86 -0
  295. data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +82 -0
  296. data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +73 -0
  297. data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +63 -0
  298. data/lib/elasticsearch/api/actions/machine_learning/info.rb +57 -0
  299. data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +68 -0
  300. data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +62 -0
  301. data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +66 -0
  302. data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +69 -0
  303. data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +81 -0
  304. data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +61 -0
  305. data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +64 -0
  306. data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +69 -0
  307. data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +80 -0
  308. data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +64 -0
  309. data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +75 -0
  310. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +68 -0
  311. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +83 -0
  312. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +67 -0
  313. data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +64 -0
  314. data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +69 -0
  315. data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +80 -0
  316. data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +66 -0
  317. data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +75 -0
  318. data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +87 -0
  319. data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +83 -0
  320. data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +76 -0
  321. data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +74 -0
  322. data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +66 -0
  323. data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +64 -0
  324. data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +79 -0
  325. data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +63 -0
  326. data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +63 -0
  327. data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +67 -0
  328. data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +67 -0
  329. data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +76 -0
  330. data/lib/elasticsearch/api/actions/mget.rb +49 -44
  331. data/lib/elasticsearch/api/actions/migration/deprecations.rb +65 -0
  332. data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +54 -0
  333. data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +54 -0
  334. data/lib/elasticsearch/api/actions/msearch.rb +68 -57
  335. data/lib/elasticsearch/api/actions/msearch_template.rb +49 -44
  336. data/lib/elasticsearch/api/actions/mtermvectors.rb +47 -58
  337. data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +27 -10
  338. data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +23 -8
  339. data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +33 -35
  340. data/lib/elasticsearch/api/actions/nodes/info.rb +28 -23
  341. data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +31 -19
  342. data/lib/elasticsearch/api/actions/nodes/stats.rb +39 -40
  343. data/lib/elasticsearch/api/actions/nodes/usage.rb +28 -21
  344. data/lib/elasticsearch/api/actions/open_point_in_time.rb +59 -25
  345. data/lib/elasticsearch/api/actions/ping.rb +16 -12
  346. data/lib/elasticsearch/api/actions/put_script.rb +33 -23
  347. data/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +66 -0
  348. data/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +70 -0
  349. data/lib/elasticsearch/api/actions/query_rules/get_rule.rb +65 -0
  350. data/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +61 -0
  351. data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +53 -0
  352. data/lib/elasticsearch/api/actions/query_rules/put_rule.rb +71 -0
  353. data/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +68 -0
  354. data/lib/elasticsearch/api/actions/query_rules/test.rb +63 -0
  355. data/lib/elasticsearch/api/actions/rank_eval.rb +30 -25
  356. data/lib/elasticsearch/api/actions/reindex.rb +165 -33
  357. data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +31 -17
  358. data/lib/elasticsearch/api/actions/render_search_template.rb +25 -11
  359. data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +21 -9
  360. data/lib/elasticsearch/api/actions/scroll.rb +29 -26
  361. data/lib/elasticsearch/api/actions/search.rb +148 -116
  362. data/lib/elasticsearch/api/actions/search_application/delete.rb +65 -0
  363. data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +65 -0
  364. data/lib/elasticsearch/api/actions/search_application/get.rb +64 -0
  365. data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +66 -0
  366. data/lib/elasticsearch/api/actions/search_application/list.rb +58 -0
  367. data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +71 -0
  368. data/lib/elasticsearch/api/actions/search_application/put.rb +67 -0
  369. data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +64 -0
  370. data/lib/elasticsearch/api/actions/search_application/render_query.rb +69 -0
  371. data/lib/elasticsearch/api/actions/search_application/search.rb +73 -0
  372. data/lib/elasticsearch/api/actions/search_mvt.rb +167 -35
  373. data/lib/elasticsearch/api/actions/search_shards.rb +43 -28
  374. data/lib/elasticsearch/api/actions/search_template.rb +46 -54
  375. data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +68 -0
  376. data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +71 -0
  377. data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +74 -0
  378. data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +63 -0
  379. data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +62 -0
  380. data/lib/elasticsearch/api/actions/security/authenticate.rb +54 -0
  381. data/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +56 -0
  382. data/lib/elasticsearch/api/actions/security/bulk_put_role.rb +56 -0
  383. data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +62 -0
  384. data/lib/elasticsearch/api/actions/security/change_password.rb +68 -0
  385. data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +64 -0
  386. data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +64 -0
  387. data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +69 -0
  388. data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +63 -0
  389. data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +75 -0
  390. data/lib/elasticsearch/api/actions/security/create_api_key.rb +62 -0
  391. data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +62 -0
  392. data/lib/elasticsearch/api/actions/security/create_service_token.rb +78 -0
  393. data/lib/elasticsearch/api/actions/security/delegate_pki.rb +60 -0
  394. data/lib/elasticsearch/api/actions/security/delete_privileges.rb +69 -0
  395. data/lib/elasticsearch/api/actions/security/delete_role.rb +64 -0
  396. data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +65 -0
  397. data/lib/elasticsearch/api/actions/security/delete_service_token.rb +70 -0
  398. data/lib/elasticsearch/api/actions/security/delete_user.rb +62 -0
  399. data/lib/elasticsearch/api/actions/security/disable_user.rb +64 -0
  400. data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +69 -0
  401. data/lib/elasticsearch/api/actions/security/enable_user.rb +63 -0
  402. data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +70 -0
  403. data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +53 -0
  404. data/lib/elasticsearch/api/actions/security/enroll_node.rb +53 -0
  405. data/lib/elasticsearch/api/actions/security/get_api_key.rb +70 -0
  406. data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +51 -0
  407. data/lib/elasticsearch/api/actions/security/get_privileges.rb +73 -0
  408. data/lib/elasticsearch/api/actions/security/get_role.rb +75 -0
  409. data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +65 -0
  410. data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +72 -0
  411. data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +68 -0
  412. data/lib/elasticsearch/api/actions/security/get_settings.rb +57 -0
  413. data/lib/elasticsearch/api/actions/security/get_token.rb +62 -0
  414. data/lib/elasticsearch/api/actions/security/get_user.rb +72 -0
  415. data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +57 -0
  416. data/lib/elasticsearch/api/actions/security/get_user_profile.rb +68 -0
  417. data/lib/elasticsearch/api/actions/security/grant_api_key.rb +68 -0
  418. data/lib/elasticsearch/api/actions/security/has_privileges.rb +68 -0
  419. data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +56 -0
  420. data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +63 -0
  421. data/lib/elasticsearch/api/actions/security/invalidate_token.rb +62 -0
  422. data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +56 -0
  423. data/lib/elasticsearch/api/actions/security/oidc_logout.rb +57 -0
  424. data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +57 -0
  425. data/lib/elasticsearch/api/actions/security/put_privileges.rb +66 -0
  426. data/lib/elasticsearch/api/actions/security/put_role.rb +66 -0
  427. data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +81 -0
  428. data/lib/elasticsearch/api/actions/security/put_user.rb +69 -0
  429. data/lib/elasticsearch/api/actions/security/query_api_keys.rb +67 -0
  430. data/lib/elasticsearch/api/actions/security/query_role.rb +61 -0
  431. data/lib/elasticsearch/api/actions/security/query_user.rb +61 -0
  432. data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +62 -0
  433. data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +61 -0
  434. data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +60 -0
  435. data/lib/elasticsearch/api/actions/security/saml_logout.rb +58 -0
  436. data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +63 -0
  437. data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +63 -0
  438. data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +65 -0
  439. data/lib/elasticsearch/api/actions/security/update_api_key.rb +74 -0
  440. data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +72 -0
  441. data/lib/elasticsearch/api/actions/security/update_settings.rb +61 -0
  442. data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +79 -0
  443. data/lib/elasticsearch/api/actions/simulate/ingest.rb +85 -0
  444. data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +28 -19
  445. data/lib/elasticsearch/api/actions/snapshot/clone.rb +28 -20
  446. data/lib/elasticsearch/api/actions/snapshot/create.rb +30 -21
  447. data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +36 -22
  448. data/lib/elasticsearch/api/actions/snapshot/delete.rb +31 -19
  449. data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +35 -20
  450. data/lib/elasticsearch/api/actions/snapshot/get.rb +58 -41
  451. data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +33 -21
  452. data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +113 -37
  453. data/lib/elasticsearch/api/actions/snapshot/restore.rb +40 -21
  454. data/lib/elasticsearch/api/actions/snapshot/status.rb +48 -23
  455. data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +28 -19
  456. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +66 -0
  457. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +66 -0
  458. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +56 -0
  459. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +67 -0
  460. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +53 -0
  461. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +56 -0
  462. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +70 -0
  463. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +58 -0
  464. data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +62 -0
  465. data/lib/elasticsearch/api/actions/{shutdown/put_node.rb → sql/clear_cursor.rb} +18 -15
  466. data/lib/elasticsearch/api/actions/sql/delete_async.rb +65 -0
  467. data/lib/elasticsearch/api/actions/sql/get_async.rb +71 -0
  468. data/lib/elasticsearch/api/actions/sql/get_async_status.rb +61 -0
  469. data/lib/elasticsearch/api/actions/sql/query.rb +57 -0
  470. data/lib/elasticsearch/api/actions/sql/translate.rb +55 -0
  471. data/lib/elasticsearch/api/actions/ssl/certificates.rb +60 -0
  472. data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +72 -0
  473. data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +65 -0
  474. data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +62 -0
  475. data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +65 -0
  476. data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +53 -0
  477. data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +66 -0
  478. data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +69 -0
  479. data/lib/elasticsearch/api/actions/tasks/cancel.rb +34 -24
  480. data/lib/elasticsearch/api/actions/tasks/get.rb +30 -19
  481. data/lib/elasticsearch/api/actions/tasks/list.rb +80 -28
  482. data/lib/elasticsearch/api/actions/terms_enum.rb +68 -0
  483. data/lib/elasticsearch/api/actions/termvectors.rb +69 -59
  484. data/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +127 -0
  485. data/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +126 -0
  486. data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +149 -0
  487. data/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +58 -0
  488. data/lib/elasticsearch/api/actions/transform/delete_transform.rb +65 -0
  489. data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +55 -0
  490. data/lib/elasticsearch/api/actions/transform/get_transform.rb +77 -0
  491. data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +73 -0
  492. data/lib/elasticsearch/api/actions/transform/preview_transform.rb +75 -0
  493. data/lib/elasticsearch/api/actions/transform/put_transform.rb +86 -0
  494. data/lib/elasticsearch/api/actions/transform/reset_transform.rb +66 -0
  495. data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +66 -0
  496. data/lib/elasticsearch/api/actions/transform/start_transform.rb +75 -0
  497. data/lib/elasticsearch/api/actions/transform/stop_transform.rb +74 -0
  498. data/lib/elasticsearch/api/actions/transform/update_transform.rb +73 -0
  499. data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +64 -0
  500. data/lib/elasticsearch/api/actions/update.rb +61 -54
  501. data/lib/elasticsearch/api/actions/update_by_query.rb +144 -92
  502. data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +25 -17
  503. data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +74 -0
  504. data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +61 -0
  505. data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +61 -0
  506. data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +73 -0
  507. data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +73 -0
  508. data/lib/elasticsearch/api/actions/watcher/get_settings.rb +54 -0
  509. data/lib/elasticsearch/api/actions/watcher/get_watch.rb +60 -0
  510. data/lib/elasticsearch/api/actions/watcher/put_watch.rb +74 -0
  511. data/lib/elasticsearch/api/actions/watcher/query_watches.rb +58 -0
  512. data/lib/elasticsearch/api/actions/watcher/start.rb +52 -0
  513. data/lib/elasticsearch/api/actions/watcher/stats.rb +65 -0
  514. data/lib/elasticsearch/api/actions/watcher/stop.rb +54 -0
  515. data/lib/elasticsearch/api/actions/watcher/update_settings.rb +63 -0
  516. data/lib/elasticsearch/api/actions/xpack/info.rb +59 -0
  517. data/lib/elasticsearch/api/actions/xpack/usage.rb +55 -0
  518. data/lib/elasticsearch/api/response.rb +48 -0
  519. data/lib/elasticsearch/api/utils.rb +34 -143
  520. data/lib/elasticsearch/api/version.rb +2 -1
  521. data/lib/elasticsearch/api.rb +81 -47
  522. metadata +389 -434
  523. data/Gemfile +0 -43
  524. data/Rakefile +0 -124
  525. data/lib/elasticsearch/api/actions/cat/params_registry.rb +0 -60
  526. data/lib/elasticsearch/api/actions/cluster/params_registry.rb +0 -60
  527. data/lib/elasticsearch/api/actions/dangling_indices/params_registry.rb +0 -60
  528. data/lib/elasticsearch/api/actions/features/params_registry.rb +0 -60
  529. data/lib/elasticsearch/api/actions/indices/exists_type.rb +0 -71
  530. data/lib/elasticsearch/api/actions/indices/flush_synced.rb +0 -71
  531. data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +0 -67
  532. data/lib/elasticsearch/api/actions/indices/params_registry.rb +0 -60
  533. data/lib/elasticsearch/api/actions/indices/upgrade.rb +0 -71
  534. data/lib/elasticsearch/api/actions/ingest/params_registry.rb +0 -60
  535. data/lib/elasticsearch/api/actions/nodes/params_registry.rb +0 -60
  536. data/lib/elasticsearch/api/actions/params_registry.rb +0 -58
  537. data/lib/elasticsearch/api/actions/shutdown/params_registry.rb +0 -60
  538. data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +0 -60
  539. data/lib/elasticsearch/api/actions/tasks/params_registry.rb +0 -60
  540. data/lib/elasticsearch/api/namespace/cat.rb +0 -36
  541. data/lib/elasticsearch/api/namespace/cluster.rb +0 -37
  542. data/lib/elasticsearch/api/namespace/common.rb +0 -44
  543. data/lib/elasticsearch/api/namespace/dangling_indices.rb +0 -35
  544. data/lib/elasticsearch/api/namespace/features.rb +0 -36
  545. data/lib/elasticsearch/api/namespace/indices.rb +0 -37
  546. data/lib/elasticsearch/api/namespace/ingest.rb +0 -37
  547. data/lib/elasticsearch/api/namespace/nodes.rb +0 -37
  548. data/lib/elasticsearch/api/namespace/remote.rb +0 -37
  549. data/lib/elasticsearch/api/namespace/security.rb +0 -36
  550. data/lib/elasticsearch/api/namespace/shutdown.rb +0 -37
  551. data/lib/elasticsearch/api/namespace/snapshot.rb +0 -37
  552. data/lib/elasticsearch/api/namespace/tasks.rb +0 -37
  553. data/spec/elasticsearch/api/actions/bulk_spec.rb +0 -139
  554. data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +0 -35
  555. data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +0 -35
  556. data/spec/elasticsearch/api/actions/cat/count_spec.rb +0 -35
  557. data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +0 -52
  558. data/spec/elasticsearch/api/actions/cat/health_spec.rb +0 -35
  559. data/spec/elasticsearch/api/actions/cat/help_spec.rb +0 -35
  560. data/spec/elasticsearch/api/actions/cat/indices_spec.rb +0 -35
  561. data/spec/elasticsearch/api/actions/cat/master_spec.rb +0 -35
  562. data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +0 -35
  563. data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +0 -35
  564. data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +0 -35
  565. data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +0 -35
  566. data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +0 -35
  567. data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +0 -35
  568. data/spec/elasticsearch/api/actions/cat/segments_spec.rb +0 -49
  569. data/spec/elasticsearch/api/actions/cat/shards_spec.rb +0 -35
  570. data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +0 -35
  571. data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +0 -35
  572. data/spec/elasticsearch/api/actions/cat/templates_spec.rb +0 -35
  573. data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +0 -35
  574. data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +0 -52
  575. data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +0 -34
  576. data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +0 -35
  577. data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +0 -35
  578. data/spec/elasticsearch/api/actions/cluster/health_spec.rb +0 -69
  579. data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +0 -35
  580. data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +0 -35
  581. data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +0 -35
  582. data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +0 -52
  583. data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -52
  584. data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +0 -35
  585. data/spec/elasticsearch/api/actions/count_spec.rb +0 -66
  586. data/spec/elasticsearch/api/actions/create_document_spec.rb +0 -86
  587. data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +0 -48
  588. data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +0 -48
  589. data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +0 -36
  590. data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +0 -80
  591. data/spec/elasticsearch/api/actions/delete_document_spec.rb +0 -112
  592. data/spec/elasticsearch/api/actions/delete_script_spec.rb +0 -37
  593. data/spec/elasticsearch/api/actions/exists_document_spec.rb +0 -127
  594. data/spec/elasticsearch/api/actions/explain_document_spec.rb +0 -99
  595. data/spec/elasticsearch/api/actions/features/get_features_spec.rb +0 -34
  596. data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +0 -34
  597. data/spec/elasticsearch/api/actions/field_caps_spec.rb +0 -35
  598. data/spec/elasticsearch/api/actions/get_document_source_spec.rb +0 -101
  599. data/spec/elasticsearch/api/actions/get_document_spec.rb +0 -124
  600. data/spec/elasticsearch/api/actions/get_script_spec.rb +0 -50
  601. data/spec/elasticsearch/api/actions/hashie_spec.rb +0 -89
  602. data/spec/elasticsearch/api/actions/index_document_spec.rb +0 -137
  603. data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +0 -63
  604. data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -68
  605. data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +0 -80
  606. data/spec/elasticsearch/api/actions/indices/clone_spec.rb +0 -122
  607. data/spec/elasticsearch/api/actions/indices/close_spec.rb +0 -85
  608. data/spec/elasticsearch/api/actions/indices/create_spec.rb +0 -85
  609. data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +0 -83
  610. data/spec/elasticsearch/api/actions/indices/delete_spec.rb +0 -108
  611. data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +0 -86
  612. data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +0 -48
  613. data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +0 -108
  614. data/spec/elasticsearch/api/actions/indices/exists_spec.rb +0 -108
  615. data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +0 -93
  616. data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +0 -108
  617. data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +0 -46
  618. data/spec/elasticsearch/api/actions/indices/flush_spec.rb +0 -91
  619. data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +0 -90
  620. data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +0 -35
  621. data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +0 -61
  622. data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +0 -61
  623. data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +0 -83
  624. data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +0 -72
  625. data/spec/elasticsearch/api/actions/indices/get_spec.rb +0 -54
  626. data/spec/elasticsearch/api/actions/indices/open_spec.rb +0 -65
  627. data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +0 -89
  628. data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +0 -102
  629. data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -108
  630. data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +0 -107
  631. data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +0 -35
  632. data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -91
  633. data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +0 -58
  634. data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -91
  635. data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +0 -35
  636. data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +0 -42
  637. data/spec/elasticsearch/api/actions/indices/split_spec.rb +0 -35
  638. data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -124
  639. data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +0 -67
  640. data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +0 -35
  641. data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +0 -122
  642. data/spec/elasticsearch/api/actions/info_spec.rb +0 -35
  643. data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +0 -60
  644. data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +0 -34
  645. data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +0 -50
  646. data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +0 -60
  647. data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +0 -49
  648. data/spec/elasticsearch/api/actions/json_builders_spec.rb +0 -84
  649. data/spec/elasticsearch/api/actions/mget_spec.rb +0 -102
  650. data/spec/elasticsearch/api/actions/msearch_spec.rb +0 -151
  651. data/spec/elasticsearch/api/actions/msearch_template_spec.rb +0 -93
  652. data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +0 -46
  653. data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +0 -51
  654. data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +0 -44
  655. data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +0 -61
  656. data/spec/elasticsearch/api/actions/nodes/info_spec.rb +0 -102
  657. data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +0 -84
  658. data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +0 -76
  659. data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +0 -34
  660. data/spec/elasticsearch/api/actions/ping_spec.rb +0 -76
  661. data/spec/elasticsearch/api/actions/put_script_spec.rb +0 -56
  662. data/spec/elasticsearch/api/actions/reindex_spec.rb +0 -35
  663. data/spec/elasticsearch/api/actions/render_search_template_spec.rb +0 -52
  664. data/spec/elasticsearch/api/actions/scroll_spec.rb +0 -52
  665. data/spec/elasticsearch/api/actions/search_mvt_spec.rb +0 -52
  666. data/spec/elasticsearch/api/actions/search_shards_spec.rb +0 -35
  667. data/spec/elasticsearch/api/actions/search_spec.rb +0 -134
  668. data/spec/elasticsearch/api/actions/search_template_spec.rb +0 -34
  669. data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +0 -44
  670. data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +0 -46
  671. data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +0 -50
  672. data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +0 -67
  673. data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +0 -51
  674. data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +0 -51
  675. data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +0 -50
  676. data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +0 -51
  677. data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +0 -35
  678. data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +0 -51
  679. data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +0 -48
  680. data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +0 -51
  681. data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +0 -50
  682. data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +0 -35
  683. data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +0 -50
  684. data/spec/elasticsearch/api/actions/tasks/get_spec.rb +0 -35
  685. data/spec/elasticsearch/api/actions/tasks/list_spec.rb +0 -39
  686. data/spec/elasticsearch/api/actions/termvectors_spec.rb +0 -66
  687. data/spec/elasticsearch/api/actions/update_by_query_spec.rb +0 -35
  688. data/spec/elasticsearch/api/actions/update_document_spec.rb +0 -122
  689. data/spec/elasticsearch/api/api_spec.rb +0 -43
  690. data/spec/elasticsearch/api/client_spec.rb +0 -46
  691. data/spec/elasticsearch/api/rest_api_yaml_spec.rb +0 -159
  692. data/spec/elasticsearch/api/utils_spec.rb +0 -418
  693. data/spec/rest_yaml_tests_helper.rb +0 -135
  694. data/spec/skipped_tests.yml +0 -29
  695. data/spec/spec_helper.rb +0 -82
  696. data/utils/Gemfile +0 -28
  697. data/utils/README.md +0 -46
  698. data/utils/Thorfile +0 -6
  699. data/utils/thor/.rubocop.yml +0 -4
  700. data/utils/thor/generate_source.rb +0 -307
  701. data/utils/thor/generator/endpoint_specifics.rb +0 -187
  702. data/utils/thor/generator/files_helper.rb +0 -78
  703. data/utils/thor/lister.rb +0 -57
  704. data/utils/thor/templates/_documentation_top.erb +0 -58
  705. data/utils/thor/templates/_method_setup.erb +0 -53
  706. data/utils/thor/templates/_params_registry.erb +0 -31
  707. data/utils/thor/templates/_perform_request.erb +0 -56
  708. data/utils/thor/templates/method.erb +0 -73
  709. data/utils/thor/templates/test.erb +0 -43
  710. data/utils/thor/templates/test_helper.rb +0 -83
  711. /data/{LICENSE → LICENSE.txt} +0 -0
@@ -14,117 +14,169 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
-
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
18
21
  module Elasticsearch
19
22
  module API
20
23
  module Actions
21
- # Performs an update on every document in the index without changing the source,
22
- # for example to pick up a mapping change.
24
+ # Update documents.
25
+ # Updates documents that match the specified query.
26
+ # If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
27
+ # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:
28
+ # * +read+
29
+ # * +index+ or +write+
30
+ # You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
31
+ # When you submit an update by query request, Elasticsearch gets a snapshot of the data stream or index when it begins processing the request and updates matching documents using internal versioning.
32
+ # When the versions match, the document is updated and the version number is incremented.
33
+ # If a document changes between the time that the snapshot is taken and the update operation is processed, it results in a version conflict and the operation fails.
34
+ # You can opt to count version conflicts instead of halting and returning by setting +conflicts+ to +proceed+.
35
+ # Note that if you opt to count version conflicts, the operation could attempt to update more documents from the source than +max_docs+ until it has successfully updated +max_docs+ documents or it has gone through every document in the source query.
36
+ # NOTE: Documents with a version equal to 0 cannot be updated using update by query because internal versioning does not support 0 as a valid version number.
37
+ # While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.
38
+ # A bulk update request is performed for each batch of matching documents.
39
+ # Any query or update failures cause the update by query request to fail and the failures are shown in the response.
40
+ # Any update requests that completed successfully still stick, they are not rolled back.
41
+ # **Throttling update requests**
42
+ # To control the rate at which update by query issues batches of update operations, you can set +requests_per_second+ to any positive decimal number.
43
+ # This pads each batch with a wait time to throttle the rate.
44
+ # Set +requests_per_second+ to +-1+ to turn off throttling.
45
+ # Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
46
+ # The padding time is the difference between the batch size divided by the +requests_per_second+ and the time spent writing.
47
+ # By default the batch size is 1000, so if +requests_per_second+ is set to +500+:
48
+ # +
49
+ # target_time = 1000 / 500 per second = 2 seconds
50
+ # wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
51
+ # +
52
+ # Since the batch is issued as a single _bulk request, large batch sizes cause Elasticsearch to create many requests and wait before starting the next set.
53
+ # This is "bursty" instead of "smooth".
54
+ # **Slicing**
55
+ # Update by query supports sliced scroll to parallelize the update process.
56
+ # This can improve efficiency and provide a convenient way to break the request down into smaller parts.
57
+ # Setting +slices+ to +auto+ chooses a reasonable number for most data streams and indices.
58
+ # This setting will use one slice per shard, up to a certain limit.
59
+ # If there are multiple source data streams or indices, it will choose the number of slices based on the index or backing index with the smallest number of shards.
60
+ # Adding +slices+ to +_update_by_query+ just automates the manual process of creating sub-requests, which means it has some quirks:
61
+ # * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
62
+ # * Fetching the status of the task for the request with +slices+ only contains the status of completed slices.
63
+ # * These sub-requests are individually addressable for things like cancellation and rethrottling.
64
+ # * Rethrottling the request with +slices+ will rethrottle the unfinished sub-request proportionally.
65
+ # * Canceling the request with slices will cancel each sub-request.
66
+ # * Due to the nature of slices each sub-request won't get a perfectly even portion of the documents. All documents will be addressed, but some slices may be larger than others. Expect larger slices to have a more even distribution.
67
+ # * Parameters like +requests_per_second+ and +max_docs+ on a request with slices are distributed proportionally to each sub-request. Combine that with the point above about distribution being uneven and you should conclude that using +max_docs+ with +slices+ might not result in exactly +max_docs+ documents being updated.
68
+ # * Each sub-request gets a slightly different snapshot of the source data stream or index though these are all taken at approximately the same time.
69
+ # If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:
70
+ # * Query performance is most efficient when the number of slices is equal to the number of shards in the index or backing index. If that number is large (for example, 500), choose a lower number as too many slices hurts performance. Setting slices higher than the number of shards generally does not improve efficiency and adds overhead.
71
+ # * Update performance scales linearly across available resources with the number of slices.
72
+ # Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.
73
+ # **Update the document source**
74
+ # Update by query supports scripts to update the document source.
75
+ # As with the update API, you can set +ctx.op+ to change the operation that is performed.
76
+ # Set +ctx.op = "noop"+ if your script decides that it doesn't have to make any changes.
77
+ # The update by query operation skips updating the document and increments the +noop+ counter.
78
+ # Set +ctx.op = "delete"+ if your script decides that the document should be deleted.
79
+ # The update by query operation deletes the document and increments the +deleted+ counter.
80
+ # Update by query supports only +index+, +noop+, and +delete+.
81
+ # Setting +ctx.op+ to anything else is an error.
82
+ # Setting any other field in +ctx+ is an error.
83
+ # This API enables you to only modify the source of matching documents; you cannot move them.
23
84
  #
24
- # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices (*Required*)
25
- # @option arguments [List] :type A comma-separated list of document types to search; leave empty to perform the operation on all types
26
- # @option arguments [String] :analyzer The analyzer to use for the query string
27
- # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
28
- # @option arguments [String] :default_operator The default operator for query string query (AND or OR) (options: AND, OR)
29
- # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
30
- # @option arguments [Number] :from Starting offset (default: 0)
31
- # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
32
- # @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)
33
- # @option arguments [String] :conflicts What to do when the update by query hits version conflicts? (options: abort, proceed)
34
- # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
35
- # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
36
- # @option arguments [String] :pipeline Ingest pipeline to set on index requests made by this action. (default: none)
37
- # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
38
- # @option arguments [String] :q Query in the Lucene query string syntax
39
- # @option arguments [List] :routing A comma-separated list of specific routing values
40
- # @option arguments [Time] :scroll Specify how long a consistent view of the index should be maintained for scrolled search
41
- # @option arguments [String] :search_type Search operation type (options: query_then_fetch, dfs_query_then_fetch)
42
- # @option arguments [Time] :search_timeout Explicit timeout for each search request. Defaults to no timeout.
43
- # @option arguments [Number] :size Deprecated, please use `max_docs` instead
44
- # @option arguments [Number] :max_docs Maximum number of documents to process (default: all documents)
45
- # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
46
- # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
47
- # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
48
- # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
85
+ # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases to search.
86
+ # It supports wildcards (+*+).
87
+ # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
88
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
89
+ # This behavior applies even if the request targets other open indices.
90
+ # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
91
+ # @option arguments [String] :analyzer The analyzer to use for the query string.
92
+ # This parameter can be used only when the +q+ query string parameter is specified.
93
+ # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
94
+ # This parameter can be used only when the +q+ query string parameter is specified.
95
+ # @option arguments [String] :conflicts The preferred behavior when update by query hits version conflicts: +abort+ or +proceed+. Server default: abort.
96
+ # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+.
97
+ # This parameter can be used only when the +q+ query string parameter is specified. Server default: OR.
98
+ # @option arguments [String] :df The field to use as default where no field prefix is given in the query string.
99
+ # This parameter can be used only when the +q+ query string parameter is specified.
100
+ # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
101
+ # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
102
+ # It supports comma-separated values, such as +open,hidden+.
103
+ # Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
104
+ # @option arguments [Integer] :from Skips the specified number of documents. Server default: 0.
105
+ # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
106
+ # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
107
+ # This parameter can be used only when the +q+ query string parameter is specified.
108
+ # @option arguments [Integer] :max_docs The maximum number of documents to process.
109
+ # It defaults to all documents.
110
+ # When set to a value less then or equal to +scroll_size+ then a scroll will not be used to retrieve the results for the operation.
111
+ # @option arguments [String] :pipeline The ID of the pipeline to use to preprocess incoming documents.
112
+ # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
113
+ # If a final pipeline is configured it will always run, regardless of the value of this parameter.
114
+ # @option arguments [String] :preference The node or shard the operation should be performed on.
115
+ # It is random by default.
116
+ # @option arguments [String] :q A query in the Lucene query string syntax.
117
+ # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes affected shards to make the operation visible to search after the request completes.
118
+ # This is different than the update API's +refresh+ parameter, which causes just the shard that received the request to be refreshed.
119
+ # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request.
120
+ # It defaults to the index-level setting.
121
+ # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1.
122
+ # @option arguments [String] :routing A custom value used to route operations to a specific shard.
123
+ # @option arguments [Time] :scroll The period to retain the search context for scrolling. Server default: 5m.
124
+ # @option arguments [Integer] :scroll_size The size of the scroll request that powers the operation. Server default: 1000.
125
+ # @option arguments [Time] :search_timeout An explicit timeout for each search request.
126
+ # By default, there is no timeout.
127
+ # @option arguments [String] :search_type The type of the search operation. Available options include +query_then_fetch+ and +dfs_query_then_fetch+.
128
+ # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
129
+ # @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
130
+ # @option arguments [Array<String>] :stats The specific +tag+ of the request for logging and statistical purposes.
131
+ # @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard.
132
+ # If a query reaches this limit, Elasticsearch terminates the query early.
133
+ # Elasticsearch collects documents before sorting.IMPORTANT: Use with caution.
134
+ # Elasticsearch applies this parameter to each shard handling the request.
135
+ # When possible, let Elasticsearch perform early termination automatically.
136
+ # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
137
+ # @option arguments [Time] :timeout The period each update request waits for the following operations: dynamic mapping updates, waiting for active shards.
138
+ # By default, it is one minute.
139
+ # This guarantees Elasticsearch waits for at least the timeout before failing.
140
+ # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
141
+ # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit.
49
142
  # @option arguments [Boolean] :version_type Should the document increment the version number (internal) on hit or not (reindex)
50
- # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to index level setting
51
- # @option arguments [Boolean] :refresh Should the affected indexes be refreshed?
52
- # @option arguments [Time] :timeout Time each individual bulk request should wait for shards that are unavailable.
53
- # @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before proceeding with the update 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)
54
- # @option arguments [Number] :scroll_size Size on the scroll request powering the update by query
55
- # @option arguments [Boolean] :wait_for_completion Should the request should block until the update by query operation is complete.
56
- # @option arguments [Number] :requests_per_second The throttle to set on this request in sub-requests per second. -1 means no throttle.
57
- # @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`.
143
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
144
+ # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+).
145
+ # The +timeout+ parameter controls how long each write request waits for unavailable shards to become available.
146
+ # Both work exactly the way they work in the bulk API. Server default: 1.
147
+ # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete.
148
+ # If +false+, Elasticsearch performs some preflight checks, launches the request, and returns a task ID that you can use to cancel or get the status of the task.
149
+ # Elasticsearch creates a record of this task as a document at +.tasks/task/${taskId}+. Server default: true.
58
150
  # @option arguments [Hash] :headers Custom HTTP headers
59
- # @option arguments [Hash] :body The search definition using the Query DSL
60
- #
61
- # *Deprecation notice*:
62
- # Specifying types in urls has been deprecated
63
- # Deprecated since version 7.0.0
151
+ # @option arguments [Hash] :body request body
64
152
  #
65
- #
66
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-update-by-query.html
153
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query
67
154
  #
68
155
  def update_by_query(arguments = {})
156
+ request_opts = { endpoint: arguments[:endpoint] || 'update_by_query' }
157
+
158
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
159
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
160
+ end
161
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
162
+
69
163
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
70
164
 
165
+ arguments = arguments.clone
71
166
  headers = arguments.delete(:headers) || {}
72
167
 
73
- arguments = arguments.clone
168
+ body = arguments.delete(:body)
74
169
 
75
170
  _index = arguments.delete(:index)
76
171
 
77
- _type = arguments.delete(:type)
78
-
79
172
  method = Elasticsearch::API::HTTP_POST
80
- path = if _index && _type
81
- "#{Utils.__listify(_index)}/#{Utils.__listify(_type)}/_update_by_query"
82
- else
83
- "#{Utils.__listify(_index)}/_update_by_query"
84
- end
85
- params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
173
+ path = "#{Utils.listify(_index)}/_update_by_query"
174
+ params = Utils.process_params(arguments)
86
175
 
87
- body = arguments[:body]
88
- perform_request(method, path, params, body, headers).body
176
+ Elasticsearch::API::Response.new(
177
+ perform_request(method, path, params, body, headers, request_opts)
178
+ )
89
179
  end
90
-
91
- # Register this action with its valid params when the module is loaded.
92
- #
93
- # @since 6.2.0
94
- ParamsRegistry.register(:update_by_query, [
95
- :analyzer,
96
- :analyze_wildcard,
97
- :default_operator,
98
- :df,
99
- :from,
100
- :ignore_unavailable,
101
- :allow_no_indices,
102
- :conflicts,
103
- :expand_wildcards,
104
- :lenient,
105
- :pipeline,
106
- :preference,
107
- :q,
108
- :routing,
109
- :scroll,
110
- :search_type,
111
- :search_timeout,
112
- :size,
113
- :max_docs,
114
- :sort,
115
- :terminate_after,
116
- :stats,
117
- :version,
118
- :version_type,
119
- :request_cache,
120
- :refresh,
121
- :timeout,
122
- :wait_for_active_shards,
123
- :scroll_size,
124
- :wait_for_completion,
125
- :requests_per_second,
126
- :slices
127
- ].freeze)
128
180
  end
129
181
  end
130
182
  end
@@ -14,41 +14,49 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
-
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
18
21
  module Elasticsearch
19
22
  module API
20
23
  module Actions
21
- # Changes the number of requests per second for a particular Update By Query operation.
24
+ # Throttle an update by query operation.
25
+ # Change the number of requests per second for a particular update by query operation.
26
+ # Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
22
27
  #
23
- # @option arguments [String] :task_id The task id to rethrottle
24
- # @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*)
28
+ # @option arguments [String] :task_id The ID for the task. (*Required*)
29
+ # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
30
+ # To turn off throttling, set it to +-1+. Server default: -1.
25
31
  # @option arguments [Hash] :headers Custom HTTP headers
26
32
  #
27
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.17/docs-update-by-query.html
33
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-update-by-query-rethrottle
28
34
  #
29
35
  def update_by_query_rethrottle(arguments = {})
36
+ request_opts = { endpoint: arguments[:endpoint] || 'update_by_query_rethrottle' }
37
+
38
+ defined_params = [:task_id].each_with_object({}) do |variable, set_variables|
39
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
40
+ end
41
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
42
+
30
43
  raise ArgumentError, "Required argument 'task_id' missing" unless arguments[:task_id]
31
44
 
45
+ arguments = arguments.clone
32
46
  headers = arguments.delete(:headers) || {}
33
47
 
34
- arguments = arguments.clone
48
+ body = nil
35
49
 
36
50
  _task_id = arguments.delete(:task_id)
37
51
 
38
52
  method = Elasticsearch::API::HTTP_POST
39
- path = "_update_by_query/#{Utils.__listify(_task_id)}/_rethrottle"
40
- params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
53
+ path = "_update_by_query/#{Utils.listify(_task_id)}/_rethrottle"
54
+ params = Utils.process_params(arguments)
41
55
 
42
- body = nil
43
- perform_request(method, path, params, body, headers).body
56
+ Elasticsearch::API::Response.new(
57
+ perform_request(method, path, params, body, headers, request_opts)
58
+ )
44
59
  end
45
-
46
- # Register this action with its valid params when the module is loaded.
47
- #
48
- # @since 6.2.0
49
- ParamsRegistry.register(:update_by_query_rethrottle, [
50
- :requests_per_second
51
- ].freeze)
52
60
  end
53
61
  end
54
62
  end
@@ -0,0 +1,74 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Watcher
24
+ module Actions
25
+ # Acknowledge a watch.
26
+ # Acknowledging a watch enables you to manually throttle the execution of the watch's actions.
27
+ # The acknowledgement state of an action is stored in the +status.actions.<id>.ack.state+ structure.
28
+ # IMPORTANT: If the specified watch is currently being executed, this API will return an error
29
+ # The reason for this behavior is to prevent overwriting the watch status from a watch execution.
30
+ # Acknowledging an action throttles further executions of that action until its +ack.state+ is reset to +awaits_successful_execution+.
31
+ # This happens when the condition of the watch is not met (the condition evaluates to false).
32
+ #
33
+ # @option arguments [String] :watch_id The watch identifier. (*Required*)
34
+ # @option arguments [String, Array<String>] :action_id A comma-separated list of the action identifiers to acknowledge.
35
+ # If you omit this parameter, all of the actions of the watch are acknowledged.
36
+ # @option arguments [Hash] :headers Custom HTTP headers
37
+ #
38
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-ack-watch
39
+ #
40
+ def ack_watch(arguments = {})
41
+ request_opts = { endpoint: arguments[:endpoint] || 'watcher.ack_watch' }
42
+
43
+ defined_params = [:watch_id, :action_id].each_with_object({}) do |variable, set_variables|
44
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
45
+ end
46
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
47
+
48
+ raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id]
49
+
50
+ arguments = arguments.clone
51
+ headers = arguments.delete(:headers) || {}
52
+
53
+ body = nil
54
+
55
+ _watch_id = arguments.delete(:watch_id)
56
+
57
+ _action_id = arguments.delete(:action_id)
58
+
59
+ method = Elasticsearch::API::HTTP_PUT
60
+ path = if _watch_id && _action_id
61
+ "_watcher/watch/#{Utils.listify(_watch_id)}/_ack/#{Utils.listify(_action_id)}"
62
+ else
63
+ "_watcher/watch/#{Utils.listify(_watch_id)}/_ack"
64
+ end
65
+ params = {}
66
+
67
+ Elasticsearch::API::Response.new(
68
+ perform_request(method, path, params, body, headers, request_opts)
69
+ )
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,61 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Watcher
24
+ module Actions
25
+ # Activate a watch.
26
+ # A watch can be either active or inactive.
27
+ #
28
+ # @option arguments [String] :watch_id The watch identifier. (*Required*)
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
+ #
31
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-activate-watch
32
+ #
33
+ def activate_watch(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || 'watcher.activate_watch' }
35
+
36
+ defined_params = [:watch_id].each_with_object({}) do |variable, set_variables|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ end
39
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
40
+
41
+ raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id]
42
+
43
+ arguments = arguments.clone
44
+ headers = arguments.delete(:headers) || {}
45
+
46
+ body = nil
47
+
48
+ _watch_id = arguments.delete(:watch_id)
49
+
50
+ method = Elasticsearch::API::HTTP_PUT
51
+ path = "_watcher/watch/#{Utils.listify(_watch_id)}/_activate"
52
+ params = {}
53
+
54
+ Elasticsearch::API::Response.new(
55
+ perform_request(method, path, params, body, headers, request_opts)
56
+ )
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,61 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Watcher
24
+ module Actions
25
+ # Deactivate a watch.
26
+ # A watch can be either active or inactive.
27
+ #
28
+ # @option arguments [String] :watch_id The watch identifier. (*Required*)
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
+ #
31
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-deactivate-watch
32
+ #
33
+ def deactivate_watch(arguments = {})
34
+ request_opts = { endpoint: arguments[:endpoint] || 'watcher.deactivate_watch' }
35
+
36
+ defined_params = [:watch_id].each_with_object({}) do |variable, set_variables|
37
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
38
+ end
39
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
40
+
41
+ raise ArgumentError, "Required argument 'watch_id' missing" unless arguments[:watch_id]
42
+
43
+ arguments = arguments.clone
44
+ headers = arguments.delete(:headers) || {}
45
+
46
+ body = nil
47
+
48
+ _watch_id = arguments.delete(:watch_id)
49
+
50
+ method = Elasticsearch::API::HTTP_PUT
51
+ path = "_watcher/watch/#{Utils.listify(_watch_id)}/_deactivate"
52
+ params = {}
53
+
54
+ Elasticsearch::API::Response.new(
55
+ perform_request(method, path, params, body, headers, request_opts)
56
+ )
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,73 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ #
18
+ # This code was automatically generated from the Elasticsearch Specification
19
+ # See https://github.com/elastic/elasticsearch-specification
20
+ # See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
21
+ module Elasticsearch
22
+ module API
23
+ module Watcher
24
+ module Actions
25
+ # Delete a watch.
26
+ # When the watch is removed, the document representing the watch in the +.watches+ index is gone and it will never be run again.
27
+ # Deleting a watch does not delete any watch execution records related to this watch from the watch history.
28
+ # IMPORTANT: Deleting a watch must be done by using only this API.
29
+ # Do not delete the watch directly from the +.watches+ index using the Elasticsearch delete document API
30
+ # When Elasticsearch security features are enabled, make sure no write privileges are granted to anyone for the +.watches+ index.
31
+ #
32
+ # @option arguments [String] :id The watch identifier. (*Required*)
33
+ # @option arguments [Hash] :headers Custom HTTP headers
34
+ #
35
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-watcher-delete-watch
36
+ #
37
+ def delete_watch(arguments = {})
38
+ request_opts = { endpoint: arguments[:endpoint] || 'watcher.delete_watch' }
39
+
40
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
41
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
42
+ end
43
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
44
+
45
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
46
+
47
+ arguments = arguments.clone
48
+ headers = arguments.delete(:headers) || {}
49
+
50
+ body = nil
51
+
52
+ _id = arguments.delete(:id)
53
+
54
+ method = Elasticsearch::API::HTTP_DELETE
55
+ path = "_watcher/watch/#{Utils.listify(_id)}"
56
+ params = Utils.process_params(arguments)
57
+
58
+ if Array(arguments[:ignore]).include?(404)
59
+ Utils.rescue_from_not_found do
60
+ Elasticsearch::API::Response.new(
61
+ perform_request(method, path, params, body, headers, request_opts)
62
+ )
63
+ end
64
+ else
65
+ Elasticsearch::API::Response.new(
66
+ perform_request(method, path, params, body, headers, request_opts)
67
+ )
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end