elasticsearch-api 9.1.1 → 9.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/async_search/submit.rb +4 -4
- data/lib/elasticsearch/api/actions/bulk.rb +2 -3
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/allocation.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/count.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/health.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +10 -3
- data/lib/elasticsearch/api/actions/cat/master.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +11 -3
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +9 -1
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +9 -2
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +11 -4
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/nodes.rb +9 -2
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/plugins.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/recovery.rb +9 -2
- data/lib/elasticsearch/api/actions/cat/repositories.rb +9 -0
- data/lib/elasticsearch/api/actions/cat/segments.rb +19 -1
- data/lib/elasticsearch/api/actions/cat/shards.rb +9 -2
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +9 -1
- data/lib/elasticsearch/api/actions/cat/tasks.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/templates.rb +10 -1
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +9 -1
- data/lib/elasticsearch/api/actions/cat/transforms.rb +9 -1
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +6 -1
- data/lib/elasticsearch/api/actions/connector/delete.rb +1 -1
- data/lib/elasticsearch/api/actions/connector/list.rb +2 -2
- data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +2 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +1 -1
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +1 -1
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +1 -1
- data/lib/elasticsearch/api/actions/eql/get.rb +1 -1
- data/lib/elasticsearch/api/actions/esql/async_query.rb +1 -1
- data/lib/elasticsearch/api/actions/esql/get_query.rb +1 -1
- data/lib/elasticsearch/api/actions/esql/list_queries.rb +1 -1
- data/lib/elasticsearch/api/actions/esql/query.rb +1 -1
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +1 -3
- data/lib/elasticsearch/api/actions/get_script.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/create_from.rb +0 -1
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/delete_data_stream_options.rb +2 -2
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/get_data_stream_options.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_data_stream_options.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/put_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/refresh.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +2 -1
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/stats.rb +1 -1
- data/lib/elasticsearch/api/actions/inference/put.rb +5 -4
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +2 -1
- data/lib/elasticsearch/api/actions/msearch.rb +1 -3
- data/lib/elasticsearch/api/actions/msearch_template.rb +1 -3
- data/lib/elasticsearch/api/actions/nodes/stats.rb +1 -1
- data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +1 -1
- data/lib/elasticsearch/api/actions/reindex.rb +6 -1
- data/lib/elasticsearch/api/actions/search_mvt.rb +1 -1
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +1 -1
- data/lib/elasticsearch/api/actions/security/get_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/security/update_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +1 -1
- data/lib/elasticsearch/api/actions/sql/get_async.rb +1 -1
- data/lib/elasticsearch/api/actions/streams/logs_disable.rb +23 -3
- data/lib/elasticsearch/api/actions/streams/logs_enable.rb +26 -3
- data/lib/elasticsearch/api/actions/streams/status.rb +20 -3
- data/lib/elasticsearch/api/actions/tasks/list.rb +1 -1
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +1 -3
- data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +1 -1
- data/lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb +77 -0
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +1 -1
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +1 -0
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +1 -1
- data/lib/elasticsearch/api/utils.rb +15 -0
- data/lib/elasticsearch/api/version.rb +2 -2
- metadata +3 -2
|
@@ -26,7 +26,7 @@ module Elasticsearch
|
|
|
26
26
|
# Get summarized information about the query rulesets.
|
|
27
27
|
#
|
|
28
28
|
# @option arguments [Integer] :from The offset from the first result to fetch. Server default: 0.
|
|
29
|
-
# @option arguments [Integer] :size The maximum number of results to retrieve.
|
|
29
|
+
# @option arguments [Integer] :size The maximum number of results to retrieve. Server default: 100.
|
|
30
30
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
31
31
|
# when they occur.
|
|
32
32
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -51,12 +51,17 @@ module Elasticsearch
|
|
|
51
51
|
# In this case, the response includes a count of the version conflicts that were encountered.
|
|
52
52
|
# Note that the handling of other error types is unaffected by the `conflicts` property.
|
|
53
53
|
# Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than `max_docs` until it has successfully indexed `max_docs` documents into the target or it has gone through every document in the source query.
|
|
54
|
+
# It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.
|
|
55
|
+
# * When requested with `wait_for_completion=true` (default), the request fails if the node shuts down.
|
|
56
|
+
# * When requested with `wait_for_completion=false`, a task id is returned, for use with the task management APIs. The task may disappear or fail if the node shuts down.
|
|
57
|
+
# When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index.
|
|
58
|
+
# Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.
|
|
54
59
|
# Refer to the linked documentation for examples of how to reindex documents.
|
|
55
60
|
#
|
|
56
61
|
# @option arguments [Boolean] :refresh If `true`, the request refreshes affected shards to make this operation visible to search.
|
|
57
62
|
# @option arguments [Float] :requests_per_second The throttle for this request in sub-requests per second.
|
|
58
63
|
# By default, there is no throttle. Server default: -1.
|
|
59
|
-
# @option arguments [Time] :scroll The period of time that a consistent view of the index should be maintained for scrolled search.
|
|
64
|
+
# @option arguments [Time] :scroll The period of time that a consistent view of the index should be maintained for scrolled search. Server default: 5m.
|
|
60
65
|
# @option arguments [Integer, String] :slices The number of slices this task should be divided into.
|
|
61
66
|
# It defaults to one slice, which means the task isn't sliced into subtasks.Reindex supports sliced scroll to parallelize the reindexing process.
|
|
62
67
|
# This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.NOTE: Reindexing from remote clusters does not support manual or automatic slicing.If set to `auto`, Elasticsearch chooses the number of slices to use.
|
|
@@ -107,7 +107,7 @@ module Elasticsearch
|
|
|
107
107
|
# the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting
|
|
108
108
|
# bounding box may be larger than the vector tile.
|
|
109
109
|
# @option arguments [Integer] :extent The size, in pixels, of a side of the tile. Vector tiles are square with equal sides. Server default: 4096.
|
|
110
|
-
# @option arguments [String] :grid_agg Aggregation used to create a grid for `field`.
|
|
110
|
+
# @option arguments [String] :grid_agg Aggregation used to create a grid for `field`. Server default: geotile.
|
|
111
111
|
# @option arguments [Integer] :grid_precision Additional zoom levels available through the aggs layer. For example, if <zoom> is 7
|
|
112
112
|
# and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results
|
|
113
113
|
# don't include the aggs layer. Server default: 8.
|
|
@@ -25,7 +25,7 @@ module Elasticsearch
|
|
|
25
25
|
# Get searchable snapshot statistics.
|
|
26
26
|
#
|
|
27
27
|
# @option arguments [String, Array] :index A comma-separated list of data streams and indices to retrieve statistics for.
|
|
28
|
-
# @option arguments [String] :level Return stats aggregated at cluster, index or shard level
|
|
28
|
+
# @option arguments [String] :level Return stats aggregated at cluster, index or shard level Server default: indices.
|
|
29
29
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
30
30
|
# when they occur.
|
|
31
31
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -30,7 +30,7 @@ module Elasticsearch
|
|
|
30
30
|
# * `index.number_of_replicas`
|
|
31
31
|
#
|
|
32
32
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
|
33
|
-
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
33
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
34
34
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
35
35
|
# when they occur.
|
|
36
36
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -29,7 +29,7 @@ module Elasticsearch
|
|
|
29
29
|
# This API does not yet support configuring the settings for indices before they are in use.
|
|
30
30
|
#
|
|
31
31
|
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
|
32
|
-
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
32
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
33
33
|
# @option arguments [Time] :timeout The period to wait for a response.
|
|
34
34
|
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
35
35
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
@@ -30,7 +30,7 @@ module Elasticsearch
|
|
|
30
30
|
# If `false`, the request gets information from the master node.
|
|
31
31
|
# @option arguments [Time] :master_timeout The period to wait for the master node.
|
|
32
32
|
# If the master node is not available before the timeout expires, the request fails and returns an error.
|
|
33
|
-
# To indicate that the request should never timeout, set it to `-1`. Server default:
|
|
33
|
+
# To indicate that the request should never timeout, set it to `-1`. Server default: 30s.
|
|
34
34
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
35
35
|
# when they occur.
|
|
36
36
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -33,7 +33,7 @@ module Elasticsearch
|
|
|
33
33
|
# You must specify a format using this parameter or the `Accept` HTTP header.
|
|
34
34
|
# If you specify both, the API uses this parameter.
|
|
35
35
|
# @option arguments [Time] :keep_alive The retention period for the search and its results.
|
|
36
|
-
# It defaults to the `keep_alive` period for the original SQL search.
|
|
36
|
+
# It defaults to the `keep_alive` period for the original SQL search. Server default: 5d.
|
|
37
37
|
# @option arguments [Time] :wait_for_completion_timeout The period to wait for complete results.
|
|
38
38
|
# It defaults to no timeout, meaning the request waits for complete search results.
|
|
39
39
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
@@ -22,11 +22,31 @@ module Elasticsearch
|
|
|
22
22
|
module API
|
|
23
23
|
module Streams
|
|
24
24
|
module Actions
|
|
25
|
-
# Disable
|
|
25
|
+
# Disable logs stream.
|
|
26
|
+
# Turn off the logs stream feature for this cluster.
|
|
27
|
+
# This functionality is Experimental and may be changed or removed
|
|
28
|
+
# completely in a future release. Elastic will take a best effort approach
|
|
29
|
+
# to fix any issues, but experimental features are not subject to the
|
|
30
|
+
# support SLA of official GA features.
|
|
26
31
|
#
|
|
32
|
+
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
|
33
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
34
|
+
# @option arguments [Time] :timeout The period to wait for a response.
|
|
35
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
36
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
37
|
+
# when they occur.
|
|
38
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
39
|
+
# returned by Elasticsearch.
|
|
40
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
41
|
+
# For example `"exists_time": "1h"` for humans and
|
|
42
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
43
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
44
|
+
# only by machines.
|
|
45
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
46
|
+
# this option for debugging only.
|
|
27
47
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
28
48
|
#
|
|
29
|
-
# @see https://www.elastic.co/
|
|
49
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch#TODO
|
|
30
50
|
#
|
|
31
51
|
def logs_disable(arguments = {})
|
|
32
52
|
request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_disable' }
|
|
@@ -38,7 +58,7 @@ module Elasticsearch
|
|
|
38
58
|
|
|
39
59
|
method = Elasticsearch::API::HTTP_POST
|
|
40
60
|
path = '_streams/logs/_disable'
|
|
41
|
-
params =
|
|
61
|
+
params = Utils.process_params(arguments)
|
|
42
62
|
|
|
43
63
|
Elasticsearch::API::Response.new(
|
|
44
64
|
perform_request(method, path, params, body, headers, request_opts)
|
|
@@ -22,11 +22,34 @@ module Elasticsearch
|
|
|
22
22
|
module API
|
|
23
23
|
module Streams
|
|
24
24
|
module Actions
|
|
25
|
-
# Enable
|
|
25
|
+
# Enable logs stream.
|
|
26
|
+
# Turn on the logs stream feature for this cluster.
|
|
27
|
+
# NOTE: To protect existing data, this feature can be turned on only if the
|
|
28
|
+
# cluster does not have existing indices or data streams that match the pattern `logs|logs.*`.
|
|
29
|
+
# If those indices or data streams exist, a `409 - Conflict` response and error is returned.
|
|
30
|
+
# This functionality is Experimental and may be changed or removed
|
|
31
|
+
# completely in a future release. Elastic will take a best effort approach
|
|
32
|
+
# to fix any issues, but experimental features are not subject to the
|
|
33
|
+
# support SLA of official GA features.
|
|
26
34
|
#
|
|
35
|
+
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
|
36
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
37
|
+
# @option arguments [Time] :timeout The period to wait for a response.
|
|
38
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
39
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
40
|
+
# when they occur.
|
|
41
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
42
|
+
# returned by Elasticsearch.
|
|
43
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
44
|
+
# For example `"exists_time": "1h"` for humans and
|
|
45
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
46
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
47
|
+
# only by machines.
|
|
48
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
49
|
+
# this option for debugging only.
|
|
27
50
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
28
51
|
#
|
|
29
|
-
# @see https://www.elastic.co/
|
|
52
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch#TODO
|
|
30
53
|
#
|
|
31
54
|
def logs_enable(arguments = {})
|
|
32
55
|
request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_enable' }
|
|
@@ -38,7 +61,7 @@ module Elasticsearch
|
|
|
38
61
|
|
|
39
62
|
method = Elasticsearch::API::HTTP_POST
|
|
40
63
|
path = '_streams/logs/_enable'
|
|
41
|
-
params =
|
|
64
|
+
params = Utils.process_params(arguments)
|
|
42
65
|
|
|
43
66
|
Elasticsearch::API::Response.new(
|
|
44
67
|
perform_request(method, path, params, body, headers, request_opts)
|
|
@@ -22,11 +22,28 @@ module Elasticsearch
|
|
|
22
22
|
module API
|
|
23
23
|
module Streams
|
|
24
24
|
module Actions
|
|
25
|
-
#
|
|
25
|
+
# Get the status of streams.
|
|
26
|
+
# Get the current status for all types of streams.
|
|
27
|
+
# This functionality is Experimental and may be changed or removed
|
|
28
|
+
# completely in a future release. Elastic will take a best effort approach
|
|
29
|
+
# to fix any issues, but experimental features are not subject to the
|
|
30
|
+
# support SLA of official GA features.
|
|
26
31
|
#
|
|
32
|
+
# @option arguments [String] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
33
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
34
|
+
# when they occur.
|
|
35
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
36
|
+
# returned by Elasticsearch.
|
|
37
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
38
|
+
# For example `"exists_time": "1h"` for humans and
|
|
39
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
40
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
41
|
+
# only by machines.
|
|
42
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
43
|
+
# this option for debugging only.
|
|
27
44
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
28
45
|
#
|
|
29
|
-
# @see https://www.elastic.co/
|
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch#TODO
|
|
30
47
|
#
|
|
31
48
|
def status(arguments = {})
|
|
32
49
|
request_opts = { endpoint: arguments[:endpoint] || 'streams.status' }
|
|
@@ -38,7 +55,7 @@ module Elasticsearch
|
|
|
38
55
|
|
|
39
56
|
method = Elasticsearch::API::HTTP_GET
|
|
40
57
|
path = '_streams/status'
|
|
41
|
-
params =
|
|
58
|
+
params = Utils.process_params(arguments)
|
|
42
59
|
|
|
43
60
|
Elasticsearch::API::Response.new(
|
|
44
61
|
perform_request(method, path, params, body, headers, request_opts)
|
|
@@ -88,7 +88,7 @@ module Elasticsearch
|
|
|
88
88
|
# @option arguments [Boolean] :detailed If `true`, the response includes detailed information about the running tasks.
|
|
89
89
|
# This information is useful to distinguish tasks from each other but is more costly to run.
|
|
90
90
|
# @option arguments [String] :group_by A key that is used to group tasks in the response.
|
|
91
|
-
# The task lists can be grouped either by nodes or by parent tasks.
|
|
91
|
+
# The task lists can be grouped either by nodes or by parent tasks. Server default: nodes.
|
|
92
92
|
# @option arguments [String, Array] :nodes A comma-separated list of node IDs or names that is used to limit the returned information.
|
|
93
93
|
# @option arguments [String] :parent_task_id A parent task identifier that is used to limit returned information.
|
|
94
94
|
# To return all tasks, omit this parameter or use a value of `-1`.
|
|
@@ -136,9 +136,7 @@ module Elasticsearch
|
|
|
136
136
|
body
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9'
|
|
141
|
-
})
|
|
139
|
+
Utils.update_ndjson_headers!(headers, client.transport.options.dig(:transport_options, :headers))
|
|
142
140
|
Elasticsearch::API::Response.new(
|
|
143
141
|
perform_request(method, path, params, payload, headers, request_opts)
|
|
144
142
|
)
|
|
@@ -22,7 +22,7 @@ module Elasticsearch
|
|
|
22
22
|
module API
|
|
23
23
|
module Transform
|
|
24
24
|
module Actions
|
|
25
|
-
# Retrieves transform usage information for transform nodes
|
|
25
|
+
# Retrieves transform usage information for transform nodes
|
|
26
26
|
#
|
|
27
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
|
28
28
|
#
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
# This code was automatically generated from the Elasticsearch Specification
|
|
19
|
+
# See https://github.com/elastic/elasticsearch-specification
|
|
20
|
+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
|
|
21
|
+
module Elasticsearch
|
|
22
|
+
module API
|
|
23
|
+
module Transform
|
|
24
|
+
module Actions
|
|
25
|
+
# Set upgrade_mode for transform indices.
|
|
26
|
+
# Sets a cluster wide upgrade_mode setting that prepares transform
|
|
27
|
+
# indices for an upgrade.
|
|
28
|
+
# When upgrading your cluster, in some circumstances you must restart your
|
|
29
|
+
# nodes and reindex your transform indices. In those circumstances,
|
|
30
|
+
# there must be no transforms running. You can close the transforms,
|
|
31
|
+
# do the upgrade, then open all the transforms again. Alternatively,
|
|
32
|
+
# you can use this API to temporarily halt tasks associated with the transforms
|
|
33
|
+
# and prevent new transforms from opening. You can also use this API
|
|
34
|
+
# during upgrades that do not require you to reindex your transform
|
|
35
|
+
# indices, though stopping transforms is not a requirement in that case.
|
|
36
|
+
# You can see the current value for the upgrade_mode setting by using the get
|
|
37
|
+
# transform info API.
|
|
38
|
+
#
|
|
39
|
+
# @option arguments [Boolean] :enabled When `true`, it enables `upgrade_mode` which temporarily halts all
|
|
40
|
+
# transform tasks and prohibits new transform tasks from
|
|
41
|
+
# starting.
|
|
42
|
+
# @option arguments [Time] :timeout The time to wait for the request to be completed. Server default: 30s.
|
|
43
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
44
|
+
# when they occur.
|
|
45
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
46
|
+
# returned by Elasticsearch.
|
|
47
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
48
|
+
# For example `"exists_time": "1h"` for humans and
|
|
49
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
50
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
51
|
+
# only by machines.
|
|
52
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
53
|
+
# this option for debugging only.
|
|
54
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
|
55
|
+
#
|
|
56
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode
|
|
57
|
+
#
|
|
58
|
+
def set_upgrade_mode(arguments = {})
|
|
59
|
+
request_opts = { endpoint: arguments[:endpoint] || 'transform.set_upgrade_mode' }
|
|
60
|
+
|
|
61
|
+
arguments = arguments.clone
|
|
62
|
+
headers = arguments.delete(:headers) || {}
|
|
63
|
+
|
|
64
|
+
body = nil
|
|
65
|
+
|
|
66
|
+
method = Elasticsearch::API::HTTP_POST
|
|
67
|
+
path = '_transform/set_upgrade_mode'
|
|
68
|
+
params = Utils.process_params(arguments)
|
|
69
|
+
|
|
70
|
+
Elasticsearch::API::Response.new(
|
|
71
|
+
perform_request(method, path, params, body, headers, request_opts)
|
|
72
|
+
)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -27,7 +27,7 @@ module Elasticsearch
|
|
|
27
27
|
# Only a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
|
|
28
28
|
#
|
|
29
29
|
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
|
30
|
-
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
30
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
31
31
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
32
32
|
# when they occur.
|
|
33
33
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -62,6 +62,7 @@ module Elasticsearch
|
|
|
62
62
|
end
|
|
63
63
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
64
64
|
|
|
65
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
65
66
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
|
66
67
|
|
|
67
68
|
arguments = arguments.clone
|
|
@@ -31,7 +31,7 @@ module Elasticsearch
|
|
|
31
31
|
# Watcher shards must always be in the `data_content` tier.
|
|
32
32
|
#
|
|
33
33
|
# @option arguments [Time] :master_timeout The period to wait for a connection to the master node.
|
|
34
|
-
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
34
|
+
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
|
35
35
|
# @option arguments [Time] :timeout The period to wait for a response.
|
|
36
36
|
# If no response is received before the timeout expires, the request fails and returns an error.
|
|
37
37
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
@@ -177,6 +177,21 @@ module Elasticsearch
|
|
|
177
177
|
end
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
+
# Updates ndjson headers for msearch, bulk, and others
|
|
181
|
+
#
|
|
182
|
+
def update_ndjson_headers!(headers, client_headers)
|
|
183
|
+
current_content = client_headers.keys.find { |c| c.match?(/content-?_?type/i) } || 'content-type'
|
|
184
|
+
current_accept = client_headers.keys.find { |c| c.match?(/accept/i) } || 'accept'
|
|
185
|
+
version = client_headers[current_content].match(/compatible-with=([0-9]+)/)[1] || 9
|
|
186
|
+
|
|
187
|
+
headers.merge!(
|
|
188
|
+
{
|
|
189
|
+
current_content => "application/vnd.elasticsearch+x-ndjson; compatible-with=#{version}",
|
|
190
|
+
current_accept => "application/vnd.elasticsearch+x-ndjson; compatible-with=#{version}"
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
|
|
180
195
|
extend self
|
|
181
196
|
end
|
|
182
197
|
end
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
module Elasticsearch
|
|
19
19
|
module API
|
|
20
|
-
VERSION = '9.1.
|
|
21
|
-
ES_SPECIFICATION_COMMIT = '
|
|
20
|
+
VERSION = '9.1.3'.freeze
|
|
21
|
+
ES_SPECIFICATION_COMMIT = 'ab308fbed818e33443a905ef54a3e2ee7333c11a'.freeze
|
|
22
22
|
end
|
|
23
23
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elasticsearch-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 9.1.
|
|
4
|
+
version: 9.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic Client Library Maintainers
|
|
@@ -785,6 +785,7 @@ files:
|
|
|
785
785
|
- lib/elasticsearch/api/actions/transform/put_transform.rb
|
|
786
786
|
- lib/elasticsearch/api/actions/transform/reset_transform.rb
|
|
787
787
|
- lib/elasticsearch/api/actions/transform/schedule_now_transform.rb
|
|
788
|
+
- lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb
|
|
788
789
|
- lib/elasticsearch/api/actions/transform/start_transform.rb
|
|
789
790
|
- lib/elasticsearch/api/actions/transform/stop_transform.rb
|
|
790
791
|
- lib/elasticsearch/api/actions/transform/update_transform.rb
|
|
@@ -833,7 +834,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
833
834
|
- !ruby/object:Gem::Version
|
|
834
835
|
version: '0'
|
|
835
836
|
requirements: []
|
|
836
|
-
rubygems_version: 3.
|
|
837
|
+
rubygems_version: 3.6.9
|
|
837
838
|
specification_version: 4
|
|
838
839
|
summary: Ruby API for Elasticsearch.
|
|
839
840
|
test_files: []
|