elasticsearch-xpack 7.6.0 → 7.7.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/xpack.rb +12 -0
  3. data/lib/elasticsearch/xpack/api/actions/async_search/delete.rb +37 -0
  4. data/lib/elasticsearch/xpack/api/actions/async_search/get.rb +49 -0
  5. data/lib/elasticsearch/xpack/api/actions/async_search/params_registry.rb +49 -0
  6. data/lib/elasticsearch/xpack/api/actions/async_search/submit.rb +136 -0
  7. data/lib/elasticsearch/xpack/api/actions/cat/ml_data_frame_analytics.rb +65 -0
  8. data/lib/elasticsearch/xpack/api/actions/cat/ml_datafeeds.rb +61 -0
  9. data/lib/elasticsearch/xpack/api/actions/cat/ml_jobs.rb +65 -0
  10. data/lib/elasticsearch/xpack/api/actions/cat/ml_trained_models.rb +69 -0
  11. data/lib/elasticsearch/xpack/api/actions/cat/params_registry.rb +49 -0
  12. data/lib/elasticsearch/xpack/api/actions/cat/transform.rb +64 -0
  13. data/lib/elasticsearch/xpack/api/actions/cat/transforms.rb +65 -0
  14. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/delete_transform.rb +5 -4
  15. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform.rb +6 -5
  16. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/get_transform_stats.rb +5 -4
  17. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/preview_transform.rb +6 -3
  18. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/put_transform.rb +5 -4
  19. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/start_transform.rb +5 -4
  20. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/stop_transform.rb +5 -4
  21. data/lib/elasticsearch/xpack/api/actions/data_frame_transform_deprecated/update_transform.rb +5 -4
  22. data/lib/elasticsearch/xpack/api/actions/graph/explore.rb +5 -4
  23. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/delete_lifecycle.rb +5 -4
  24. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/explain_lifecycle.rb +5 -4
  25. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_lifecycle.rb +6 -5
  26. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/get_status.rb +6 -3
  27. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/move_to_step.rb +5 -4
  28. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/put_lifecycle.rb +5 -4
  29. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/remove_policy.rb +5 -4
  30. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/retry.rb +5 -4
  31. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/start.rb +6 -3
  32. data/lib/elasticsearch/xpack/api/actions/index_lifecycle_management/stop.rb +6 -3
  33. data/lib/elasticsearch/xpack/api/actions/info.rb +5 -4
  34. data/lib/elasticsearch/xpack/api/actions/license/delete.rb +6 -3
  35. data/lib/elasticsearch/xpack/api/actions/license/get.rb +5 -4
  36. data/lib/elasticsearch/xpack/api/actions/license/get_basic_status.rb +6 -3
  37. data/lib/elasticsearch/xpack/api/actions/license/get_trial_status.rb +6 -3
  38. data/lib/elasticsearch/xpack/api/actions/license/post.rb +5 -4
  39. data/lib/elasticsearch/xpack/api/actions/license/post_start_basic.rb +5 -4
  40. data/lib/elasticsearch/xpack/api/actions/license/post_start_trial.rb +5 -4
  41. data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +6 -5
  42. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar.rb +6 -5
  43. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_event.rb +6 -5
  44. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_calendar_job.rb +6 -5
  45. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_data_frame_analytics.rb +6 -5
  46. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +6 -5
  47. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +7 -4
  48. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +6 -5
  49. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_forecast.rb +6 -5
  50. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +6 -5
  51. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +6 -5
  52. data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_trained_model.rb +5 -4
  53. data/lib/elasticsearch/xpack/api/actions/machine_learning/estimate_model_memory.rb +35 -0
  54. data/lib/elasticsearch/xpack/api/actions/machine_learning/evaluate_data_frame.rb +7 -4
  55. data/lib/elasticsearch/xpack/api/actions/machine_learning/explain_data_frame_analytics.rb +6 -5
  56. data/lib/elasticsearch/xpack/api/actions/machine_learning/find_file_structure.rb +6 -5
  57. data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +6 -5
  58. data/lib/elasticsearch/xpack/api/actions/machine_learning/forecast.rb +6 -5
  59. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +6 -5
  60. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendar_events.rb +6 -5
  61. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_calendars.rb +7 -6
  62. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +6 -5
  63. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics.rb +7 -6
  64. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_data_frame_analytics_stats.rb +7 -6
  65. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +7 -6
  66. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +7 -6
  67. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +7 -6
  68. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +7 -6
  69. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +7 -6
  70. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +7 -6
  71. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +6 -5
  72. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb +6 -5
  73. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +8 -7
  74. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models.rb +9 -6
  75. data/lib/elasticsearch/xpack/api/actions/machine_learning/get_trained_models_stats.rb +6 -5
  76. data/lib/elasticsearch/xpack/api/actions/machine_learning/info.rb +7 -4
  77. data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +6 -5
  78. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_calendar_events.rb +6 -5
  79. data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +6 -5
  80. data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +6 -5
  81. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar.rb +6 -5
  82. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_calendar_job.rb +6 -5
  83. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_data_frame_analytics.rb +6 -5
  84. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +22 -5
  85. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +6 -5
  86. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +6 -5
  87. data/lib/elasticsearch/xpack/api/actions/machine_learning/put_trained_model.rb +6 -5
  88. data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +6 -5
  89. data/lib/elasticsearch/xpack/api/actions/machine_learning/set_upgrade_mode.rb +6 -5
  90. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_data_frame_analytics.rb +6 -5
  91. data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +6 -5
  92. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_data_frame_analytics.rb +6 -5
  93. data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +6 -5
  94. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +22 -5
  95. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_filter.rb +6 -5
  96. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +6 -5
  97. data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +6 -5
  98. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +6 -3
  99. data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +6 -3
  100. data/lib/elasticsearch/xpack/api/actions/migration/deprecations.rb +7 -6
  101. data/lib/elasticsearch/xpack/api/actions/monitoring/bulk.rb +6 -4
  102. data/lib/elasticsearch/xpack/api/actions/rollup/delete_job.rb +6 -5
  103. data/lib/elasticsearch/xpack/api/actions/rollup/get_jobs.rb +7 -6
  104. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_caps.rb +7 -6
  105. data/lib/elasticsearch/xpack/api/actions/rollup/get_rollup_index_caps.rb +6 -5
  106. data/lib/elasticsearch/xpack/api/actions/rollup/put_job.rb +6 -5
  107. data/lib/elasticsearch/xpack/api/actions/rollup/rollup_search.rb +6 -5
  108. data/lib/elasticsearch/xpack/api/actions/rollup/start_job.rb +6 -5
  109. data/lib/elasticsearch/xpack/api/actions/rollup/stop_job.rb +6 -5
  110. data/lib/elasticsearch/xpack/api/actions/security/authenticate.rb +6 -3
  111. data/lib/elasticsearch/xpack/api/actions/security/change_password.rb +5 -3
  112. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_realms.rb +5 -4
  113. data/lib/elasticsearch/xpack/api/actions/security/clear_cached_roles.rb +5 -4
  114. data/lib/elasticsearch/xpack/api/actions/security/create_api_key.rb +5 -3
  115. data/lib/elasticsearch/xpack/api/actions/security/delete_privileges.rb +6 -4
  116. data/lib/elasticsearch/xpack/api/actions/security/delete_role.rb +5 -3
  117. data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +5 -3
  118. data/lib/elasticsearch/xpack/api/actions/security/delete_user.rb +5 -3
  119. data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +5 -3
  120. data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +5 -3
  121. data/lib/elasticsearch/xpack/api/actions/security/get_api_key.rb +5 -4
  122. data/lib/elasticsearch/xpack/api/actions/security/get_builtin_privileges.rb +6 -3
  123. data/lib/elasticsearch/xpack/api/actions/security/get_privileges.rb +6 -5
  124. data/lib/elasticsearch/xpack/api/actions/security/get_role.rb +7 -6
  125. data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +6 -5
  126. data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +6 -3
  127. data/lib/elasticsearch/xpack/api/actions/security/get_user.rb +7 -6
  128. data/lib/elasticsearch/xpack/api/actions/security/get_user_privileges.rb +6 -3
  129. data/lib/elasticsearch/xpack/api/actions/security/has_privileges.rb +5 -4
  130. data/lib/elasticsearch/xpack/api/actions/security/invalidate_api_key.rb +6 -3
  131. data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +6 -3
  132. data/lib/elasticsearch/xpack/api/actions/security/put_privileges.rb +6 -4
  133. data/lib/elasticsearch/xpack/api/actions/security/put_role.rb +5 -3
  134. data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +5 -3
  135. data/lib/elasticsearch/xpack/api/actions/security/put_user.rb +5 -3
  136. data/lib/elasticsearch/xpack/api/actions/sql/clear_cursor.rb +7 -4
  137. data/lib/elasticsearch/xpack/api/actions/sql/query.rb +6 -5
  138. data/lib/elasticsearch/xpack/api/actions/sql/translate.rb +7 -4
  139. data/lib/elasticsearch/xpack/api/actions/ssl/certificates.rb +6 -3
  140. data/lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb +45 -0
  141. data/lib/elasticsearch/xpack/api/actions/transform/get_transform.rb +51 -0
  142. data/lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb +49 -0
  143. data/lib/elasticsearch/xpack/api/actions/transform/params_registry.rb +49 -0
  144. data/lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb +35 -0
  145. data/lib/elasticsearch/xpack/api/actions/transform/put_transform.rb +47 -0
  146. data/lib/elasticsearch/xpack/api/actions/transform/start_transform.rb +45 -0
  147. data/lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb +53 -0
  148. data/lib/elasticsearch/xpack/api/actions/transform/update_transform.rb +47 -0
  149. data/lib/elasticsearch/xpack/api/actions/usage.rb +5 -4
  150. data/lib/elasticsearch/xpack/api/actions/watcher/ack_watch.rb +6 -5
  151. data/lib/elasticsearch/xpack/api/actions/watcher/activate_watch.rb +5 -4
  152. data/lib/elasticsearch/xpack/api/actions/watcher/deactivate_watch.rb +5 -4
  153. data/lib/elasticsearch/xpack/api/actions/watcher/delete_watch.rb +7 -6
  154. data/lib/elasticsearch/xpack/api/actions/watcher/execute_watch.rb +7 -6
  155. data/lib/elasticsearch/xpack/api/actions/watcher/get_watch.rb +6 -5
  156. data/lib/elasticsearch/xpack/api/actions/watcher/put_watch.rb +6 -5
  157. data/lib/elasticsearch/xpack/api/actions/watcher/start.rb +7 -4
  158. data/lib/elasticsearch/xpack/api/actions/watcher/stats.rb +7 -6
  159. data/lib/elasticsearch/xpack/api/actions/watcher/stop.rb +7 -4
  160. data/lib/elasticsearch/xpack/api/namespace/async_search.rb +22 -0
  161. data/lib/elasticsearch/xpack/api/namespace/cat.rb +21 -0
  162. data/lib/elasticsearch/xpack/api/namespace/transform.rb +22 -0
  163. data/lib/elasticsearch/xpack/version.rb +1 -1
  164. metadata +28 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 653e57d2a5944e163c851d6c75a3a90aec991736d00162694c51ac3648fa111d
