elasticsearch-serverless 0.1.0.20231031.pre → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch-serverless/api/async_search/delete.rb +13 -2
  3. data/lib/elasticsearch-serverless/api/async_search/get.rb +19 -4
  4. data/lib/elasticsearch-serverless/api/async_search/status.rb +12 -2
  5. data/lib/elasticsearch-serverless/api/async_search/submit.rb +20 -5
  6. data/lib/elasticsearch-serverless/api/bulk.rb +19 -5
  7. data/lib/elasticsearch-serverless/api/cat/aliases.rb +24 -6
  8. data/lib/elasticsearch-serverless/api/cat/component_templates.rb +25 -6
  9. data/lib/elasticsearch-serverless/api/cat/count.rb +27 -7
  10. data/lib/elasticsearch-serverless/api/cat/help.rb +16 -6
  11. data/lib/elasticsearch-serverless/api/cat/indices.rb +34 -7
  12. data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +27 -7
  13. data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +35 -7
  14. data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +35 -7
  15. data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +28 -7
  16. data/lib/elasticsearch-serverless/api/cat/transforms.rb +30 -8
  17. data/lib/elasticsearch-serverless/api/clear_scroll.rb +13 -4
  18. data/lib/elasticsearch-serverless/api/close_point_in_time.rb +4 -2
  19. data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +16 -4
  20. data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +18 -5
  21. data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +17 -5
  22. data/lib/elasticsearch-serverless/api/cluster/info.rb +11 -2
  23. data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +28 -4
  24. data/lib/elasticsearch-serverless/api/connector/check_in.rb +65 -0
  25. data/lib/elasticsearch-serverless/api/connector/delete.rb +66 -0
  26. data/lib/elasticsearch-serverless/api/connector/get.rb +65 -0
  27. data/lib/elasticsearch-serverless/api/connector/list.rb +60 -0
  28. data/lib/elasticsearch-serverless/api/connector/post.rb +55 -0
  29. data/lib/elasticsearch-serverless/api/connector/put.rb +68 -0
  30. data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +66 -0
  31. data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +66 -0
  32. data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +66 -0
  33. data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +59 -0
  34. data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +57 -0
  35. data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +65 -0
  36. data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +67 -0
  37. data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +67 -0
  38. data/lib/elasticsearch-serverless/api/connector/update_error.rb +67 -0
  39. data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +67 -0
  40. data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +67 -0
  41. data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +67 -0
  42. data/lib/elasticsearch-serverless/api/connector/update_name.rb +67 -0
  43. data/lib/elasticsearch-serverless/api/connector/update_native.rb +67 -0
  44. data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +67 -0
  45. data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +67 -0
  46. data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +67 -0
  47. data/lib/elasticsearch-serverless/api/connector/update_status.rb +67 -0
  48. data/lib/elasticsearch-serverless/api/count.rb +30 -10
  49. data/lib/elasticsearch-serverless/api/create.rb +23 -8
  50. data/lib/elasticsearch-serverless/api/delete.rb +18 -6
  51. data/lib/elasticsearch-serverless/api/delete_by_query.rb +39 -12
  52. data/lib/elasticsearch-serverless/api/delete_script.rb +15 -4
  53. data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +10 -1
  54. data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +9 -1
  55. data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +13 -3
  56. data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +11 -2
  57. data/lib/elasticsearch-serverless/api/enrich/stats.rb +5 -2
  58. data/lib/elasticsearch-serverless/api/eql/delete.rb +14 -3
  59. data/lib/elasticsearch-serverless/api/eql/get.rb +14 -4
  60. data/lib/elasticsearch-serverless/api/eql/get_status.rb +10 -2
  61. data/lib/elasticsearch-serverless/api/eql/search.rb +9 -1
  62. data/lib/elasticsearch-serverless/api/esql/query.rb +57 -0
  63. data/lib/elasticsearch-serverless/api/exists.rb +20 -6
  64. data/lib/elasticsearch-serverless/api/exists_source.rb +17 -5
  65. data/lib/elasticsearch-serverless/api/explain.rb +17 -5
  66. data/lib/elasticsearch-serverless/api/field_caps.rb +16 -3
  67. data/lib/elasticsearch-serverless/api/get.rb +18 -4
  68. data/lib/elasticsearch-serverless/api/get_script.rb +11 -2
  69. data/lib/elasticsearch-serverless/api/get_source.rb +10 -1
  70. data/lib/elasticsearch-serverless/api/graph/explore.rb +13 -3
  71. data/lib/elasticsearch-serverless/api/index.rb +27 -7
  72. data/lib/elasticsearch-serverless/api/indices/add_block.rb +11 -2
  73. data/lib/elasticsearch-serverless/api/indices/analyze.rb +13 -3
  74. data/lib/elasticsearch-serverless/api/indices/create.rb +17 -5
  75. data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +18 -3
  76. data/lib/elasticsearch-serverless/api/indices/data_streams_stats.rb +16 -4
  77. data/lib/elasticsearch-serverless/api/indices/delete.rb +26 -8
  78. data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +19 -6
  79. data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +11 -2
  80. data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +11 -2
  81. data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +13 -2
  82. data/lib/elasticsearch-serverless/api/indices/exists.rb +17 -4
  83. data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +19 -5
  84. data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +9 -1
  85. data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +11 -2
  86. data/lib/elasticsearch-serverless/api/indices/get.rb +20 -5
  87. data/lib/elasticsearch-serverless/api/indices/get_alias.rb +23 -6
  88. data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +17 -4
  89. data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +15 -4
  90. data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +11 -2
  91. data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +23 -6
  92. data/lib/elasticsearch-serverless/api/indices/get_settings.rb +28 -7
  93. data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +20 -2
  94. data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +5 -2
  95. data/lib/elasticsearch-serverless/api/indices/put_alias.rb +21 -6
  96. data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +22 -6
  97. data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +14 -2
  98. data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +23 -6
  99. data/lib/elasticsearch-serverless/api/indices/put_settings.rb +29 -7
  100. data/lib/elasticsearch-serverless/api/indices/put_template.rb +71 -0
  101. data/lib/elasticsearch-serverless/api/indices/refresh.rb +21 -5
  102. data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +17 -4
  103. data/lib/elasticsearch-serverless/api/indices/rollover.rb +20 -7
  104. data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +13 -6
  105. data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +14 -4
  106. data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +9 -4
  107. data/lib/elasticsearch-serverless/api/indices/validate_query.rb +24 -7
  108. data/lib/elasticsearch-serverless/api/inference/delete.rb +74 -0
  109. data/lib/elasticsearch-serverless/api/inference/get.rb +72 -0
  110. data/lib/elasticsearch-serverless/api/inference/inference.rb +74 -0
  111. data/lib/elasticsearch-serverless/api/inference/put.rb +74 -0
  112. data/lib/elasticsearch-serverless/api/info.rb +4 -1
  113. data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +16 -5
  114. data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +16 -4
  115. data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +6 -2
  116. data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +11 -2
  117. data/lib/elasticsearch-serverless/api/ingest/simulate.rb +12 -3
  118. data/lib/elasticsearch-serverless/api/license/get.rb +8 -3
  119. data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +10 -2
  120. data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +10 -2
  121. data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +10 -2
  122. data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +18 -4
  123. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +11 -2
  124. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +12 -3
  125. data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +12 -3
  126. data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +10 -2
  127. data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +16 -4
  128. data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +12 -2
  129. data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +23 -5
  130. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +11 -2
  131. data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +13 -2
  132. data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +7 -2
  133. data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +8 -2
  134. data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +27 -6
  135. data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +9 -1
  136. data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +9 -1
  137. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +27 -4
  138. data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +21 -3
  139. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +26 -3
  140. data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +28 -4
  141. data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +10 -1
  142. data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +21 -3
  143. data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +27 -4
  144. data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +46 -7
  145. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +29 -8
  146. data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +19 -4
  147. data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +71 -0
  148. data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +17 -2
  149. data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +10 -2
  150. data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +10 -2
  151. data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +21 -2
  152. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +10 -2
  153. data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +10 -2
  154. data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +14 -2
  155. data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +25 -4
  156. data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +11 -1
  157. data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +11 -2
  158. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +15 -3
  159. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +28 -3
  160. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +12 -3
  161. data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +12 -2
  162. data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +19 -4
  163. data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +25 -3
  164. data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +35 -4
  165. data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +26 -6
  166. data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +25 -4
  167. data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +21 -3
  168. data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +16 -4
  169. data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +13 -3
  170. data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +26 -5
  171. data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +10 -2
  172. data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +9 -1
  173. data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +68 -0
  174. data/lib/elasticsearch-serverless/api/mget.rb +17 -3
  175. data/lib/elasticsearch-serverless/api/msearch.rb +15 -1
  176. data/lib/elasticsearch-serverless/api/msearch_template.rb +17 -5
  177. data/lib/elasticsearch-serverless/api/mtermvectors.rb +14 -8
  178. data/lib/elasticsearch-serverless/api/open_point_in_time.rb +20 -4
  179. data/lib/elasticsearch-serverless/api/ping.rb +4 -1
  180. data/lib/elasticsearch-serverless/api/put_script.rb +19 -6
  181. data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +65 -0
  182. data/lib/elasticsearch-serverless/api/{query_ruleset/delete.rb → query_rules/delete_ruleset.rb} +11 -7
  183. data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +65 -0
  184. data/lib/elasticsearch-serverless/api/{query_ruleset/get.rb → query_rules/get_ruleset.rb} +12 -8
  185. data/lib/elasticsearch-serverless/api/{query_ruleset/list.rb → query_rules/list_rulesets.rb} +6 -8
  186. data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +67 -0
  187. data/lib/elasticsearch-serverless/api/{query_ruleset/put.rb → query_rules/put_ruleset.rb} +11 -7
  188. data/lib/elasticsearch-serverless/api/rank_eval.rb +12 -3
  189. data/lib/elasticsearch-serverless/api/reindex.rb +11 -7
  190. data/lib/elasticsearch-serverless/api/render_search_template.rb +12 -3
  191. data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +5 -2
  192. data/lib/elasticsearch-serverless/api/scroll.rb +9 -1
  193. data/lib/elasticsearch-serverless/api/search.rb +110 -30
  194. data/lib/elasticsearch-serverless/api/search_application/delete.rb +9 -1
  195. data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +9 -1
  196. data/lib/elasticsearch-serverless/api/search_application/get.rb +10 -2
  197. data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +9 -1
  198. data/lib/elasticsearch-serverless/api/search_application/list.rb +3 -1
  199. data/lib/elasticsearch-serverless/api/search_application/put.rb +9 -1
  200. data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +9 -1
  201. data/lib/elasticsearch-serverless/api/search_application/search.rb +12 -3
  202. data/lib/elasticsearch-serverless/api/search_mvt.rb +27 -7
  203. data/lib/elasticsearch-serverless/api/search_template.rb +23 -7
  204. data/lib/elasticsearch-serverless/api/security/authenticate.rb +8 -2
  205. data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -1
  206. data/lib/elasticsearch-serverless/api/security/get_api_key.rb +23 -7
  207. data/lib/elasticsearch-serverless/api/security/has_privileges.rb +10 -1
  208. data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +10 -1
  209. data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +9 -3
  210. data/lib/elasticsearch-serverless/api/security/update_api_key.rb +75 -0
  211. data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +3 -1
  212. data/lib/elasticsearch-serverless/api/sql/delete_async.rb +9 -1
  213. data/lib/elasticsearch-serverless/api/sql/get_async.rb +15 -4
  214. data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +9 -1
  215. data/lib/elasticsearch-serverless/api/sql/query.rb +3 -1
  216. data/lib/elasticsearch-serverless/api/sql/translate.rb +3 -1
  217. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +9 -1
  218. data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +9 -1
  219. data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +9 -1
  220. data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +9 -1
  221. data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +3 -1
  222. data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +10 -2
  223. data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -1
  224. data/lib/elasticsearch-serverless/api/tasks/get.rb +67 -0
  225. data/lib/elasticsearch-serverless/api/terms_enum.rb +9 -1
  226. data/lib/elasticsearch-serverless/api/termvectors.rb +21 -9
  227. data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +15 -4
  228. data/lib/elasticsearch-serverless/api/transform/get_transform.rb +23 -4
  229. data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +20 -3
  230. data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +18 -4
  231. data/lib/elasticsearch-serverless/api/transform/put_transform.rb +34 -4
  232. data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +17 -4
  233. data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +15 -2
  234. data/lib/elasticsearch-serverless/api/transform/start_transform.rb +24 -2
  235. data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +23 -6
  236. data/lib/elasticsearch-serverless/api/transform/update_transform.rb +20 -3
  237. data/lib/elasticsearch-serverless/api/update.rb +23 -7
  238. data/lib/elasticsearch-serverless/api/update_by_query.rb +38 -11
  239. data/lib/elasticsearch-serverless/api.rb +9 -6
  240. data/lib/elasticsearch-serverless/version.rb +3 -3
  241. data/lib/elasticsearch-serverless.rb +16 -7
  242. metadata +46 -65
