elasticsearch-xpack 7.6.0.pre → 7.8.0

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 +149 -0
  11. data/lib/elasticsearch/xpack/api/actions/cat/ml_data_frame_analytics.rb +78 -0
  12. data/lib/elasticsearch/xpack/api/actions/cat/ml_datafeeds.rb +74 -0
  13. data/lib/elasticsearch/xpack/api/actions/cat/ml_jobs.rb +78 -0
  14. data/lib/elasticsearch/xpack/api/actions/cat/ml_trained_models.rb +82 -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 +78 -0
  18. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb +22 -8
  19. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +23 -9
  20. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +22 -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 +23 -7
  23. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/put_transform.rb +22 -8
  24. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/start_transform.rb +22 -8
  25. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +22 -8
  26. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/update_transform.rb +22 -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 +70 -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 +64 -0
  48. data/lib/elasticsearch/xpack/api/actions/indices/unfreeze.rb +70 -0
  49. data/lib/elasticsearch/xpack/api/actions/info.rb +22 -8
  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 +25 -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 +22 -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 +23 -7
  73. data/lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb +23 -9
  74. data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +22 -8
  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 +23 -9
  82. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +23 -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 +26 -10
  93. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb +23 -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 +22 -8
  103. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +38 -8
  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 +22 -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 +22 -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 +22 -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 -8
  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 +23 -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 +22 -8
  125. data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +23 -9
  126. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +23 -9
  127. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +22 -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 +22 -8
  130. data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +22 -8
  131. data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +22 -8
  132. data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +22 -8
  133. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/clear_cache.rb +68 -0
  134. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/mount.rb +66 -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 +50 -0
  137. data/lib/elasticsearch/xpack/api/actions/searchable_snapshots/stats.rb +52 -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 -7
  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 -7
  143. data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +22 -7
  144. data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +22 -7
  145. data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +22 -7
  146. data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +22 -7
  147. data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +22 -7
  148. data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +22 -7
  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 -7
  162. data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +22 -7
  163. data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +22 -7
  164. data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +22 -7
  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 -9
  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 +45 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 43c522c8e39b38035f0a343ecc8a90fb98dee9922962342d285abecca41a5e19
4
- data.tar.gz: 609ae664f414df98e14cc3adbb6ee809e901fce3954a8ce3016352951b287680
3
+ metadata.gz: 97185d59f88aff4dfcdfbda7d1c6f128557bef55ad0f6cb1a5c0bef8c25a98d6
4
+ data.tar.gz: 293663611871cad18f5a0eb9feb68e554d761c571795407537ff58a61ce7e255
5
5
  SHA512:
6
- metadata.gz: 35ae1f61e60ab23bb229c582884de3d580f3f159c3848bc1d74bbb1ff6cec0fae626e7c16dfe34d0d0d1ec9c6bc24b37b584041f959e6f3ea00a28ab0c713d6c
7
- data.tar.gz: e5744a801a1fcfa277f35a3b4718be3951ee4258ca4e48342069ff4f1d9c74769eb1d43f04d8828635d56122c2ef399d3c0eeee790dbe0259e7758f7e737dfa4
6
+ metadata.gz: d47de0ba3e4044d6936c0b2c915e525279a5905f8e1d8c2f62490587da887bf3f0ae8b857988b3a26b00f9d394579749d724bc1ae6694414dae9115d02bf8d90
7
+ data.tar.gz: 3ffe1a66e08d3cb964dcb16c73ccf6394e1c420af6326b517ca1fd71bce056d438f578806e18ea3f22cf0df29ca9332b2e4471e57b015b060f7d62544dd917bb
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,149 @@
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
+
36
+ # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
37
+ # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
38
+ # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit
39
+ # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit
40
+ # @option arguments [Number] :from Starting offset (default: 0)
41
+ # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
42
+ # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
43
+ # @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)
44
+ # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
45
+ # (options: open,closed,hidden,none,all)
46
+
47
+ # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
48
+ # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
49
+ # @option arguments [String] :q Query in the Lucene query string syntax
50
+ # @option arguments [List] :routing A comma-separated list of specific routing values
51
+ # @option arguments [String] :search_type Search operation type
52
+ # (options: query_then_fetch,dfs_query_then_fetch)
53
+
54
+ # @option arguments [Number] :size Number of hits to return (default: 10)
55
+ # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
56
+ # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
57
+ # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
58
+ # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
59
+ # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
60
+ # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
61
+ # @option arguments [String] :suggest_field Specify which field to use for suggestions
62
+ # @option arguments [String] :suggest_mode Specify suggest mode
63
+ # (options: missing,popular,always)
64
+
65
+ # @option arguments [Number] :suggest_size How many suggestions to return in response
66
+ # @option arguments [String] :suggest_text The source text for which the suggestions should be returned
67
+ # @option arguments [Time] :timeout Explicit operation timeout
68
+ # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
69
+ # @option arguments [Boolean] :track_total_hits Indicate if the number of documents that match the query should be tracked
70
+ # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
71
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
72
+ # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
73
+ # @option arguments [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit
74
+ # @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
75
+ # @option arguments [Hash] :headers Custom HTTP headers
76
+ # @option arguments [Hash] :body The search definition using the Query DSL
77
+ #
78
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.8/async-search.html
79
+ #
80
+ def submit(arguments = {})
81
+ headers = arguments.delete(:headers) || {}
82
+
83
+ arguments = arguments.clone
84
+
85
+ _index = arguments.delete(:index)
86
+
87
+ method = Elasticsearch::API::HTTP_POST
88
+ path = if _index
89
+ "#{Elasticsearch::API::Utils.__listify(_index)}/_async_search"
90
+ else
91
+ "_async_search"
92
+ end
93
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
94
+
95
+ body = arguments[:body]
96
+ perform_request(method, path, params, body, headers).body
97
+ end
98
+
99
+ # Register this action with its valid params when the module is loaded.
100
+ #
101
+ # @since 6.2.0
102
+ ParamsRegistry.register(:submit, [
103
+ :wait_for_completion_timeout,
104
+ :keep_on_completion,
105
+ :keep_alive,
106
+ :batched_reduce_size,
107
+ :request_cache,
108
+ :analyzer,
109
+ :analyze_wildcard,
110
+ :default_operator,
111
+ :df,
112
+ :explain,
113
+ :stored_fields,
114
+ :docvalue_fields,
115
+ :from,
116
+ :ignore_unavailable,
117
+ :ignore_throttled,
118
+ :allow_no_indices,
119
+ :expand_wildcards,
120
+ :lenient,
121
+ :preference,
122
+ :q,
123
+ :routing,
124
+ :search_type,
125
+ :size,
126
+ :sort,
127
+ :_source,
128
+ :_source_excludes,
129
+ :_source_includes,
130
+ :terminate_after,
131
+ :stats,
132
+ :suggest_field,
133
+ :suggest_mode,
134
+ :suggest_size,
135
+ :suggest_text,
136
+ :timeout,
137
+ :track_scores,
138
+ :track_total_hits,
139
+ :allow_partial_search_results,
140
+ :typed_keys,
141
+ :version,
142
+ :seq_no_primary_term,
143
+ :max_concurrent_shard_requests
144
+ ].freeze)
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end