4
- data.tar.gz: 611f93654ef96df23ac1c1082cf55d3b00309a2013440463bc8b860fa3fb0e05
3
+ metadata.gz: 64af22e77d8382f4f315846d2335f79fa5023bd7d7f9875b9e8b0308a5abcd68
4
+ data.tar.gz: 4721077d6a7e4fc303a56bd812e044a1b1921854931714d874a4034b85c86e0d
5
5
  SHA512:
6
- metadata.gz: 2f39b809c8064032cab6c365a0f7f66a2056f2a8e0d577ba8d4d489754bb075aa0b9d19f1d69965568cd7b08b1969c447a07f2e048ce395062ef5c4f8426df98
7
- data.tar.gz: e39213e4f61ab63b6347c4d17722982d45008e7b5ac687f06f9554717b236d42d1953dac54eb68d3f077af34092e9103b971cf35f17be7f5907a784778d9d3ef
6
+ metadata.gz: 31653728435c6fd7b6019abf9e0716749109f59e6a4ca080e5b9f02bcdf1f0122289aab7f4decb6b5b8d882d118dddadbcaabc99ab1eccbb75199096d85e9c78
7
+ data.tar.gz: 7c80f97ece98397326dcff1a3684c14cf589f2471c8130b4079fe3c1b51d066f2b88e8d584a36f9a00ae9787891a754bdc1e5d5bf088bf42a3af03679128a18f
@@ -79,6 +79,18 @@ module Elasticsearch
79
79
  def license