@@ -21,23 +21,35 @@
21
21
  module ElasticsearchServerless
22
22
  module API
23
23
  module Actions
24
- # Performs an update on every document in the index without changing the source,
25
- # for example to pick up a mapping change.
24
+ # Update documents.
25
+ # Updates documents that match the specified query.
26
+ # If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.
26
27
  #
27
- # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (+*+). To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
28
- # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
28
+ # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases to search.
29
+ # Supports wildcards (+*+).
30
+ # To search all data streams or indices, omit this parameter or use +*+ or +_all+. (*Required*)
31
+ # @option arguments [Boolean] :allow_no_indices If +false+, the request returns an error if any wildcard expression, index alias, or +_all+ value targets only missing or closed indices.
32
+ # This behavior applies even if the request targets other open indices.
33
+ # For example, a request targeting +foo*,bar*+ returns an error if an index starts with +foo+ but no index starts with +bar+. Server default: true.
29
34
  # @option arguments [String] :analyzer Analyzer to use for the query string.
30
35
  # @option arguments [Boolean] :analyze_wildcard If +true+, wildcard and prefix queries are analyzed.
31
36
  # @option arguments [String] :conflicts What to do if update by query hits version conflicts: +abort+ or +proceed+. Server default: abort.
32
37
  # @option arguments [String] :default_operator The default operator for query string query: +AND+ or +OR+. Server default: OR.
