elasticsearch-serverless 0.6.0 → 0.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 (249) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +3 -4
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +4 -5
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +7 -6
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -7
  6. data/lib/elasticsearch-serverless/api/bulk.rb +109 -22
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +17 -14
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +14 -13
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +13 -14
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +5 -15
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +10 -11
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +7 -13
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +6 -12
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +6 -12
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +7 -12
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +6 -12
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +7 -6
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -3
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +3 -5
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +4 -5
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +5 -6
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +3 -4
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +6 -5
  24. data/lib/elasticsearch-serverless/api/connector/check_in.rb +3 -4
  25. data/lib/elasticsearch-serverless/api/connector/delete.rb +4 -4
  26. data/lib/elasticsearch-serverless/api/connector/get.rb +5 -5
  27. data/lib/elasticsearch-serverless/api/connector/list.rb +4 -3
  28. data/lib/elasticsearch-serverless/api/connector/post.rb +3 -3
  29. data/lib/elasticsearch-serverless/api/connector/put.rb +4 -5
  30. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +7 -6
  31. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +7 -6
  32. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +7 -6
  33. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +3 -3
  34. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +3 -3
  35. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +3 -4
  36. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +3 -4
  37. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +3 -4
  38. data/lib/elasticsearch-serverless/api/connector/update_error.rb +3 -4
  39. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +3 -4
  40. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -3
  41. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +3 -4
  42. data/lib/elasticsearch-serverless/api/connector/update_name.rb +3 -4
  43. data/lib/elasticsearch-serverless/api/connector/update_native.rb +2 -3
  44. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +3 -4
  45. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +3 -4
  46. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +3 -4
  47. data/lib/elasticsearch-serverless/api/connector/update_status.rb +3 -4
  48. data/lib/elasticsearch-serverless/api/count.rb +36 -25
  49. data/lib/elasticsearch-serverless/api/create.rb +77 -22
  50. data/lib/elasticsearch-serverless/api/delete.rb +44 -18
  51. data/lib/elasticsearch-serverless/api/delete_by_query.rb +91 -29
  52. data/lib/elasticsearch-serverless/api/delete_script.rb +10 -9
  53. data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +5 -5
  54. data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +6 -5
  55. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +6 -6
  56. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +5 -5
  57. data/lib/elasticsearch-serverless/api/eql/delete.rb +5 -5
  58. data/lib/elasticsearch-serverless/api/eql/get.rb +5 -5
  59. data/lib/elasticsearch-serverless/api/eql/get_status.rb +5 -5
  60. data/lib/elasticsearch-serverless/api/eql/search.rb +9 -5
  61. data/lib/elasticsearch-serverless/api/exists.rb +38 -19
  62. data/lib/elasticsearch-serverless/api/exists_source.rb +23 -18
  63. data/lib/elasticsearch-serverless/api/explain.rb +25 -16
  64. data/lib/elasticsearch-serverless/api/field_caps.rb +11 -10
  65. data/lib/elasticsearch-serverless/api/get.rb +71 -21
  66. data/lib/elasticsearch-serverless/api/get_script.rb +7 -6
  67. data/lib/elasticsearch-serverless/api/get_source.rb +25 -15
  68. data/lib/elasticsearch-serverless/api/graph/explore.rb +9 -5
  69. data/lib/elasticsearch-serverless/api/index.rb +110 -21
  70. data/lib/elasticsearch-serverless/api/indices/add_block.rb +23 -12
  71. data/lib/elasticsearch-serverless/api/indices/analyze.rb +9 -6
  72. data/lib/elasticsearch-serverless/api/indices/create.rb +19 -6
  73. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +3 -5
  74. data/lib/elasticsearch-serverless/api/indices/delete.rb +11 -8
  75. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +4 -7
  76. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +3 -4
  77. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +3 -4
  78. data/lib/elasticsearch-serverless/api/indices/exists.rb +7 -8
  79. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +8 -7
  80. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +6 -6
  81. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +4 -5
  82. data/lib/elasticsearch-serverless/api/indices/get.rb +5 -6
  83. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +6 -5
  84. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +4 -5
  85. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +5 -6
  86. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +5 -6
  87. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +4 -6
  88. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +6 -7
  89. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +3 -4
  90. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +3 -3
  91. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +4 -7
  92. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +4 -6
  93. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +22 -4
  94. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +21 -6
  95. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +17 -7
  96. data/lib/elasticsearch-serverless/api/indices/refresh.rb +11 -5
  97. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +5 -5
  98. data/lib/elasticsearch-serverless/api/indices/rollover.rb +28 -5
  99. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +4 -5
  100. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +5 -6
  101. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +3 -3
  102. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +4 -5
  103. data/lib/elasticsearch-serverless/api/inference/chat_completion_unified.rb +62 -0
  104. data/lib/elasticsearch-serverless/api/inference/completion.rb +62 -0
  105. data/lib/elasticsearch-serverless/api/inference/delete.rb +6 -7
  106. data/lib/elasticsearch-serverless/api/inference/get.rb +4 -5
  107. data/lib/elasticsearch-serverless/api/inference/put.rb +12 -5
  108. data/lib/elasticsearch-serverless/api/inference/put_watsonx.rb +78 -0
  109. data/lib/elasticsearch-serverless/api/inference/rerank.rb +62 -0
  110. data/lib/elasticsearch-serverless/api/inference/sparse_embedding.rb +62 -0
  111. data/lib/elasticsearch-serverless/api/inference/text_embedding.rb +62 -0
  112. data/lib/elasticsearch-serverless/api/info.rb +4 -4
  113. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +5 -5
  114. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +6 -6
  115. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +5 -4
  116. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +3 -4
  117. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +9 -8
  118. data/lib/elasticsearch-serverless/api/license/get.rb +4 -5
  119. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +7 -6
  120. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +7 -7
  121. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +7 -6
  122. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +3 -4
  123. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +4 -5
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +3 -4
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +3 -4
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +3 -4
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +3 -4
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +3 -4
  129. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +3 -4
  130. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +4 -4
  131. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +3 -4
  132. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +5 -5
  133. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +3 -3
  134. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +3 -4
  135. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +3 -4
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +4 -5
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +4 -5
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +4 -5
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +4 -5
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +4 -5
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +4 -5
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +4 -5
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -5
  144. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +3 -4
  145. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +4 -5
  146. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +4 -5
  147. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +3 -9
  148. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +3 -4
  149. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +3 -4
  150. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +5 -6
  151. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +4 -5
  152. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +3 -4
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +3 -4
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +6 -4
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +6 -6
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +3 -4
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +16 -5
  158. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +3 -4
  159. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +3 -4
  160. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +3 -4
  161. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -4
  162. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +3 -4
  163. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +3 -4
  164. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +3 -4
  165. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +7 -6
  166. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +3 -4
  167. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +3 -4
  168. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +3 -4
  169. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +3 -4
  170. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +3 -4
  171. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +3 -4
  172. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +3 -4
  173. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +3 -4
  174. data/lib/elasticsearch-serverless/api/mget.rb +12 -5
  175. data/lib/elasticsearch-serverless/api/msearch.rb +16 -17
  176. data/lib/elasticsearch-serverless/api/msearch_template.rb +22 -15
  177. data/lib/elasticsearch-serverless/api/mtermvectors.rb +15 -12
  178. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +29 -12
  179. data/lib/elasticsearch-serverless/api/ping.rb +8 -10
  180. data/lib/elasticsearch-serverless/api/put_script.rb +12 -11
  181. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +6 -5
  182. data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +6 -5
  183. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +5 -5
  184. data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +5 -5
  185. data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +7 -6
  186. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +11 -7
  187. data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +11 -6
  188. data/lib/elasticsearch-serverless/api/query_rules/test.rb +5 -5
  189. data/lib/elasticsearch-serverless/api/rank_eval.rb +6 -6
  190. data/lib/elasticsearch-serverless/api/reindex.rb +146 -9
  191. data/lib/elasticsearch-serverless/api/render_search_template.rb +5 -6
  192. data/lib/elasticsearch-serverless/api/response.rb +1 -1
  193. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +7 -3
  194. data/lib/elasticsearch-serverless/api/scroll.rb +4 -4
  195. data/lib/elasticsearch-serverless/api/search.rb +77 -69
  196. data/lib/elasticsearch-serverless/api/search_application/delete.rb +4 -5
  197. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +3 -4
  198. data/lib/elasticsearch-serverless/api/search_application/get.rb +3 -4
  199. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +4 -5
  200. data/lib/elasticsearch-serverless/api/search_application/list.rb +5 -4
  201. data/lib/elasticsearch-serverless/api/search_application/put.rb +3 -4
  202. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +3 -4
  203. data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -4
  204. data/lib/elasticsearch-serverless/api/search_mvt.rb +131 -9
  205. data/lib/elasticsearch-serverless/api/search_template.rb +12 -12
  206. data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -3
  207. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -3
  208. data/lib/elasticsearch-serverless/api/security/delete_role.rb +6 -5
  209. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +3 -3
  210. data/lib/elasticsearch-serverless/api/security/get_builtin_privileges.rb +3 -3
  211. data/lib/elasticsearch-serverless/api/security/get_role.rb +11 -8
  212. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +6 -5
  213. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +8 -6
  214. data/lib/elasticsearch-serverless/api/security/put_role.rb +3 -4
  215. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +12 -6
  216. data/lib/elasticsearch-serverless/api/security/query_role.rb +61 -0
  217. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +74 -0
  218. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +4 -4
  219. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +10 -6
  220. data/lib/elasticsearch-serverless/api/sql/get_async.rb +16 -13
  221. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +6 -6
  222. data/lib/elasticsearch-serverless/api/sql/query.rb +8 -5
  223. data/lib/elasticsearch-serverless/api/sql/translate.rb +6 -4
  224. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +17 -6
  225. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +7 -7
  226. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +7 -8
  227. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +7 -7
  228. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +7 -6
  229. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -6
  230. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -7
  231. data/lib/elasticsearch-serverless/api/tasks/get.rb +9 -7
  232. data/lib/elasticsearch-serverless/api/terms_enum.rb +7 -9
  233. data/lib/elasticsearch-serverless/api/termvectors.rb +39 -16
  234. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +3 -5
  235. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +5 -6
  236. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +4 -5
  237. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -5
  238. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +3 -4
  239. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +4 -5
  240. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +7 -8
  241. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +3 -5
  242. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +3 -4
  243. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +3 -4
  244. data/lib/elasticsearch-serverless/api/update.rb +36 -24
  245. data/lib/elasticsearch-serverless/api/update_by_query.rb +102 -31
  246. data/lib/elasticsearch-serverless/api.rb +22 -25
  247. data/lib/elasticsearch-serverless/version.rb +1 -1
  248. data/lib/elasticsearch-serverless.rb +7 -0
  249. metadata +18 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdef5260655fb867303a0f21bff2a4e1cd1fbdbbdf34ce476572f41d698d5f48