80
80
  @license ||= xpack.license
81
81
  end
82
+
83
+ def transform
84
+ @transform ||= xpack.transform
85
+ end
86
+
87
+ def async_search
88
+ @async_search ||= xpack.async_search
89
+ end
90
+
91
+ def cat
92
+ @cat ||= xpack.cat
93
+ end
82
94
  end
83
95
  end
84
96
  end if defined?(Elasticsearch::Transport::Client)
@@ -0,0 +1,37 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module AsyncSearch
9
+ module Actions
10
+ # 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.
11
+ #
12
+ # @option arguments [String] :id The async search ID
13
+ # @option arguments [Hash] :headers Custom HTTP headers
14
+ #
15
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
16
+ #
17
+ def delete(arguments = {})
18
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
19
+
20
+ headers = arguments.delete(:headers) || {}
21
+
22
+ arguments = arguments.clone
23
+
24
+ _id = arguments.delete(:id)
25
+
26
+ method = Elasticsearch::API::HTTP_DELETE
27
+ path = "_async_search/#{Elasticsearch::API::Utils.__listify(_id)}"
28
+ params = {}
29
+
30
+ body = nil
31
+ perform_request(method, path, params, body, headers).body
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,49 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module AsyncSearch
9
+ module Actions
10
+ # Retrieves the results of a previously submitted async search request given its ID.
11
+ #
12
+ # @option arguments [String] :id The async search ID
13
+ # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
14
+ # @option arguments [Time] :keep_alive Specify the time interval in which the results (partial or final) for this search will be available
15
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
16
+ # @option arguments [Hash] :headers Custom HTTP headers
17
+ #
18
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
19
+ #
20
+ def get(arguments = {})
21
+ raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
22
+
23
+ headers = arguments.delete(:headers) || {}
24
+
25
+ arguments = arguments.clone
26
+
27
+ _id = arguments.delete(:id)
28
+
29
+ method = Elasticsearch::API::HTTP_GET
30
+ path = "_async_search/#{Elasticsearch::API::Utils.__listify(_id)}"
31
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
32
+
33
+ body = nil
34
+ perform_request(method, path, params, body, headers).body
35
+ end
36
+
37
+ # Register this action with its valid params when the module is loaded.
38
+ #
39
+ # @since 6.2.0
40
+ ParamsRegistry.register(:get, [
41
+ :wait_for_completion_timeout,
42
+ :keep_alive,
43
+ :typed_keys
44
+ ].freeze)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,49 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module AsyncSearch
9
+ module Actions
10
+ module ParamsRegistry
11
+ extend self
12
+
13
+ # A Mapping of all the actions to their list of valid params.
14
+ #
15
+ # @since 7.4.0
16
+ PARAMS = {}
17
+
18
+ # Register an action with its list of valid params.
19
+ #
20
+ # @example Register the action.
21
+ # ParamsRegistry.register(:benchmark, [ :verbose ])
22
+ #
23
+ # @param [ Symbol ] action The action to register.
24
+ # @param [ Array[Symbol] ] valid_params The list of valid params.
25
+ #
26
+ # @since 7.4.0
27
+ def register(action, valid_params)
28
+ PARAMS[action.to_sym] = valid_params
29
+ end
30
+
31
+ # Get the list of valid params for a given action.
32
+ #
33
+ # @example Get the list of valid params.
34
+ # ParamsRegistry.get(:benchmark)
35
+ #
36
+ # @param [ Symbol ] action The action.
37
+ #
38
+ # @return [ Array<Symbol> ] The list of valid params for the action.
39
+ #
40
+ # @since 7.4.0
41
+ def get(action)
42
+ PARAMS.fetch(action, [])
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,136 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module AsyncSearch
9
+ module Actions
10
+ # Executes a search request asynchronously.
11
+ #
12
+ # @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
13
+ # @option arguments [Time] :wait_for_completion_timeout Specify the time that the request should block waiting for the final response
14
+ # @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)
15
+ # @option arguments [Time] :keep_alive Update the time interval in which the results (partial or final) for this search will be available
16
+ # @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.
17
+ # @option arguments [Boolean] :request_cache Specify if request cache should be used for this request or not, defaults to true
18
+ # @option arguments [String] :analyzer The analyzer to use for the query string
19
+ # @option arguments [Boolean] :analyze_wildcard Specify whether wildcard and prefix queries should be analyzed (default: false)
20
+ # @option arguments [String] :default_operator The default operator for query string query (AND or OR)
21
+ # (options: AND,OR)
22
+
23
+ # @option arguments [String] :df The field to use as default where no field prefix is given in the query string
24
+ # @option arguments [Boolean] :explain Specify whether to return detailed information about score computation as part of a hit
25
+ # @option arguments [List] :stored_fields A comma-separated list of stored fields to return as part of a hit
26
+ # @option arguments [List] :docvalue_fields A comma-separated list of fields to return as the docvalue representation of a field for each hit
27
+ # @option arguments [Number] :from Starting offset (default: 0)
28
+ # @option arguments [Boolean] :ignore_unavailable Whether specified concrete indices should be ignored when unavailable (missing or closed)
29
+ # @option arguments [Boolean] :ignore_throttled Whether specified concrete, expanded or aliased indices should be ignored when throttled
30
+ # @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)
31
+ # @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.
32
+ # (options: open,closed,hidden,none,all)
33
+
34
+ # @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
35
+ # @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
36
+ # @option arguments [String] :q Query in the Lucene query string syntax
37
+ # @option arguments [List] :routing A comma-separated list of specific routing values
38
+ # @option arguments [String] :search_type Search operation type
39
+ # (options: query_then_fetch,dfs_query_then_fetch)
40
+
41
+ # @option arguments [Number] :size Number of hits to return (default: 10)
42
+ # @option arguments [List] :sort A comma-separated list of <field>:<direction> pairs
43
+ # @option arguments [List] :_source True or false to return the _source field or not, or a list of fields to return
44
+ # @option arguments [List] :_source_excludes A list of fields to exclude from the returned _source field
45
+ # @option arguments [List] :_source_includes A list of fields to extract and return from the _source field
46
+ # @option arguments [Number] :terminate_after The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
47
+ # @option arguments [List] :stats Specific 'tag' of the request for logging and statistical purposes
48
+ # @option arguments [String] :suggest_field Specify which field to use for suggestions
49
+ # @option arguments [String] :suggest_mode Specify suggest mode
50
+ # (options: missing,popular,always)
51
+
52
+ # @option arguments [Number] :suggest_size How many suggestions to return in response
53
+ # @option arguments [String] :suggest_text The source text for which the suggestions should be returned
54
+ # @option arguments [Time] :timeout Explicit operation timeout
55
+ # @option arguments [Boolean] :track_scores Whether to calculate and return scores even if they are not used for sorting
56
+ # @option arguments [Boolean] :track_total_hits Indicate if the number of documents that match the query should be tracked
57
+ # @option arguments [Boolean] :allow_partial_search_results Indicate if an error should be returned if there is a partial search failure or timeout
58
+ # @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
59
+ # @option arguments [Boolean] :version Specify whether to return document version as part of a hit
60
+ # @option arguments [Boolean] :seq_no_primary_term Specify whether to return sequence number and primary term of the last modification of each hit
61
+ # @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
62
+ # @option arguments [Hash] :headers Custom HTTP headers
63
+ # @option arguments [Hash] :body The search definition using the Query DSL
64
+ #
65
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html
66
+ #
67
+ def submit(arguments = {})
68
+ headers = arguments.delete(:headers) || {}
69
+
70
+ arguments = arguments.clone
71
+
72
+ _index = arguments.delete(:index)
73
+
74
+ method = Elasticsearch::API::HTTP_POST
75
+ path = if _index
76
+ "#{Elasticsearch::API::Utils.__listify(_index)}/_async_search"
77
+ else
78
+ "_async_search"
79
+ end
80
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
81
+
82
+ body = arguments[:body]
83
+ perform_request(method, path, params, body, headers).body
84
+ end
85
+
86
+ # Register this action with its valid params when the module is loaded.
87
+ #
88
+ # @since 6.2.0
89
+ ParamsRegistry.register(:submit, [
90
+ :wait_for_completion_timeout,
91
+ :keep_on_completion,
92
+ :keep_alive,
93
+ :batched_reduce_size,
94
+ :request_cache,
95
+ :analyzer,
96
+ :analyze_wildcard,
97
+ :default_operator,
98
+ :df,
99
+ :explain,
100
+ :stored_fields,
101
+ :docvalue_fields,
102
+ :from,
103
+ :ignore_unavailable,
104
+ :ignore_throttled,
105
+ :allow_no_indices,
106
+ :expand_wildcards,
107
+ :lenient,
108
+ :preference,
109
+ :q,
110
+ :routing,
111
+ :search_type,
112
+ :size,
113
+ :sort,
114
+ :_source,
115
+ :_source_excludes,
116
+ :_source_includes,
117
+ :terminate_after,
118
+ :stats,
119
+ :suggest_field,
120
+ :suggest_mode,
121
+ :suggest_size,
122
+ :suggest_text,
123
+ :timeout,
124
+ :track_scores,
125
+ :track_total_hits,
126
+ :allow_partial_search_results,
127
+ :typed_keys,
128
+ :version,
129
+ :seq_no_primary_term,
130
+ :max_concurrent_shard_requests
131
+ ].freeze)
132
+ end
133
+ end
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,65 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module Cat
9
+ module Actions
10
+ # Gets configuration and usage information about data frame analytics jobs.
11
+ #
12
+ # @option arguments [String] :id The ID of the data frame analytics to fetch
13
+ # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified)
14
+ # @option arguments [String] :bytes The unit in which to display byte values
15
+ # (options: b,k,kb,m,mb,g,gb,t,tb,p,pb)
16
+
17
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
18
+ # @option arguments [List] :h Comma-separated list of column names to display
19
+ # @option arguments [Boolean] :help Return help information
20
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
21
+ # @option arguments [String] :time The unit in which to display time values
22
+ # (options: d,h,m,s,ms,micros,nanos)
23
+
24
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
25
+ # @option arguments [Hash] :headers Custom HTTP headers
26
+ #
27
+ # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-dfanalytics.html
28
+ #
29
+ def ml_data_frame_analytics(arguments = {})
30
+ headers = arguments.delete(:headers) || {}
31
+
32
+ arguments = arguments.clone
33
+
34
+ _id = arguments.delete(:id)
35
+
36
+ method = Elasticsearch::API::HTTP_GET
37
+ path = if _id
38
+ "_cat/ml/data_frame/analytics/#{Elasticsearch::API::Utils.__listify(_id)}"
39
+ else
40
+ "_cat/ml/data_frame/analytics"
41
+ end
42
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
43
+
44
+ body = nil
45
+ perform_request(method, path, params, body, headers).body
46
+ end
47
+
48
+ # Register this action with its valid params when the module is loaded.
49
+ #
50
+ # @since 6.2.0
51
+ ParamsRegistry.register(:ml_data_frame_analytics, [
52
+ :allow_no_match,
53
+ :bytes,
54
+ :format,
55
+ :h,
56
+ :help,
57
+ :s,
58
+ :time,
59
+ :v
60
+ ].freeze)
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,61 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module Cat
9
+ module Actions
10
+ # Gets configuration and usage information about datafeeds.
11
+ #
12
+ # @option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch
13
+ # @option arguments [Boolean] :allow_no_datafeeds Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)
14
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
15
+ # @option arguments [List] :h Comma-separated list of column names to display
16
+ # @option arguments [Boolean] :help Return help information
17
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
18
+ # @option arguments [String] :time The unit in which to display time values
19
+ # (options: d,h,m,s,ms,micros,nanos)
20
+
21
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
22
+ # @option arguments [Hash] :headers Custom HTTP headers
23
+ #
24
+ # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-datafeeds.html
25
+ #
26
+ def ml_datafeeds(arguments = {})
27
+ headers = arguments.delete(:headers) || {}
28
+
29
+ arguments = arguments.clone
30
+
31
+ _datafeed_id = arguments.delete(:datafeed_id)
32
+
33
+ method = Elasticsearch::API::HTTP_GET
34
+ path = if _datafeed_id
35
+ "_cat/ml/datafeeds/#{Elasticsearch::API::Utils.__listify(_datafeed_id)}"
36
+ else
37
+ "_cat/ml/datafeeds"
38
+ end
39
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
40
+
41
+ body = nil
42
+ perform_request(method, path, params, body, headers).body
43
+ end
44
+
45
+ # Register this action with its valid params when the module is loaded.
46
+ #
47
+ # @since 6.2.0
48
+ ParamsRegistry.register(:ml_datafeeds, [
49
+ :allow_no_datafeeds,
50
+ :format,
51
+ :h,
52
+ :help,
53
+ :s,
54
+ :time,
55
+ :v
56
+ ].freeze)
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,65 @@
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
4
+
5
+ module Elasticsearch
6
+ module XPack
7
+ module API
8
+ module Cat
9
+ module Actions
10
+ # Gets configuration and usage information about anomaly detection jobs.
11
+ #
12
+ # @option arguments [String] :job_id The ID of the jobs stats to fetch
13
+ # @option arguments [Boolean] :allow_no_jobs Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)
14
+ # @option arguments [String] :bytes The unit in which to display byte values
15
+ # (options: b,k,kb,m,mb,g,gb,t,tb,p,pb)
16
+
17
+ # @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
18
+ # @option arguments [List] :h Comma-separated list of column names to display
19
+ # @option arguments [Boolean] :help Return help information
20
+ # @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
21
+ # @option arguments [String] :time The unit in which to display time values
22
+ # (options: d,h,m,s,ms,micros,nanos)
23
+
24
+ # @option arguments [Boolean] :v Verbose mode. Display column headers
25
+ # @option arguments [Hash] :headers Custom HTTP headers
26
+ #
27
+ # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-anomaly-detectors.html
28
+ #
29
+ def ml_jobs(arguments = {})
30
+ headers = arguments.delete(:headers) || {}
31
+
32
+ arguments = arguments.clone
33
+
34
+ _job_id = arguments.delete(:job_id)
35
+
36
+ method = Elasticsearch::API::HTTP_GET
37
+ path = if _job_id
38
+ "_cat/ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}"
39
+ else
40
+ "_cat/ml/anomaly_detectors"
41
+ end
42
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
43
+
44
+ body = nil
45
+ perform_request(method, path, params, body, headers).body
46
+ end
47
+
48
+ # Register this action with its valid params when the module is loaded.
49
+ #
50
+ # @since 6.2.0
51
+ ParamsRegistry.register(:ml_jobs, [
52
+ :allow_no_jobs,
53
+ :bytes,
54
+ :format,
55
+ :h,
56
+ :help,
57
+ :s,
58
+ :time,
59
+ :v
60
+ ].freeze)
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end