elasticsearch-xpack 7.6.0 → 7.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +17 -3
  3. data/Rakefile +16 -3
  4. data/elasticsearch-xpack.gemspec +23 -5
  5. data/examples/watcher/error_500.rb +16 -3
  6. data/lib/elasticsearch/xpack.rb +36 -3
  7. data/lib/elasticsearch/xpack/api/actions/async_search/delete.rb +50 -0
  8. data/lib/elasticsearch/xpack/api/actions/async_search/get.rb +62 -0
  9. data/lib/elasticsearch/xpack/api/actions/async_search/params_registry.rb +62 -0
  10. data/lib/elasticsearch/xpack/api/actions/async_search/submit.rb +145 -0
  11. data/lib/elasticsearch/xpack/api/actions/cat/ml_data_frame_analytics.rb +76 -0
  12. data/lib/elasticsearch/xpack/api/actions/cat/ml_datafeeds.rb +73 -0
  13. data/lib/elasticsearch/xpack/api/actions/cat/ml_jobs.rb +76 -0
  14. data/lib/elasticsearch/xpack/api/actions/cat/ml_trained_models.rb +80 -0
  15. data/lib/elasticsearch/xpack/api/actions/cat/params_registry.rb +62 -0
  16. data/lib/elasticsearch/xpack/api/actions/cat/transform.rb +77 -0
  17. data/lib/elasticsearch/xpack/api/actions/cat/transforms.rb +77 -0
  18. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb +26 -8
  19. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +27 -9
  20. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +26 -8
  21. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/params_registry.rb +16 -3
  22. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/preview_transform.rb +27 -7
  23. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/put_transform.rb +26 -8
  24. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/start_transform.rb +26 -8
  25. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +26 -8
  26. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/update_transform.rb +26 -8
  27. data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +22 -8
  28. data/lib/elasticsearch/xpack/api/actions/graph/params_registry.rb +16 -3
  29. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +22 -8
  30. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_policy.rb +16 -3
  31. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain.rb +16 -3
  32. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain_lifecycle.rb +22 -8
  33. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +23 -9
  34. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_policy.rb +16 -3
  35. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +23 -7
  36. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +22 -8
  37. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/params_registry.rb +16 -3
  38. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +22 -8
  39. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_policy.rb +16 -3
  40. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +22 -8
  41. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +22 -8
  42. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry_policy.rb +16 -3
  43. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +23 -7
  44. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +23 -7
  45. data/lib/elasticsearch/xpack/api/actions/indices/freeze.rb +69 -0
  46. data/lib/elasticsearch/xpack/api/actions/indices/params_registry.rb +62 -0
  47. data/lib/elasticsearch/xpack/api/actions/indices/reload_search_analyzers.rb +63 -0
  48. data/lib/elasticsearch/xpack/api/actions/indices/unfreeze.rb +69 -0
  49. data/lib/elasticsearch/xpack/api/actions/info.rb +25 -9
  50. data/lib/elasticsearch/xpack/api/actions/license/delete.rb +23 -7
  51. data/lib/elasticsearch/xpack/api/actions/license/get.rb +22 -8
  52. data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +23 -7
  53. data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +23 -7
  54. data/lib/elasticsearch/xpack/api/actions/license/params_registry.rb +16 -3
  55. data/lib/elasticsearch/xpack/api/actions/license/post.rb +22 -8
  56. data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +22 -8
  57. data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +22 -8
  58. data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +22 -8
  59. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +22 -8
  60. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +22 -8
  61. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +22 -8
  62. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +29 -9
  63. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +22 -8
  64. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +25 -8
  65. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +22 -8
  66. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +22 -8
  67. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +22 -8
  68. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +22 -8
  69. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model.rb +26 -8
  70. data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_memory_usage.rb +16 -3
  71. data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_model_memory.rb +48 -0
  72. data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +27 -7
  73. data/lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb +27 -9
  74. data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +26 -9
  75. data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +22 -8
  76. data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +22 -8
  77. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +22 -8
  78. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +22 -8
  79. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +23 -9
  80. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +22 -8
  81. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +27 -9
  82. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +27 -9
  83. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +23 -9
  84. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +23 -9
  85. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +23 -9
  86. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +23 -9
  87. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +23 -9
  88. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +23 -9
  89. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +22 -8
  90. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +22 -8
  91. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +24 -10
  92. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models.rb +30 -10
  93. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb +27 -9
  94. data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +23 -7
  95. data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +22 -8
  96. data/lib/elasticsearch/xpack/api/actions/machine_learning/params_registry.rb +16 -3
  97. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +22 -8
  98. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +22 -8
  99. data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +22 -8
  100. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +22 -8
  101. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +22 -8
  102. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +26 -8
  103. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +38 -9
  104. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +22 -8
  105. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +22 -8
  106. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb +26 -8
  107. data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +22 -8
  108. data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +22 -8
  109. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +26 -8
  110. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +22 -8
  111. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +26 -8
  112. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +22 -8
  113. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +38 -9
  114. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +22 -8
  115. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +22 -8
  116. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +22 -8
  117. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +23 -7
  118. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +23 -7
  119. data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +23 -9
  120. data/lib/elasticsearch/xpack/api/actions/migration/params_registry.rb +16 -3
  121. data/lib/elasticsearch/xpack/api/actions/monitoring/bulk.rb +27 -8
  122. data/lib/elasticsearch/xpack/api/actions/monitoring/params_registry.rb +16 -3
  123. data/lib/elasticsearch/xpack/api/actions/params_registry.rb +16 -3
  124. data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +26 -8
  125. data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +27 -9
  126. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +27 -9
  127. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +26 -8
  128. data/lib/elasticsearch/xpack/api/actions/rollup/params_registry.rb +16 -3
  129. data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +26 -8
  130. data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +26 -8
  131. data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +26 -8
  132. data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +26 -8
  133. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/clear_cache.rb +71 -0
  134. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/mount.rb +70 -0
  135. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/params_registry.rb +62 -0
  136. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/repository_stats.rb +54 -0
  137. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/stats.rb +56 -0
  138. data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +23 -7
  139. data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +22 -8
  140. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +22 -8
  141. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +22 -8
  142. data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +22 -8
  143. data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +22 -8
  144. data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +22 -8
  145. data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +22 -8
  146. data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +22 -8
  147. data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +22 -8
  148. data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +22 -8
  149. data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +22 -8
  150. data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +23 -7
  151. data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +23 -9
  152. data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +24 -10
  153. data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +23 -9
  154. data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +23 -7
  155. data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +24 -10
  156. data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +23 -7
  157. data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +22 -8
  158. data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +23 -7
  159. data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +23 -7
  160. data/lib/elasticsearch/xpack/api/actions/security/params_registry.rb +16 -3
  161. data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +22 -8
  162. data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +22 -8
  163. data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +22 -8
  164. data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +22 -8
  165. data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +23 -7
  166. data/lib/elasticsearch/xpack/api/actions/sql/params_registry.rb +16 -3
  167. data/lib/elasticsearch/xpack/api/actions/sql/query.rb +22 -8
  168. data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +23 -7
  169. data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +23 -7
  170. data/lib/elasticsearch/xpack/api/actions/ssl/params_registry.rb +16 -3
  171. data/lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb +58 -0
  172. data/lib/elasticsearch/xpack/api/actions/transform/get_transform.rb +64 -0
  173. data/lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb +62 -0
  174. data/lib/elasticsearch/xpack/api/actions/transform/params_registry.rb +62 -0
  175. data/lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb +48 -0
  176. data/lib/elasticsearch/xpack/api/actions/transform/put_transform.rb +60 -0
  177. data/lib/elasticsearch/xpack/api/actions/transform/start_transform.rb +58 -0
  178. data/lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb +66 -0
  179. data/lib/elasticsearch/xpack/api/actions/transform/update_transform.rb +60 -0
  180. data/lib/elasticsearch/xpack/api/actions/usage.rb +22 -8
  181. data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +22 -8
  182. data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +22 -8
  183. data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +22 -8
  184. data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +23 -9
  185. data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +23 -9
  186. data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +22 -8
  187. data/lib/elasticsearch/xpack/api/actions/watcher/params_registry.rb +16 -3
  188. data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +22 -8
  189. data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +23 -7
  190. data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +23 -11
  191. data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +23 -7
  192. data/lib/elasticsearch/xpack/api/namespace/async_search.rb +35 -0
  193. data/lib/elasticsearch/xpack/api/namespace/cat.rb +34 -0
  194. data/lib/elasticsearch/xpack/api/namespace/data_frame.rb +16 -3
  195. data/lib/elasticsearch/xpack/api/namespace/graph.rb +16 -3
  196. data/lib/elasticsearch/xpack/api/namespace/index_lifecycle_management.rb +16 -3
  197. data/lib/elasticsearch/xpack/api/namespace/indices.rb +34 -0
  198. data/lib/elasticsearch/xpack/api/namespace/license.rb +16 -3
  199. data/lib/elasticsearch/xpack/api/namespace/machine_learning.rb +16 -3
  200. data/lib/elasticsearch/xpack/api/namespace/migration.rb +16 -3
  201. data/lib/elasticsearch/xpack/api/namespace/monitoring.rb +16 -3
  202. data/lib/elasticsearch/xpack/api/namespace/rollup.rb +16 -3
  203. data/lib/elasticsearch/xpack/api/namespace/searchable_snapshots.rb +34 -0
  204. data/lib/elasticsearch/xpack/api/namespace/security.rb +16 -3
  205. data/lib/elasticsearch/xpack/api/namespace/sql.rb +16 -3
  206. data/lib/elasticsearch/xpack/api/namespace/ssl.rb +16 -3
  207. data/lib/elasticsearch/xpack/api/namespace/transform.rb +35 -0
  208. data/lib/elasticsearch/xpack/api/namespace/watcher.rb +16 -3
  209. data/lib/elasticsearch/xpack/version.rb +17 -4
  210. metadata +44 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 653e57d2a5944e163c851d6c75a3a90aec991736d00162694c51ac3648fa111d