4
- data.tar.gz: d6eb14791d6586ea674f7c39d1aed581cc8042aee6d73f35ec48b9369aa2930b
3
+ metadata.gz: 46610e7bad335976f71606b118384e4651fa882602bacbe3055e713cc16f4f63
4
+ data.tar.gz: 5633ddb2686aac1df293e338b885e20c0528a315a96dfeaf2bb72fa784f42e6e
5
5
  SHA512:
6
- metadata.gz: 5b1cc8e830d266068443087c17f610f3e6a16d3ef4ac23a937d32241166a0b04568f69ed55b0dda49478e78ca8beb10d78c9c893c34b2d0c0312008d3a555c37
7
- data.tar.gz: 1ee71b1b19b311b011bc4c2a4361486303011c5e058e9bc7d3dcbbfcdb62f76d7e0f4a0a501ed6c7d2dc2bf4b091e3aec7189533e55116c970a90ab19399127c
6
+ metadata.gz: 14d1e876b5c56273ede725d0835ee3f35b86d3dcbc0f1147eb35d8ea8de40ce8a0cbbeec61f339b1f5e181089917294d23e03d836c2f6d12b853d9838ddb9382
7
+ data.tar.gz: 27d8516161d3a158cb144d9ec17ca1efaf8d130f5f1121eb2c27e500673e71c71dd382f945f55f85f065d85d6a97ecbd4e1c8fbfd42ed70cec3a6d31c93fff84
@@ -30,14 +30,13 @@ module ElasticsearchServerless
30
30
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
31
31
  # @option arguments [Hash] :headers Custom HTTP headers