33
38
  # @option arguments [String] :df Field to use as default where no field prefix is given in the query string.
34
- # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as +open,hidden+. Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
39
+ # @option arguments [String, Array<String>] :expand_wildcards Type of index that wildcard patterns can match.
40
+ # If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
41
+ # Supports comma-separated values, such as +open,hidden+.
42
+ # Valid values are: +all+, +open+, +closed+, +hidden+, +none+.
35
43
  # @option arguments [Integer] :from Starting offset (default: 0)
36
44
  # @option arguments [Boolean] :ignore_unavailable If +false+, the request returns an error if it targets a missing or closed index.
37
45
  # @option arguments [Boolean] :lenient If +true+, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
38
- # @option arguments [Integer] :max_docs Maximum number of documents to process. Defaults to all documents.
39
- # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.
40
- # @option arguments [String] :preference Specifies the node or shard the operation should be performed on. Random by default.
46
+ # @option arguments [Integer] :max_docs Maximum number of documents to process.
47
+ # Defaults to all documents.
48
+ # @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents.
49
+ # If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request.
50
+ # If a final pipeline is configured it will always run, regardless of the value of this parameter.
51
+ # @option arguments [String] :preference Specifies the node or shard the operation should be performed on.
52
+ # Random by default.
41
53
  # @option arguments [Boolean] :refresh If +true+, Elasticsearch refreshes affected shards to make the operation visible to search.