4
- data.tar.gz: 611f93654ef96df23ac1c1082cf55d3b00309a2013440463bc8b860fa3fb0e05
3
+ metadata.gz: b330252586befe364d068ba229e732a5ecbbe9f1563edb31c74875b825d0b5d4
4
+ data.tar.gz: e059c2101d7e9d778152ff89635778263f1c08717be86c03fcda8a41349772d6
5
5
  SHA512:
6
- metadata.gz: 2f39b809c8064032cab6c365a0f7f66a2056f2a8e0d577ba8d4d489754bb075aa0b9d19f1d69965568cd7b08b1969c447a07f2e048ce395062ef5c4f8426df98
7
- data.tar.gz: e39213e4f61ab63b6347c4d17722982d45008e7b5ac687f06f9554717b236d42d1953dac54eb68d3f077af34092e9103b971cf35f17be7f5907a784778d9d3ef
6
+ metadata.gz: 336e77f888c79881d18b7e6fb497d513e67e8f81fab2481738163ff3322ff30b2f80c1994df64e1fe4d147f26ddbcd0b07b2d3dc0e3d49249cf20dd3d8f5183a
7
+ data.tar.gz: 32b61999e002b83063a1197cc82a3c70c27d5c181711086c57747cabf721305b002f1d3076d9a8be5d6ffbfca3364cd117f28b1d3a6491c5ec0222c87835329e
data/Gemfile CHANGED
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  source 'https://rubygems.org'
6
19
 