32
32
  #
33
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
33
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
34
34
  #
35
35
  def delete(arguments = {})
36
- request_opts = { endpoint: arguments[:endpoint] || "async_search.delete" }
36
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.delete' }
37
37
 
38
- defined_params = [:id].inject({}) do |set_variables, variable|
38
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
39
39
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
40
- set_variables
41
40
  end
42
41
  request_opts[:defined_params] = defined_params unless defined_params.empty?
43
42
 
@@ -27,7 +27,7 @@ module ElasticsearchServerless
27
27
  # If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
28
28
  #
29
29
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
30
- # @option arguments [Time] :keep_alive Specifies how long the async search should be available in the cluster.
30
+ # @option arguments [Time] :keep_alive The length of time that the async search should be available in the cluster.
31
31
  # When not specified, the +keep_alive+ set with the corresponding submit async request will be used.
32
32
  # Otherwise, it is possible to override the value and extend the validity of the request.
33
33
  # When this period expires, the search, if still running, is cancelled.
@@ -38,14 +38,13 @@ module ElasticsearchServerless
38
38
  # By default no timeout is set meaning that the currently available results will be returned without any additional wait.
39
39
  # @option arguments [Hash] :headers Custom HTTP headers
40
40
  #
41
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
41
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
42
42
  #
43
43
  def get(arguments = {})
44
- request_opts = { endpoint: arguments[:endpoint] || "async_search.get" }
44
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.get' }
45
45
 
46
- defined_params = [:id].inject({}) do |set_variables, variable|
46
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
47
47
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
48
- set_variables
49
48
  end