42
54
  # @option arguments [Boolean] :request_cache If +true+, the request cache is used for this request.
43
55
  # @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second. Server default: -1.
@@ -49,11 +61,18 @@ module ElasticsearchServerless
49
61
  # @option arguments [Integer, String] :slices The number of slices this task should be divided into. Server default: 1.
50
62
  # @option arguments [Array<String>] :sort A comma-separated list of <field>:<direction> pairs.
51
63
  # @option arguments [Array<String>] :stats Specific +tag+ of the request for logging and statistical purposes.
52
- # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
64
+ # @option arguments [Integer] :terminate_after Maximum number of documents to collect for each shard.
65
+ # If a query reaches this limit, Elasticsearch terminates the query early.
66
+ # Elasticsearch collects documents before sorting.
67
+ # Use with caution.
68
+ # Elasticsearch applies this parameter to each shard handling the request.
69
+ # When possible, let Elasticsearch perform early termination automatically.
70
+ # Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
53
71
  # @option arguments [Time] :timeout Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. Server default: 1m.
54
72
  # @option arguments [Boolean] :version If +true+, returns the document version as part of a hit.
55
73
  # @option arguments [Boolean] :version_type Should the document increment the version number (internal) on hit or not (reindex)
56
- # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
74
+ # @option arguments [Integer, String] :wait_for_active_shards The number of shard copies that must be active before proceeding with the operation.
75
+ # Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1.
57
76
  # @option arguments [Boolean] :wait_for_completion If +true+, the request blocks until the operation is complete. Server default: true.