@@ -9,6 +22,7 @@ gemspec
9
22
 
10
23
  group :development do
11
24
  gem 'rspec'
25
+ gem 'rspec_junit_formatter'
12
26
  if defined?(JRUBY_VERSION)
13
27
  gem 'pry-nav'
14
28
  else
data/Rakefile CHANGED
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  require 'bundler/gem_tasks'
6
19
 
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  # coding: utf-8
6
19
  lib = File.expand_path('../lib', __FILE__)
@@ -15,9 +28,14 @@ Gem::Specification.new do |spec|
15
28
 
16
29
  spec.summary = 'Ruby integrations for the X-Pack extensions for Elasticsearch'
17
30
  spec.description = 'Ruby integrations for the X-Pack extensions for Elasticsearch'
18
- spec.homepage = 'https://github.com/elastic/elasticsearch-xpack-ruby'
31
+ spec.homepage = 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.x/index.html'
19
32
  spec.license = 'Apache-2.0'
20
-
33
+ spec.metadata = {
34
+ 'homepage_uri' => 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/7.x/index.html',
35
+ 'changelog_uri' => 'https://github.com/elastic/elasticsearch-ruby/blob/7.x/CHANGELOG.md',
36
+ 'source_code_uri' => 'https://github.com/elastic/elasticsearch-ruby/tree/7.x/elasticsearch-xpack',
37
+ 'bug_tracker_uri' => 'https://github.com/elastic/elasticsearch-ruby/issues'
38
+ }
21
39
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
40
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
41
  spec.require_paths = ['lib']
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  # An example of a complex configuration for Elasticsearch Watcher alerting and notification system.
6
19
  #