50
49
  request_opts[:defined_params] = defined_params unless defined_params.empty?
51
50
 
@@ -24,21 +24,22 @@ module ElasticsearchServerless
24
24
  module Actions
25
25
  # Get the async search status.
26
26
  # Get the status of a previously submitted async search request given its identifier, without retrieving search results.
27
- # If the Elasticsearch security features are enabled, use of this API is restricted to the +monitoring_user+ role.
27
+ # If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:
28
+ # * The user or API key that submitted the original async search request.
29
+ # * Users that have the +monitor+ cluster privilege or greater privileges.
28
30
  #
29
31
  # @option arguments [String] :id A unique identifier for the async search. (*Required*)
30
- # @option arguments [Time] :keep_alive Specifies how long the async search needs to be available.
32
+ # @option arguments [Time] :keep_alive The length of time that the async search needs to be available.
31
33
  # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
32
34
  # @option arguments [Hash] :headers Custom HTTP headers
33
35
  #
34
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
36
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
35
37
  #
36
38
  def status(arguments = {})
37
- request_opts = { endpoint: arguments[:endpoint] || "async_search.status" }
39
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.status' }
38
40
 
39
- defined_params = [:id].inject({}) do |set_variables, variable|
41
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
40
42
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
41
- set_variables
42
43
  end
43
44
  request_opts[:defined_params] = defined_params unless defined_params.empty?
44
45
 
@@ -31,9 +31,9 @@ module ElasticsearchServerless
31
31
  # @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
32
32
  # @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout.
33
33
  # When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.
34
- # @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
35
34
  # @option arguments [Time] :keep_alive Specifies how long the async search needs to be available.
36
35
  # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
36
+ # @option arguments [Boolean] :keep_on_completion If +true+, results are stored for later retrieval when the search completes within the +wait_for_completion_timeout+.
37
37
  # @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)
38
38
  # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
39
39
  # @option arguments [String] :analyzer The analyzer to use for the query string
@@ -51,7 +51,6 @@ module ElasticsearchServerless
51
51
  # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
52
52
  # @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
53
53
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
54
- # @option arguments [Integer] :pre_filter_shard_size The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped. Server default: 1.
55
54
  # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true Server default: true.
56
55
  # @option arguments [String] :routing A comma-separated list of specific routing values
57
56
  # @option arguments [String] :search_type Search operation type
@@ -79,14 +78,13 @@ module ElasticsearchServerless
79
78
  # @option arguments [Hash] :headers Custom HTTP headers
80
79
  # @option arguments [Hash] :body request body
81
80
  #
82
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
81
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-async-search-submit
83
82
  #
84
83
  def submit(arguments = {})
85
- request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" }
84
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.submit' }
86
85
 
87
- defined_params = [:index].inject({}) do |set_variables, variable|
86
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
88
87
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
89
- set_variables
90
88
  end
91
89
  request_opts[:defined_params] = defined_params unless defined_params.empty?
92
90
 
@@ -101,7 +99,7 @@ module ElasticsearchServerless
101
99
  path = if _index
102
100
  "#{Utils.listify(_index)}/_async_search"
103
101
  else
104
- "_async_search"
102
+ '_async_search'
105
103
  end
106
104
  params = Utils.process_params(arguments)
107
105
 
@@ -22,34 +22,121 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
24
  # Bulk index or delete documents.
25
- # Performs multiple indexing or delete operations in a single API call.
25
+ # Perform multiple +index+, +create+, +delete+, and +update+ actions in a single request.
26
26
  # This reduces overhead and can greatly increase indexing speed.