58
77
  # @option arguments [Hash] :headers Custom HTTP headers
59
78
  # @option arguments [Hash] :body request body
@@ -61,6 +80,14 @@ module ElasticsearchServerless
61
80
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html
62
81
  #
63
82
  def update_by_query(arguments = {})
83
+ request_opts = { endpoint: arguments[:endpoint] || "update_by_query" }
84
+
85
+ defined_params = [:index].inject({}) do |set_variables, variable|
86
+ set_variables[variable] = arguments[variable] if arguments.key?(variable)
87
+ set_variables
88
+ end
89
+ request_opts[:defined_params] = defined_params unless defined_params.empty?
90
+
64
91
  raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
65
92
 
66
93
  arguments = arguments.clone
@@ -75,7 +102,7 @@ module ElasticsearchServerless
75
102
  params = Utils.process_params(arguments)
76
103
 
77
104
  ElasticsearchServerless::API::Response.new(
78
- perform_request(method, path, params, body, headers)
105
+ perform_request(method, path, params, body, headers, request_opts)
79
106
  )
80
107
  end
81
108
  end
@@ -19,7 +19,7 @@ require 'elasticsearch-serverless/api/response'
19
19
  require 'elasticsearch-serverless/api/utils'
20
20
 
21
21
  # Require everything in /api
22
- Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f}
22
+ Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f }
23
23
 
24
24
  module ElasticsearchServerless
25
25
  module API
@@ -48,8 +48,8 @@ module ElasticsearchServerless
48
48
  @client = client
49
49
  end
50
50
 
51
- def perform_request(method, path, params = {}, body = nil, headers = nil)
52
- client.perform_request method, path, params, body, headers
51
+ def perform_request(method, path, params = {}, body = nil, headers = nil, request_opts = {})
52
+ client.perform_request(method, path, params, body, headers, request_opts)
53
53
  end
54
54
  end
55
55
 
@@ -59,15 +59,18 @@ module ElasticsearchServerless
59
59
  :async_search,
60
60
  :cat,
61
61
  :cluster,
62
+ :connector,
62
63
  :enrich,
63
64
  :eql,
65
+ :esql,
64
66
  :graph,
65
67
  :indices,
68
+ :inference,
66
69
  :ingest,
67
70
  :license,
68
71
  :logstash,
69
72
  :machine_learning,
70
- :query_ruleset,
73
+ :query_rules,
71
74
  :search_application,
72
75
  :security,
73
76
  :sql,
@@ -81,7 +84,7 @@ module ElasticsearchServerless
81
84
  module_name = if UPPERCASE_APIS.include?(name)
82
85
  name.upcase
83
86
  else
84
- name.split("_").map(&:capitalize).join
87
+ name.split('_').map(&:capitalize).join
85
88
  end
86
89
  class_name = "#{module_name}Client"
