elasticsearch-serverless 0.5.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 (250) 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 +11 -8
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +6 -10
  6. data/lib/elasticsearch-serverless/api/bulk.rb +109 -22
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +17 -18
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +17 -16
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +13 -18
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +5 -19
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +10 -15
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +7 -17
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +6 -16
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +6 -16
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +7 -16
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +6 -16
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +9 -7
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +8 -4
  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 +16 -13
  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 -8
  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 -6
  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 -11
  106. data/lib/elasticsearch-serverless/api/inference/get.rb +4 -9
  107. data/lib/elasticsearch-serverless/api/inference/inference.rb +0 -4
  108. data/lib/elasticsearch-serverless/api/inference/put.rb +12 -9
  109. data/lib/elasticsearch-serverless/api/inference/put_watsonx.rb +78 -0
  110. data/lib/elasticsearch-serverless/api/inference/rerank.rb +62 -0
  111. data/lib/elasticsearch-serverless/api/inference/sparse_embedding.rb +62 -0
  112. data/lib/elasticsearch-serverless/api/inference/text_embedding.rb +62 -0
  113. data/lib/elasticsearch-serverless/api/info.rb +4 -4
  114. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +5 -5
  115. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +6 -6
  116. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +5 -4
  117. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +3 -4
  118. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +9 -8
  119. data/lib/elasticsearch-serverless/api/license/get.rb +4 -5
  120. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +7 -6
  121. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +7 -7
  122. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +7 -6
  123. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +3 -4
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +4 -5
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +3 -4
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +3 -4
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +3 -4
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +3 -4
  129. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +3 -4
  130. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +3 -4
  131. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +4 -4
  132. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +3 -4
  133. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +5 -5
  134. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +3 -3
  135. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +3 -4
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +3 -4
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +4 -5
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +4 -5
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +4 -5
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +4 -5
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +4 -5
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +4 -5
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +4 -5
  144. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -5
  145. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +3 -4
  146. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +4 -5
  147. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +4 -5
  148. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +3 -9
  149. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +3 -4
  150. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +3 -4
  151. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +5 -6
  152. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +4 -5
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +3 -4
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +3 -4
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +6 -4
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +6 -6
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +3 -4
  158. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +16 -5
  159. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +3 -4
  160. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +3 -4
  161. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +3 -4
  162. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -4
  163. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +3 -4
  164. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +3 -4
  165. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +3 -4
  166. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +7 -6
  167. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +3 -4
  168. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +3 -4
  169. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +3 -4
  170. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +3 -4
  171. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +3 -4
  172. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +3 -4
  173. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +3 -4
  174. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +3 -4
  175. data/lib/elasticsearch-serverless/api/mget.rb +12 -5
  176. data/lib/elasticsearch-serverless/api/msearch.rb +16 -17
  177. data/lib/elasticsearch-serverless/api/msearch_template.rb +23 -16
  178. data/lib/elasticsearch-serverless/api/mtermvectors.rb +15 -12
  179. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +33 -11
  180. data/lib/elasticsearch-serverless/api/ping.rb +8 -10
  181. data/lib/elasticsearch-serverless/api/put_script.rb +12 -11
  182. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +6 -5
  183. data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +6 -5
  184. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +5 -5
  185. data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +5 -5
  186. data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +7 -6
  187. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +11 -7
  188. data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +11 -6
  189. data/lib/elasticsearch-serverless/api/query_rules/test.rb +5 -5
  190. data/lib/elasticsearch-serverless/api/rank_eval.rb +8 -7
  191. data/lib/elasticsearch-serverless/api/reindex.rb +146 -9
  192. data/lib/elasticsearch-serverless/api/render_search_template.rb +7 -7
  193. data/lib/elasticsearch-serverless/api/response.rb +1 -1
  194. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +7 -3
  195. data/lib/elasticsearch-serverless/api/scroll.rb +4 -4
  196. data/lib/elasticsearch-serverless/api/search.rb +79 -72
  197. data/lib/elasticsearch-serverless/api/search_application/delete.rb +4 -5
  198. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +3 -4
  199. data/lib/elasticsearch-serverless/api/search_application/get.rb +3 -4
  200. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +4 -5
  201. data/lib/elasticsearch-serverless/api/search_application/list.rb +5 -4
  202. data/lib/elasticsearch-serverless/api/search_application/put.rb +3 -4
  203. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +3 -4
  204. data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -4
  205. data/lib/elasticsearch-serverless/api/search_mvt.rb +132 -10
  206. data/lib/elasticsearch-serverless/api/search_template.rb +13 -13
  207. data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -3
  208. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -3
  209. data/lib/elasticsearch-serverless/api/security/delete_role.rb +6 -5
  210. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +3 -3
  211. data/lib/elasticsearch-serverless/api/security/get_builtin_privileges.rb +3 -3
  212. data/lib/elasticsearch-serverless/api/security/get_role.rb +11 -8
  213. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +6 -5
  214. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +8 -6
  215. data/lib/elasticsearch-serverless/api/security/put_role.rb +3 -4
  216. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +12 -6
  217. data/lib/elasticsearch-serverless/api/security/query_role.rb +61 -0
  218. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +74 -0
  219. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +4 -4
  220. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +10 -6
  221. data/lib/elasticsearch-serverless/api/sql/get_async.rb +16 -13
  222. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +6 -6
  223. data/lib/elasticsearch-serverless/api/sql/query.rb +8 -5
  224. data/lib/elasticsearch-serverless/api/sql/translate.rb +6 -4
  225. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +17 -6
  226. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +7 -7
  227. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +7 -8
  228. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +7 -7
  229. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +7 -6
  230. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -6
  231. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -7
  232. data/lib/elasticsearch-serverless/api/tasks/get.rb +9 -7
  233. data/lib/elasticsearch-serverless/api/terms_enum.rb +7 -9
  234. data/lib/elasticsearch-serverless/api/termvectors.rb +40 -17
  235. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +3 -5
  236. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +5 -6
  237. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +4 -5
  238. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -5
  239. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +3 -4
  240. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +4 -5
  241. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +7 -8
  242. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +3 -5
  243. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +3 -4
  244. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +3 -4
  245. data/lib/elasticsearch-serverless/api/update.rb +36 -24
  246. data/lib/elasticsearch-serverless/api/update_by_query.rb +102 -31
  247. data/lib/elasticsearch-serverless/api.rb +22 -25
  248. data/lib/elasticsearch-serverless/version.rb +1 -1
  249. data/lib/elasticsearch-serverless.rb +7 -0
  250. metadata +18 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aedc93a8ab9cc3c28fe2fa52d0a4225e1e1a030c0ccd72dd1a29c003035bbdfc