27
+ # If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:
28
+ # * To use the +create+ action, you must have the +create_doc+, +create+, +index+, or +write+ index privilege. Data streams support only the +create+ action.
29
+ # * To use the +index+ action, you must have the +create+, +index+, or +write+ index privilege.
30
+ # * To use the +delete+ action, you must have the +delete+ or +write+ index privilege.
31
+ # * To use the +update+ action, you must have the +index+ or +write+ index privilege.
32
+ # * To automatically create a data stream or index with a bulk API request, you must have the +auto_configure+, +create_index+, or +manage+ index privilege.
33
+ # * To make the result of a bulk operation visible to search using the +refresh+ parameter, you must have the +maintenance+ or +manage+ index privilege.
34
+ # Automatic data stream creation requires a matching index template with data stream enabled.
35
+ # The actions are specified in the request body using a newline delimited JSON (NDJSON) structure:
36
+ # +
37
+ # action_and_meta_data\n
38
+ # optional_source\n
39
+ # action_and_meta_data\n
40
+ # optional_source\n
41
+ # ....
42
+ # action_and_meta_data\n
43
+ # optional_source\n
44
+ # +
45
+ # The +index+ and +create+ actions expect a source on the next line and have the same semantics as the +op_type+ parameter in the standard index API.
46
+ # A +create+ action fails if a document with the same ID already exists in the target
47
+ # An +index+ action adds or replaces a document as necessary.
48
+ # NOTE: Data streams support only the +create+ action.
49
+ # To update or delete a document in a data stream, you must target the backing index containing the document.
50
+ # An +update+ action expects that the partial doc, upsert, and script and its options are specified on the next line.
51
+ # A +delete+ action does not expect a source on the next line and has the same semantics as the standard delete API.
52
+ # NOTE: The final line of data must end with a newline character (+\n+).
53
+ # Each newline character may be preceded by a carriage return (+\r+).
54
+ # When sending NDJSON data to the +_bulk+ endpoint, use a +Content-Type+ header of +application/json+ or +application/x-ndjson+.
55
+ # Because this format uses literal newline characters (+\n+) as delimiters, make sure that the JSON actions and sources are not pretty printed.
56
+ # If you provide a target in the request path, it is used for any actions that don't explicitly specify an +_index+ argument.
57
+ # A note on the format: the idea here is to make processing as fast as possible.
58
+ # As some of the actions are redirected to other shards on other nodes, only +action_meta_data+ is parsed on the receiving node side.
59
+ # Client libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.
60
+ # There is no "correct" number of actions to perform in a single bulk request.
61
+ # Experiment with different settings to find the optimal size for your particular workload.
62
+ # Note that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.
63
+ # It is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.
64
+ # For instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.
65
+ # **Client suppport for bulk requests**
66
+ # Some of the officially supported clients provide helpers to assist with bulk requests and reindexing:
67
+ # * Go: Check out +esutil.BulkIndexer+
68
+ # * Perl: Check out +Search::Elasticsearch::Client::5_0::Bulk+ and +Search::Elasticsearch::Client::5_0::Scroll+
69
+ # * Python: Check out +elasticsearch.helpers.*+
70
+ # * JavaScript: Check out +client.helpers.*+
71
+ # * .NET: Check out +BulkAllObservable+
72
+ # * PHP: Check out bulk indexing.
73
+ # **Submitting bulk requests with cURL**
74
+ # If you're providing text file input to +curl+, you must use the +--data-binary+ flag instead of plain +-d+.
75
+ # The latter doesn't preserve newlines. For example:
76
+ # +
77
+ # $ cat requests
78
+ # { "index" : { "_index" : "test", "_id" : "1" } }
79
+ # { "field1" : "value1" }
80
+ # $ curl -s -H "Content-Type: application/x-ndjson" -XPOST localhost:9200/_bulk --data-binary "@requests"; echo
81
+ # {"took":7, "errors": false, "items":[{"index":{"_index":"test","_id":"1","_version":1,"result":"created","forced_refresh":false}}]}
82
+ # +
83
+ # **Optimistic concurrency control**
84
+ # Each +index+ and +delete+ action within a bulk API call may include the +if_seq_no+ and +if_primary_term+ parameters in their respective action and meta data lines.
85
+ # The +if_seq_no+ and +if_primary_term+ parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.
86
+ # **Versioning**
87
+ # Each bulk item can include the version value using the +version+ field.
88
+ # It automatically follows the behavior of the index or delete operation based on the +_version+ mapping.
89
+ # It also support the +version_type+.
90
+ # **Routing**
91
+ # Each bulk item can include the routing value using the +routing+ field.
92
+ # It automatically follows the behavior of the index or delete operation based on the +_routing+ mapping.
93
+ # NOTE: Data streams do not support custom routing unless they were created with the +allow_custom_routing+ setting enabled in the template.
94
+ # **Wait for active shards**
95
+ # When making bulk calls, you can set the +wait_for_active_shards+ parameter to require a minimum number of shard copies to be active before starting to process the bulk request.
96
+ # **Refresh**
97
+ # Control when the changes made by this request are visible to search.
98
+ # NOTE: Only the shards that receive the bulk request will be affected by refresh.
99
+ # Imagine a +_bulk?refresh=wait_for+ request with three documents in it that happen to be routed to different shards in an index with five shards.
100
+ # The request will only wait for those three shards to refresh.
101
+ # The other two shards that make up the index do not participate in the +_bulk+ request at all.
27
102
  #