87
90
 
@@ -94,6 +97,6 @@ module ElasticsearchServerless
94
97
  end
95
98
  end
96
99
  # TODO: If there are more aliases, make this dynamic and add them to constant
97
- alias :ml :machine_learning
100
+ alias ml machine_learning
98
101
  end
99
102
  end
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ElasticsearchServerless
19
- API_VERSION = '2023-10-31'
20
- CLIENT_VERSION = '0.1.0'
21
- VERSION = "#{CLIENT_VERSION}.#{API_VERSION.split('-').join}.pre".freeze
19
+ API_VERSION = '2023-10-31'.freeze
20
+ CLIENT_VERSION = '0.3.0'.freeze
21
+ VERSION = CLIENT_VERSION
22
22
  end
@@ -23,16 +23,25 @@ module ElasticsearchServerless
23
23
  class Client
24
24
  include ElasticsearchServerless::API
25
25
 
26
- VALID_PARAMETERS = [:adapter, :log, :logger, :serializer_class, :trace, :tracer, :headers]
26
+ VALID_PARAMETERS = [:adapter, :log, :logger, :serializer_class, :trace, :tracer, :headers,
27
+ :request_timeout, :retry_on_status, :retry_on_failure, :delay_on_retry,
28
+ :opentelemetry_tracer_provider]
27
29
 
28
30
  # Initializes an Elasticsearch Serverless Client
29
31
  #
30
- # @param :api_key [String] Base64 String, format used to authenticate with Elasticsearch
31
- # @param :url [String] Elasticsearch endpoint
32
- # @param :arguments [Hash] Other optional arguments.
32
+ # @param [String] api_key Base64 String, format used to authenticate with Elasticsearch
33
+ # @param [String] url Elasticsearch endpoint
34
+ # @param [Hash] arguments Other optional arguments.
33
35
  # @option arguments [Symbol] :adapter A specific adapter for Faraday (e.g. `:patron`)
34
36
  # @option arguments [Boolean] :log Use the default logger (disabled by default)
35
37
  # @option arguments [Object] :logger An instance of a Logger-compatible object
38
+ # @option arguments [Integer] :request_timeout The request timeout to be passed to transport in
39
+ # options in seconds
40
+ # @option arguments [Boolean,Number] :retry_on_failure Retry X times when request fails before raising and
41
+ # exception (false by default)
42
+ # @option arguments Array<Number> :retry_on_status Retry when specific status codes are returned
43
+ # @option arguments [Number] :delay_on_retry Delay in milliseconds between each retry (0 by default)
44
+ # @option arguments [Boolean] :trace Use the default tracer (disabled by default)
36
45
  # @option arguments [Boolean] :trace Use the default tracer (disabled by default)
37
46
  # @option arguments [Object] :tracer An instance of a Logger-compatible object
38
47
  # @option arguments [Constant] :serializer_class A specific serializer class to use, will be initialized by
@@ -53,7 +62,7 @@ module ElasticsearchServerless
53
62
  'Authorization' => "ApiKey #{api_key}",
54
63
  'Elastic-Api-Version' => ElasticsearchServerless::API_VERSION,
55
64
  user_agent: user_agent
56
- },
65
+ }
57
66
  },
58
67
  compression: true
59
68
  }
@@ -87,7 +96,7 @@ module ElasticsearchServerless
87
96
  if RbConfig::CONFIG && RbConfig::CONFIG['host_os']
88
97
  user_agent << "#{RbConfig::CONFIG['host_os'].split('_').first[/[a-z]+/i].downcase} #{RbConfig::CONFIG['target_cpu']}"
89
98
  end
90
- user_agent.join("; ")
99
+ user_agent.join('; ')
91
100
  end
92
101
  end
93
102
  end
@@ -100,5 +109,5 @@ module Elastic
100
109
  ElasticsearchServerless::CLIENT_VERSION
101
110
  end
102
111
 