4
- data.tar.gz: f7c1fd06c870c37792572d51168583accc36c03b11e9b0e49c198dc0c42a1071
3
+ metadata.gz: 46610e7bad335976f71606b118384e4651fa882602bacbe3055e713cc16f4f63
4
+ data.tar.gz: 5633ddb2686aac1df293e338b885e20c0528a315a96dfeaf2bb72fa784f42e6e
5
5
  SHA512:
6
- metadata.gz: 55389aab59bfd1d8958156062c455b9c017d41f9e67f52bed901bf3f16c6b319b7655553caf8dd7b2d43a2756e15c7b72f85da6e56c79937252722ce2e143cf7
7
- data.tar.gz: e554159e81d7e519e9e18c600150a19d4df80dc3707fbdd6c417ba4389743b85d622b50bce66746ba5e9baa2fdc5994928c3402be5d3a8d3b90074e28a9640f7
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
 
@@ -22,21 +22,24 @@ module ElasticsearchServerless
22
22
  module API
23
23
  module AsyncSearch
24
24
  module Actions
25
- # Get async search status.
26
- # Retrieve 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.
25
+ # Get the async search status.
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, 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*)
32
+ # @option arguments [Time] :keep_alive The length of time that the async search needs to be available.
33
+ # Ongoing async searches and any saved search results are deleted after this period. Server default: 5d.
30
34
  # @option arguments [Hash] :headers Custom HTTP headers