28
- # @option arguments [String] :index Name of the data stream, index, or index alias to perform bulk actions on.
29
- # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents.
30
- # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
31
- # If a final pipeline is configured it will always run, regardless of the value of this parameter.
32
- # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search, if +wait_for+ then wait for a refresh to make this operation visible to search, if +false+ do nothing with refreshes.
103
+ # @option arguments [String] :index The name of the data stream, index, or index alias to perform bulk actions on.
104
+ # @option arguments [Boolean] :include_source_on_error True or false if to include the document source in the error message in case of parsing errors. Server default: true.
105
+ # @option arguments [Boolean] :list_executed_pipelines If +true+, the response will include the ingest pipelines that were run for each index or create.
106
+ # @option arguments [String] :pipeline The pipeline identifier to use to preprocess incoming documents.
107
+ # If the index has a default ingest pipeline specified, setting the value to +_none+ turns off the default ingest pipeline for this request.
108
+ # If a final pipeline is configured, it will always run regardless of the value of this parameter.
109
+ # @option arguments [String] :refresh If +true+, Elasticsearch refreshes the affected shards to make this operation visible to search.
110
+ # If +wait_for+, wait for a refresh to make this operation visible to search.
111
+ # If +false+, do nothing with refreshes.
33
112
  # Valid values: +true+, +false+, +wait_for+. Server default: false.
34
- # @option arguments [String] :routing Custom value used to route operations to a specific shard.
35
- # @option arguments [Boolean, String, Array<String>] :_source +true+ or +false+ to return the +_source+ field or not, or a list of fields to return.
113
+ # @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
114
+ # @option arguments [Boolean, String, Array<String>] :_source Indicates whether to return the +_source+ field (+true+ or +false+) or contains a list of fields to return.
36
115
  # @option arguments [String, Array<String>] :_source_excludes A comma-separated list of source fields to exclude from the response.
116
+ # You can also use this parameter to exclude fields from the subset specified in +_source_includes+ query parameter.
117
+ # If the +_source+ parameter is +false+, this parameter is ignored.
37
118
  # @option arguments [String, Array<String>] :_source_includes A comma-separated list of source fields to include in the response.
38
- # @option arguments [Time] :timeout Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. Server default: 1m.
119
+ # If this parameter is specified, only these source fields are returned.
120
+ # You can exclude fields from this subset using the +_source_excludes+ query parameter.
121
+ # If the +_source+ parameter is +false+, this parameter is ignored.
122
+ # @option arguments [Time] :timeout The period each action waits for the following operations: automatic index creation, dynamic mapping updates, and waiting for active shards.
123
+ # The default is +1m+ (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.
124
+ # The actual wait time could be longer, particularly when multiple waits occur. Server default: 1m.
39
125
  # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
40
- # Set to all or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
41
- # @option arguments [Boolean] :require_alias If +true+, the request’s actions must target an index alias.
126
+ # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+).
127
+ # The default is +1+, which waits for each primary shard to be active. Server default: 1.
128
+ # @option arguments [Boolean] :require_alias If +true+, the request's actions must target an index alias.
129
+ # @option arguments [Boolean] :require_data_stream If +true+, the request's actions must target a data stream (existing or to be created).
42
130
  # @option arguments [Hash] :headers Custom HTTP headers
43
131
  # @option arguments [String|Array] :body operations. Array of Strings, Header/Data pairs, or the conveniency "combined" format can be passed, refer to ElasticsearchServerless::API::Utils.bulkify documentation.
44
132
  #
45
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
133
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk
46
134
  #
47
135
  def bulk(arguments = {})
48
- request_opts = { endpoint: arguments[:endpoint] || "bulk" }
136
+ request_opts = { endpoint: arguments[:endpoint] || 'bulk' }
49
137
 
50
- defined_params = [:index].inject({}) do |set_variables, variable|
138
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
51
139
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
- set_variables
53
140
  end
54
141
  request_opts[:defined_params] = defined_params unless defined_params.empty?
55
142
 
@@ -66,17 +153,17 @@ module ElasticsearchServerless
66
153
  path = if _index
67
154
  "#{Utils.listify(_index)}/_bulk"
68
155
  else
69
- "_bulk"
156
+ '_bulk'
70
157
  end
71
158
  params = Utils.process_params(arguments)
72
159
 
73
- if body.is_a? Array
74
- payload = ElasticsearchServerless::API::Utils.bulkify(body)
75
- else
76
- payload = body
77
- end
160
+ payload = if body.is_a? Array
161
+ ElasticsearchServerless::API::Utils.bulkify(body)
162
+ else
163
+ body
164
+ end
78
165
 
79
- headers.merge!("Content-Type" => "application/x-ndjson")
166
+ headers.merge!('Content-Type' => 'application/x-ndjson')
80
167
  ElasticsearchServerless::API::Response.new(
81
168
  perform_request(method, path, params, payload, headers, request_opts)
82
169
  )
@@ -23,32 +23,35 @@ module ElasticsearchServerless
23
23
  module Cat
24
24
  module Actions
25
25
  # Get aliases.
26
- # Retrieves the clusters index aliases, including filter and routing information.
27
- # The API does not return data stream aliases.
28
- # CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
26
+ # Get the cluster's index aliases, including filter and routing information.
27
+ # This API does not return data stream aliases.
28
+ # IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
29
29
  #