103
- ELASTICSEARCH_SERVICE_VERSION = [:esv, client_meta_version].freeze
112
+ ES_SERVERLESS_SERVICE_VERSION = [:esv, client_meta_version].freeze
104
113
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-serverless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.20231031.pre
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-28 00:00:00.000000000 Z
11
+ date: 2024-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -16,70 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '8'
19
+ version: '8.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '8'
27
- - !ruby/object:Gem::Dependency
28
- name: debug
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.0.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 1.0.0
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rspec
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: faraday-net_http_persistent
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
26
+ version: '8.3'
83
27
  description:
84
28
  email: support@elastic.co
85
29
  executables: []
@@ -110,6 +54,30 @@ files:
110
54
  - lib/elasticsearch-serverless/api/cluster/get_component_template.rb
111
55
  - lib/elasticsearch-serverless/api/cluster/info.rb
112
56
  - lib/elasticsearch-serverless/api/cluster/put_component_template.rb
57
+ - lib/elasticsearch-serverless/api/connector/check_in.rb
58
+ - lib/elasticsearch-serverless/api/connector/delete.rb
59
+ - lib/elasticsearch-serverless/api/connector/get.rb
60
+ - lib/elasticsearch-serverless/api/connector/list.rb
61
+ - lib/elasticsearch-serverless/api/connector/post.rb
62
+ - lib/elasticsearch-serverless/api/connector/put.rb
63
+ - lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb
64
+ - lib/elasticsearch-serverless/api/connector/sync_job_delete.rb
65
+ - lib/elasticsearch-serverless/api/connector/sync_job_get.rb
66
+ - lib/elasticsearch-serverless/api/connector/sync_job_list.rb
67
+ - lib/elasticsearch-serverless/api/connector/sync_job_post.rb
68
+ - lib/elasticsearch-serverless/api/connector/update_active_filtering.rb
69
+ - lib/elasticsearch-serverless/api/connector/update_api_key_id.rb
70
+ - lib/elasticsearch-serverless/api/connector/update_configuration.rb
71
+ - lib/elasticsearch-serverless/api/connector/update_error.rb
72
+ - lib/elasticsearch-serverless/api/connector/update_filtering.rb
73
+ - lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb
74
+ - lib/elasticsearch-serverless/api/connector/update_index_name.rb
75
+ - lib/elasticsearch-serverless/api/connector/update_name.rb
76
+ - lib/elasticsearch-serverless/api/connector/update_native.rb
77
+ - lib/elasticsearch-serverless/api/connector/update_pipeline.rb
78
+ - lib/elasticsearch-serverless/api/connector/update_scheduling.rb
79
+ - lib/elasticsearch-serverless/api/connector/update_service_type.rb
80
+ - lib/elasticsearch-serverless/api/connector/update_status.rb
113
81
  - lib/elasticsearch-serverless/api/count.rb
114
82
  - lib/elasticsearch-serverless/api/create.rb
115
83
  - lib/elasticsearch-serverless/api/delete.rb
@@ -124,6 +92,7 @@ files:
124
92
  - lib/elasticsearch-serverless/api/eql/get.rb
125
93
  - lib/elasticsearch-serverless/api/eql/get_status.rb
126
94
  - lib/elasticsearch-serverless/api/eql/search.rb
95
+ - lib/elasticsearch-serverless/api/esql/query.rb
127
96
  - lib/elasticsearch-serverless/api/exists.rb
128
97
  - lib/elasticsearch-serverless/api/exists_source.rb
129
98
  - lib/elasticsearch-serverless/api/explain.rb
@@ -161,6 +130,7 @@ files:
161
130
  - lib/elasticsearch-serverless/api/indices/put_index_template.rb
162
131
  - lib/elasticsearch-serverless/api/indices/put_mapping.rb
163
132
  - lib/elasticsearch-serverless/api/indices/put_settings.rb
133
+ - lib/elasticsearch-serverless/api/indices/put_template.rb
164
134
  - lib/elasticsearch-serverless/api/indices/refresh.rb
165
135
  - lib/elasticsearch-serverless/api/indices/resolve_index.rb
166
136
  - lib/elasticsearch-serverless/api/indices/rollover.rb
@@ -168,6 +138,10 @@ files:
168
138
  - lib/elasticsearch-serverless/api/indices/simulate_template.rb