@@ -1,6 +1,19 @@
1
- # Licensed to Elasticsearch B.V under one or more agreements.
2
- # Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3
- # See the LICENSE file in the project root for more information
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
4
17
 
5
18
  require "elasticsearch/api"
6
19
  require "elasticsearch/xpack/version"
@@ -79,6 +92,26 @@ module Elasticsearch
79
92
  def license
80
93
  @license ||= xpack.license
81
94
  end
95
+
96
+ def transform
97
+ @transform ||= xpack.transform
98
+ end
99
+
100
+ def async_search
101
+ @async_search ||= xpack.async_search
102
+ end
103
+
104
+ def cat
105
+ @cat ||= xpack.cat
106
+ end
107
+
108
+ def indices
109
+ @indices ||= xpack.indices
110
+ end
111
+
112
+ def searchable_snapshots
113
+ @searchable_snapshots ||= xpack.searchable_snapshots
114
+ end
82
115
  end
83
116
  end
84
117
  end if defined?(Elasticsearch::Transport::Client)
@@ -0,0 +1,50 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module Elasticsearch
19
+ module XPack
20
+ module API
21
+ module AsyncSearch
22
+ module Actions
23
+ # Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
24
+ #
25
+ # @option arguments [String] :id The async search ID
26
+ # @option arguments [Hash] :headers Custom HTTP headers
27
+ #
28
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html
29
+ #
30
+ def delete(arguments = {})
31
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
32
+
33
+ headers = arguments.delete(:headers) || {}
34
+
35
+ arguments = arguments.clone
36
+
37
+ _id = arguments.delete(:id)
38
+
39
+ method = Elasticsearch::API::HTTP_DELETE
40
+ path = "_async_search/#{Elasticsearch::API::Utils.__listify(_id)}"
41
+ params = {}
42
+
43
+ body = nil
44
+ perform_request(method, path, params, body, headers).body
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,62 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module Elasticsearch
19
+ module XPack
20
+ module API
21
+ module AsyncSearch
22
+ module Actions
23
+ # Retrieves the results of a previously submitted async search request given its ID.
24
+ #
25
+ # @option arguments [String] :id The async search ID
26
+ # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
27
+ # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available
28
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
29
+ # @option arguments [Hash] :headers Custom HTTP headers
30
+ #
31
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html
32
+ #
33
+ def get(arguments = {})
34
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
35
+
36
+ headers = arguments.delete(:headers) || {}
37
+
38
+ arguments = arguments.clone
39
+
40
+ _id = arguments.delete(:id)
41
+
42
+ method = Elasticsearch::API::HTTP_GET
43
+ path = "_async_search/#{Elasticsearch::API::Utils.__listify(_id)}"
44
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
45
+
46
+ body = nil
47
+ perform_request(method, path, params, body, headers).body
48
+ end
49
+
50
+ # Register this action with its valid params when the module is loaded.
51
+ #
52
+ # @since 6.2.0
53
+ ParamsRegistry.register(:get, [
54
+ :wait_for_completion_timeout,
55
+ :keep_alive,
56
+ :typed_keys
57
+ ].freeze)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,62 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module Elasticsearch
19
+ module XPack
20
+ module API
21
+ module AsyncSearch
22
+ module Actions
23
+ module ParamsRegistry
24
+ extend self
25
+
26
+ # A Mapping of all the actions to their list of valid params.
27
+ #
28
+ # @since 7.4.0
29
+ PARAMS = {}
30
+
31
+ # Register an action with its list of valid params.
32
+ #
33
+ # @example Register the action.
34
+ # ParamsRegistry.register(:benchmark, [ :verbose ])
35
+ #
36
+ # @param [ Symbol ] action The action to register.
37
+ # @param [ Array[Symbol] ] valid_params The list of valid params.
38
+ #
39
+ # @since 7.4.0
40
+ def register(action, valid_params)
41
+ PARAMS[action.to_sym] = valid_params
42
+ end
43
+
44
+ # Get the list of valid params for a given action.
45
+ #
46
+ # @example Get the list of valid params.
47
+ # ParamsRegistry.get(:benchmark)
48
+ #
49
+ # @param [ Symbol ] action The action.
50
+ #
51
+ # @return [ Array<Symbol> ] The list of valid params for the action.
52
+ #
53
+ # @since 7.4.0
54
+ def get(action)
55
+ PARAMS.fetch(action, [])
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,145 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ module Elasticsearch
19
+ module XPack
20
+ module API
21
+ module AsyncSearch
22
+ module Actions
23
+ # Executes a search request asynchronously.
24
+ #
25
+ # @option arguments [List] :index A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
26
+ # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
27
+ # @option arguments [Boolean] :keep_on_completion Control whether the response should be stored in the cluster if it completed within the provided [wait_for_completion] time (default: false)
28
+ # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available
29
+ # @option arguments [Number] :batched_reduce_size The number of shard results that should be reduced at once on the coordinating node. This value should be used as the granularity at which progress results will be made available.
30
+ # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true
31
+ # @option arguments [String] :analyzer The analyzer to use for the query string
32
+ # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
33
+ # @option arguments [String] :default_operator The default operator for query string query (AND or OR)
34
+ # (options: AND,OR)
35
+ # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
36
+ # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
37
+ # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit
38
+ # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit
39
+ # @option arguments [Number] :from Starting offset (default: 0)
40
+ # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
41
+ # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
42
+ # @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)
43
+ # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
44
+ # (options: open,closed,hidden,none,all)
45
+ # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
46
+ # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
47
+ # @option arguments [String] :q Query in the Lucene query string syntax
48
+ # @option arguments [List] :routing A comma-separated list of specific routing values
49
+ # @option arguments [String] :search_type Search operation type
50
+ # (options: query_then_fetch,dfs_query_then_fetch)
51
+ # @option arguments [Number] :size Number of hits to return (default: 10)
52
+ # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
53
+ # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
54
+ # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
55
+ # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
56
+ # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
57
+ # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
58
+ # @option arguments [String] :suggest_field Specify which field to use for suggestions
59
+ # @option arguments [String] :suggest_mode Specify suggest mode
60
+ # (options: missing,popular,always)
61
+ # @option arguments [Number] :suggest_size How many suggestions to return in response
62
+ # @option arguments [String] :suggest_text The source text for which the suggestions should be returned
63
+ # @option arguments [Time] :timeout Explicit operation timeout
64
+ # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
65
+ # @option arguments [Boolean] :track_total_hits Indicate if the number of documents that match the query should be tracked
66
+ # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
67
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
68
+ # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
69
+ # @option arguments [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit
70
+ # @option arguments [Number] :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
71
+ # @option arguments [Hash] :headers Custom HTTP headers
72
+ # @option arguments [Hash] :body The search definition using the Query DSL
73
+ #
74
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html
75
+ #
76
+ def submit(arguments = {})
77
+ headers = arguments.delete(:headers) || {}
78
+
79
+ arguments = arguments.clone
80
+
81
+ _index = arguments.delete(:index)
82
+
83
+ method = Elasticsearch::API::HTTP_POST
84
+ path = if _index
85
+ "#{Elasticsearch::API::Utils.__listify(_index)}/_async_search"
86
+ else
87
+ "_async_search"
88
+ end
89
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
90
+
91
+ body = arguments[:body]
92
+ perform_request(method, path, params, body, headers).body
93
+ end
94
+
95
+ # Register this action with its valid params when the module is loaded.
96
+ #
97
+ # @since 6.2.0
98
+ ParamsRegistry.register(:submit, [
99
+ :wait_for_completion_timeout,
100
+ :keep_on_completion,
101
+ :keep_alive,
102
+ :batched_reduce_size,
103
+ :request_cache,
104
+ :analyzer,
105
+ :analyze_wildcard,
106
+ :default_operator,
107
+ :df,
108
+ :explain,
109
+ :stored_fields,
110
+ :docvalue_fields,
111
+ :from,
112
+ :ignore_unavailable,
113
+ :ignore_throttled,
114
+ :allow_no_indices,
115
+ :expand_wildcards,
116
+ :lenient,
117
+ :preference,
118
+ :q,
119
+ :routing,
120
+ :search_type,
121
+ :size,
122
+ :sort,
123
+ :_source,
124
+ :_source_excludes,
125
+ :_source_includes,
126
+ :terminate_after,
127
+ :stats,
128
+ :suggest_field,
129
+ :suggest_mode,
130
+ :suggest_size,
131
+ :suggest_text,
132
+ :timeout,
133
+ :track_scores,
134
+ :track_total_hits,
135
+ :allow_partial_search_results,
136
+ :typed_keys,
137
+ :version,
138
+ :seq_no_primary_term,
139
+ :max_concurrent_shard_requests
140
+ ].freeze)
141
+ end
142
+ end
143
+ end
144
+ end
145
+ end