30
30
  # @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+.
31
- # @option arguments [String, Array<String>] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
32
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
33
- # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
34
31
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
35
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
36
- # can't be combined with any other query string option.
37
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
38
32
  # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
39
33
  # Sorting defaults to ascending and can be changed by setting +:asc+
40
34
  # or +:desc+ as a suffix to the column name.
35
+ # @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
36
+ # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
37
+ # It supports comma-separated values, such as +open,hidden+.
38
+ # @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
39
+ # If the master node is not available before the timeout expires, the request fails and returns an error.
40
+ # To indicated that the request should never timeout, you can set it to +-1+. Server default: 30s.
41
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
42
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
43
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
44
+ # can't be combined with any other query string option.
41
45
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
42
46
  # @option arguments [Hash] :headers Custom HTTP headers
43
47
  #
44
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html
48
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-aliases
45
49
  #
46
50
  def aliases(arguments = {})
47
- request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" }
51
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' }
48
52
 
49
- defined_params = [:name].inject({}) do |set_variables, variable|
53
+ defined_params = [:name].each_with_object({}) do |variable, set_variables|
50
54
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
51
- set_variables
52
55
  end
53
56
  request_opts[:defined_params] = defined_params unless defined_params.empty?
54
57
 
@@ -63,7 +66,7 @@ module ElasticsearchServerless
63
66
  path = if _name
64
67
  "_cat/aliases/#{Utils.listify(_name)}"
65
68
  else
66
- "_cat/aliases"
69
+ '_cat/aliases'
67
70
  end
68
71
  params = Utils.process_params(arguments)
69
72
  params[:h] = Utils.listify(params[:h]) if params[:h]
@@ -23,36 +23,37 @@ module ElasticsearchServerless
23
23
  module Cat
24
24
  module Actions
25
25
  # Get component templates.
26
- # Returns information about component templates in a cluster.
26
+ # Get information about component templates in a cluster.
27
27
  # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
28
- # CAT APIs are only intended for human consumption using the command line or Kibana console.
28
+ # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
29
29
  # They are not intended for use by applications. For application consumption, use the get component template API.
30
30
  #
31
- # @option arguments [String] :name The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned.
31
+ # @option arguments [String] :name The name of the component template.
32
+ # It accepts wildcard expressions.
33
+ # If it is omitted, all component templates are returned.
34
+ # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
35
+ # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
36
+ # Sorting defaults to ascending and can be changed by setting +:asc+
37
+ # or +:desc+ as a suffix to the column name.
32
38
  # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
33
39
  # local cluster state. If +false+ the list of selected nodes are computed
34
40
  # from the cluster state of the master node. In both cases the coordinating
35
41
  # node will send requests for further information to each selected node.
42
+ # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s.
36
43
  # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
37
44
  # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
38
- # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
39
45
  # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
40
46
  # can't be combined with any other query string option.
41
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
42
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
43
- # Sorting defaults to ascending and can be changed by setting +:asc+
44
- # or +:desc+ as a suffix to the column name.
45
47
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
46
48
  # @option arguments [Hash] :headers Custom HTTP headers
47
49
  #
48
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html
50
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-component-templates
49
51
  #
50
52
  def component_templates(arguments = {})
51
- request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" }
53
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' }
52
54
 
53
- defined_params = [:name].inject({}) do |set_variables, variable|
55
+ defined_params = [:name].each_with_object({}) do |variable, set_variables|
54
56
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
55
- set_variables
56
57
  end
57
58
  request_opts[:defined_params] = defined_params unless defined_params.empty?
58
59
 
@@ -67,7 +68,7 @@ module ElasticsearchServerless
67
68
  path = if _name
68
69
  "_cat/component_templates/#{Utils.listify(_name)}"
69
70
  else
70
- "_cat/component_templates"
71
+ '_cat/component_templates'
71
72
  end
72
73
  params = Utils.process_params(arguments)
73
74
 
@@ -23,33 +23,32 @@ module ElasticsearchServerless
23
23
  module Cat
24
24
  module Actions
25
25
  # Get a document count.
26
- # Provides quick access to a document count for a data stream, an index, or an entire cluster.
26
+ # Get quick access to a document count for a data stream, an index, or an entire cluster.
27
27
  # The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
28
- # CAT APIs are only intended for human consumption using the command line or Kibana console.
28
+ # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
29
29
  # They are not intended for use by applications. For application consumption, use the count API.
30
30
  #
31
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request.
32
- # Supports wildcards (+*+). To target all data streams and indices, omit this parameter or use +*+ or +_all+.
33
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
34
- # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
31
+ # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request.
32
+ # It supports wildcards (+*+).
33
+ # To target all data streams and indices, omit this parameter or use +*+ or +_all+.
35
34
  # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