169
139
  - lib/elasticsearch-serverless/api/indices/update_aliases.rb
170
140
  - lib/elasticsearch-serverless/api/indices/validate_query.rb
141
+ - lib/elasticsearch-serverless/api/inference/delete.rb
142
+ - lib/elasticsearch-serverless/api/inference/get.rb
143
+ - lib/elasticsearch-serverless/api/inference/inference.rb
144
+ - lib/elasticsearch-serverless/api/inference/put.rb
171
145
  - lib/elasticsearch-serverless/api/info.rb
172
146
  - lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb
173
147
  - lib/elasticsearch-serverless/api/ingest/get_pipeline.rb
@@ -203,6 +177,7 @@ files:
203
177
  - lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb
204
178
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb
205
179
  - lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb
180
+ - lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb
206
181
  - lib/elasticsearch-serverless/api/machine_learning/open_job.rb
207
182
  - lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb
208
183
  - lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb
@@ -228,6 +203,7 @@ files:
228
203
  - lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb
229
204
  - lib/elasticsearch-serverless/api/machine_learning/update_filter.rb
230
205
  - lib/elasticsearch-serverless/api/machine_learning/update_job.rb
206
+ - lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb
231
207
  - lib/elasticsearch-serverless/api/mget.rb
232
208
  - lib/elasticsearch-serverless/api/msearch.rb
233
209
  - lib/elasticsearch-serverless/api/msearch_template.rb
@@ -235,10 +211,13 @@ files:
235
211
  - lib/elasticsearch-serverless/api/open_point_in_time.rb
236
212
  - lib/elasticsearch-serverless/api/ping.rb
237
213
  - lib/elasticsearch-serverless/api/put_script.rb
238
- - lib/elasticsearch-serverless/api/query_ruleset/delete.rb
239
- - lib/elasticsearch-serverless/api/query_ruleset/get.rb
240
- - lib/elasticsearch-serverless/api/query_ruleset/list.rb
241
- - lib/elasticsearch-serverless/api/query_ruleset/put.rb
214
+ - lib/elasticsearch-serverless/api/query_rules/delete_rule.rb
215
+ - lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb
216
+ - lib/elasticsearch-serverless/api/query_rules/get_rule.rb
217
+ - lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb
218
+ - lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb
219
+ - lib/elasticsearch-serverless/api/query_rules/put_rule.rb
220
+ - lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb
242
221
  - lib/elasticsearch-serverless/api/rank_eval.rb
243
222
  - lib/elasticsearch-serverless/api/reindex.rb
244
223
  - lib/elasticsearch-serverless/api/render_search_template.rb
@@ -262,6 +241,7 @@ files:
262
241
  - lib/elasticsearch-serverless/api/security/has_privileges.rb
263
242
  - lib/elasticsearch-serverless/api/security/invalidate_api_key.rb
264
243
  - lib/elasticsearch-serverless/api/security/query_api_keys.rb
244
+ - lib/elasticsearch-serverless/api/security/update_api_key.rb
265
245
  - lib/elasticsearch-serverless/api/sql/clear_cursor.rb
266
246
  - lib/elasticsearch-serverless/api/sql/delete_async.rb
267
247
  - lib/elasticsearch-serverless/api/sql/get_async.rb
@@ -275,6 +255,7 @@ files:
275
255
  - lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb
276
256
  - lib/elasticsearch-serverless/api/synonyms/put_synonym.rb
277
257
  - lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb
258
+ - lib/elasticsearch-serverless/api/tasks/get.rb
278
259
  - lib/elasticsearch-serverless/api/terms_enum.rb
279
260
  - lib/elasticsearch-serverless/api/termvectors.rb
280
261
  - lib/elasticsearch-serverless/api/transform/delete_transform.rb
@@ -310,7 +291,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
291
  - !ruby/object:Gem::Version
311
292
  version: '0'
312
293
  requirements: []
313
- rubygems_version: 3.5.3
294
+ rubygems_version: 3.5.11
314
295
  signing_key:
315
296
  specification_version: 4
316
297
  summary: Elasticsearch Serverless Client