31
35
  #
32
- # @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
33
37
  #
34
38
  def status(arguments = {})
35
- request_opts = { endpoint: arguments[:endpoint] || "async_search.status" }
39
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.status' }
36
40
 
37
- defined_params = [:id].inject({}) do |set_variables, variable|
41
+ defined_params = [:id].each_with_object({}) do |variable, set_variables|
38
42
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
39
- set_variables
40
43
  end
41
44
  request_opts[:defined_params] = defined_params unless defined_params.empty?
42
45
 
@@ -51,7 +54,7 @@ module ElasticsearchServerless
51
54
 
52
55
  method = ElasticsearchServerless::API::HTTP_GET
53
56
  path = "_async_search/status/#{Utils.listify(_id)}"
54
- params = {}
57
+ params = Utils.process_params(arguments)
55
58
 
56
59
  ElasticsearchServerless::API::Response.new(
57
60
  perform_request(method, path, params, body, headers, request_opts)
@@ -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
@@ -50,12 +50,9 @@ module ElasticsearchServerless
50
50
  # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
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
- # @option arguments [String] :min_compatible_shard_node [TODO]
54
53
  # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
55
- # @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.
56
54
  # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true Server default: true.
57
55
  # @option arguments [String] :routing A comma-separated list of specific routing values
58
- # @option arguments [Time] :scroll [TODO]
59
56
  # @option arguments [String] :search_type Search operation type
60
57
  # @option arguments [Array<String>] :stats Specific 'tag' of the request for logging and statistical purposes
61
58
  # @option arguments [String, Array<String>] :stored_fields A comma-separated list of stored fields to return as part of a hit
@@ -68,7 +65,7 @@ module ElasticsearchServerless
68
65
  # @option arguments [Boolean, Integer] :track_total_hits Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
69
66
  # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
70
67
  # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
71
- # @option arguments [Boolean] :rest_total_hits_as_int [TODO]
68
+ # @option arguments [Boolean] :rest_total_hits_as_int Indicates whether hits.total should be rendered as an integer or an object in the rest search response
72
69
  # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
73
70
  # @option arguments [Boolean, String, Array<String>] :_source True or false to return the _source field or not, or a list of fields to return
74
71
  # @option arguments [String, Array<String>] :_source_excludes A list of fields to exclude from the returned _source field
@@ -81,14 +78,13 @@ module ElasticsearchServerless
81
78
  # @option arguments [Hash] :headers Custom HTTP headers
82
79
  # @option arguments [Hash] :body request body
83
80
  #
84
- # @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
85
82
  #
86
83
  def submit(arguments = {})
87
- request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" }
84
+ request_opts = { endpoint: arguments[:endpoint] || 'async_search.submit' }
88
85
 
89
- defined_params = [:index].inject({}) do |set_variables, variable|
86
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
90
87
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
91
- set_variables
92
88
  end
93
89
  request_opts[:defined_params] = defined_params unless defined_params.empty?
94
90
 
@@ -103,7 +99,7 @@ module ElasticsearchServerless
103
99
  path = if _index
104
100
  "#{Utils.listify(_index)}/_async_search"
105
101
  else
106
- "_async_search"
102
+ '_async_search'
107
103
  end
108
104
  params = Utils.process_params(arguments)
109
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,36 +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 [Boolean] :local If +true+, the request computes the list of selected nodes from the
38
- # local cluster state. If +false+ the list of selected nodes are computed
39
- # from the cluster state of the master node. In both cases the coordinating
40
- # node will send requests for further information to each selected node.
41
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
42
32
  # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
43
33
  # Sorting defaults to ascending and can be changed by setting +:asc+
44
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.
45
45
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
46
46
  # @option arguments [Hash] :headers Custom HTTP headers
47
47
  #
48
- # @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
49
49
  #
50
50
  def aliases(arguments = {})
51
- request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" }
51
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' }
52
52
 
53
- defined_params = [:name].inject({}) do |set_variables, variable|
53
+ defined_params = [:name].each_with_object({}) do |variable, set_variables|
54
54
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
55
- set_variables
56
55
  end
57
56
  request_opts[:defined_params] = defined_params unless defined_params.empty?
58
57
 
@@ -67,7 +66,7 @@ module ElasticsearchServerless
67
66
  path = if _name
68
67
  "_cat/aliases/#{Utils.listify(_name)}"
69
68
  else
70
- "_cat/aliases"
69
+ '_cat/aliases'
71
70
  end
72
71
  params = Utils.process_params(arguments)
73
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.
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.
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
34
  # @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.
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.
37
38
  # @option arguments [Boolean] :local If +true+, the request computes the list of selected nodes from the
38
39
  # local cluster state. If +false+ the list of selected nodes are computed
39
40
  # from the cluster state of the master node. In both cases the coordinating
40
41
  # node will send requests for further information to each selected node.
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.
42
+ # @option arguments [Time] :master_timeout The period to wait for a connection to the master node. Server default: 30s.
43
+ # @option arguments [String] :format Specifies the format to return the columnar data in, can be set to
44
+ # +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.
45
+ # @option arguments [Boolean] :help When set to +true+ will output available columns. This option
46
+ # can't be combined with any other query string option.
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,37 +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 [Boolean] :local If +true+, the request computes the list of selected nodes from the
39
- # local cluster state. If +false+ the list of selected nodes are computed
40
- # from the cluster state of the master node. In both cases the coordinating
41
- # node will send requests for further information to each selected node.
42
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
43
35
  # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
44
36
  # Sorting defaults to ascending and can be changed by setting +:asc+
45
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.
46
42
  # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
47
43
  # @option arguments [Hash] :headers Custom HTTP headers
48
44
  #
49
- # @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
50
46
  #
51
47
  def count(arguments = {})
52
- request_opts = { endpoint: arguments[:endpoint] || "cat.count" }
48
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.count' }
53
49
 
54
- defined_params = [:index].inject({}) do |set_variables, variable|
50
+ defined_params = [:index].each_with_object({}) do |variable, set_variables|
55
51
  set_variables[variable] = arguments[variable] if arguments.key?(variable)
56
- set_variables
57
52
  end
58
53
  request_opts[:defined_params] = defined_params unless defined_params.empty?
59
54
 
@@ -68,7 +63,7 @@ module ElasticsearchServerless
68
63
  path = if _index
69
64
  "_cat/count/#{Utils.listify(_index)}"
70
65
  else
71
- "_cat/count"
66
+ '_cat/count'
72
67
  end
73
68
  params = Utils.process_params(arguments)
74
69
  params[:h] = Utils.listify(params[:h]) if params[:h]
@@ -23,28 +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 [Boolean] :local If +true+, the request computes the list of selected nodes from the
34
- # local cluster state. If +false+ the list of selected nodes are computed
35
- # from the cluster state of the master node. In both cases the coordinating
36
- # node will send requests for further information to each selected node.
37
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. Server default: 30s.
38
- # @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
39
- # Sorting defaults to ascending and can be changed by setting +:asc+
40
- # or +:desc+ as a suffix to the column name.
41
- # @option arguments [Boolean] :v When set to +true+ will enable verbose output.
42
28
  # @option arguments [Hash] :headers Custom HTTP headers
43
29
  #
44
- # @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
45
31
  #
46
32
  def help(arguments = {})
47
- request_opts = { endpoint: arguments[:endpoint] || "cat.help" }
33
+ request_opts = { endpoint: arguments[:endpoint] || 'cat.help' }
48
34
 
49
35
  arguments = arguments.clone
50
36
  headers = arguments.delete(:headers) || {}
@@ -52,8 +38,8 @@ module ElasticsearchServerless
52
38
  body = nil
53
39
 
54
40
  method = ElasticsearchServerless::API::HTTP_GET
55
- path = "_cat"
56
- params = Utils.process_params(arguments)
41
+ path = '_cat'
42
+ params = {}
57
43
 
58
44
  ElasticsearchServerless::API::Response.new(
59
45
  perform_request(method, path, params, body, headers, request_opts)