36
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
37
- # can't be combined with any other query string option.
38
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
39
35
  # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
40
36
  # Sorting defaults to ascending and can be changed by setting +:asc+
41
37
  # or +:desc+ as a suffix to the column name.
38
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
39
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
40
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
41
+ # can't be combined with any other query string option.
42
42
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
43
43
  # @option arguments [Hash] :headers Custom HTTP headers
44
44
  #
45
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html
45
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-count
46
46
  #
47
47
  def count(arguments = {})
48
- request_opts = { endpoint: arguments[:endpoint] || "cat.count" }
48
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.count' }
49
49
 
50
- defined_params = [:index].inject({}) do |set_variables, variable|
50
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
51
51
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
52
- set_variables
53
52
  end
54
53
  request_opts[:defined_params] = defined_params unless defined_params.empty?
55
54
 
@@ -64,7 +63,7 @@ module ElasticsearchServerless
64
63
  path = if _index
65
64
  "_cat/count/#{Utils.listify(_index)}"
66
65
  else
67
- "_cat/count"
66
+ '_cat/count'
68
67
  end
69
68
  params = Utils.process_params(arguments)
70
69
  params[:h] = Utils.listify(params[:h]) if params[:h]
@@ -23,24 +23,14 @@ module ElasticsearchServerless
23
23
  module Cat
24
24
  module Actions
25
25
  # Get CAT help.
26
- # Returns help for the CAT APIs.
26
+ # Get help for the CAT APIs.
27
27
  #
28
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
29
- # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
30
- # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
31
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
32
- # can't be combined with any other query string option.
33
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
34
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
35
- # Sorting defaults to ascending and can be changed by setting +:asc+
36
- # or +:desc+ as a suffix to the column name.
37
- # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
38
28
  # @option arguments [Hash] :headers Custom HTTP headers
39
29
  #
40
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html
30
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat
41
31
  #
42
32
  def help(arguments = {})
43
- request_opts = { endpoint: arguments[:endpoint] || "cat.help" }
33
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.help' }
44
34
 
45
35
  arguments = arguments.clone
46
36
  headers = arguments.delete(:headers) || {}
@@ -48,8 +38,8 @@ module ElasticsearchServerless
48
38
  body = nil
49
39
 
50
40
  method = ElasticsearchServerless::API::HTTP_GET
51
- path = "_cat"
52
- params = Utils.process_params(arguments)
41
+ path = '_cat'
42
+ params = {}
53
43
 
54
44
  ElasticsearchServerless::API::Response.new(
55
45
  perform_request(method, path, params, body, headers, request_opts)
@@ -23,7 +23,7 @@ module ElasticsearchServerless
23
23
  module Cat
24
24
  module Actions
25
25
  # Get index information.
26
- # Returns high-level information about indices in a cluster, including backing indices for data streams.
26
+ # Get high-level information about indices in a cluster, including backing indices for data streams.
27
27
  # Use this request to get the following information for each index in a cluster:
28
28
  # - shard count
29
29
  # - document count
@@ -43,26 +43,25 @@ module ElasticsearchServerless
43
43
  # @option arguments [Boolean] :include_unloaded_segments If true, the response includes information from segments that are not loaded into memory.
44
44
  # @option arguments [Boolean] :pri If true, the response only includes information from primary shards.
45
45
  # @option arguments [String] :time The unit used to display time values.
46
- # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
47
- # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
48
- # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
49
- # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
50
- # can't be combined with any other query string option.
51
46
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
47
+ # @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
52
48
  # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
53
49
  # Sorting defaults to ascending and can be changed by setting +:asc+
54
50
  # or +:desc+ as a suffix to the column name.
51
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
52
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
53
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
54
+ # can't be combined with any other query string option.
55
55
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
56
56
  # @option arguments [Hash] :headers Custom HTTP headers
57
57
  #
58
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html
58
+ # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cat-indices
59
59
  #
60
60
  def indices(arguments = {})
61
- request_opts = { endpoint: arguments[:endpoint] || "cat.indices" }
61
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' }
62
62
 
63
- defined_params = [:index].inject({}) do |set_variables, variable|
63
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
64
64
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
65
- set_variables
66
65
  end
67
66
  request_opts[:defined_params] = defined_params unless defined_params.empty?
68
67
 
@@ -77,7 +76,7 @@ module ElasticsearchServerless
77
76
  path = if _index
78
77
  "_cat/indices/#{Utils.listify(_index)}"
79
78
  else
80
- "_cat/indices"
79
+ '_cat/indices'
81
80
  end
82
81
  params = Utils.process_params(arguments)
83
82
  params[:h] = Utils.listify(params[:h]) if params[:h]