elasticsearch-api 9.1.0 → 9.1.2
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/bulk.rb +2 -3
- data/lib/elasticsearch/api/actions/cat/aliases.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/allocation.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/count.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +1 -1
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +6 -1
- data/lib/elasticsearch/api/actions/esql/async_query.rb +2 -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/indices/delete_data_stream_options.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_mapping.rb +1 -1
- data/lib/elasticsearch/api/actions/inference/put.rb +6 -4
- data/lib/elasticsearch/api/actions/inference/put_amazonsagemaker.rb +82 -0
- data/lib/elasticsearch/api/actions/msearch.rb +1 -3
- data/lib/elasticsearch/api/actions/msearch_template.rb +1 -3
- data/lib/elasticsearch/api/actions/reindex.rb +5 -0
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +1 -3
- data/lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb +77 -0
- data/lib/elasticsearch/api/utils.rb +15 -0
- data/lib/elasticsearch/api/version.rb +2 -2
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fba50db24410f94fd3a5af07dc87f609a84f4738f1d7e3f6c1a73bc7607a355
|
4
|
+
data.tar.gz: 8ce16d17a18ae6e457b77fa083981277f0b3720f5fdd6d6e6d08db1ecfaf3208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dca2538a397806ea934e78d1d8b39969ddfdd102ac11e6aabce0ee39d3254920b02e237040ae90a796b649fe1d8bff2b47bf77a31f2b721c882aec6fbff87488
|
7
|
+
data.tar.gz: a280cda6b49c2d57e6f860bed66118c5a92cfc6a0710a05d3761d1f54e2ec63ac04222cad198ac2e1435024d6050c59cb1660505b420b158e212781e765aaeeb
|
@@ -78,6 +78,7 @@ module Elasticsearch
|
|
78
78
|
# * JavaScript: Check out `client.helpers.*`
|
79
79
|
# * .NET: Check out `BulkAllObservable`
|
80
80
|
# * PHP: Check out bulk indexing.
|
81
|
+
# * Ruby: Check out `Elasticsearch::Helpers::BulkHelper`
|
81
82
|
# **Submitting bulk requests with cURL**
|
82
83
|
# If you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.
|
83
84
|
# The latter doesn't preserve newlines. For example:
|
@@ -186,9 +187,7 @@ module Elasticsearch
|
|
186
187
|
body
|
187
188
|
end
|
188
189
|
|
189
|
-
|
190
|
-
'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9'
|
191
|
-
})
|
190
|
+
Utils.update_ndjson_headers!(headers, transport.options.dig(:transport_options, :headers))
|
192
191
|
Elasticsearch::API::Response.new(
|
193
192
|
perform_request(method, path, params, payload, headers, request_opts)
|
194
193
|
)
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
|
29
29
|
#
|
30
30
|
# @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
|
31
|
-
# @option arguments [String, Array<String>] :h
|
31
|
+
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
|
32
32
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
33
33
|
# Sorting defaults to ascending and can be changed by setting `:asc`
|
34
34
|
# or `:desc` as a suffix to the column name.
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
#
|
29
29
|
# @option arguments [String, Array] :node_id A comma-separated list of node identifiers or names used to limit the returned information.
|
30
30
|
# @option arguments [String] :bytes The unit used to display byte values.
|
31
|
-
# @option arguments [String, Array<String>] :h
|
31
|
+
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
|
32
32
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
33
33
|
# Sorting defaults to ascending and can be changed by setting `:asc`
|
34
34
|
# or `:desc` as a suffix to the column name.
|
@@ -31,7 +31,7 @@ module Elasticsearch
|
|
31
31
|
# @option arguments [String] :name The name of the component template.
|
32
32
|
# It accepts wildcard expressions.
|
33
33
|
# If it is omitted, all component templates are returned.
|
34
|
-
# @option arguments [String, Array<String>] :h
|
34
|
+
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
|
35
35
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
36
36
|
# Sorting defaults to ascending and can be changed by setting `:asc`
|
37
37
|
# or `:desc` as a suffix to the column name.
|
@@ -31,7 +31,7 @@ module Elasticsearch
|
|
31
31
|
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request.
|
32
32
|
# It supports wildcards (`*`).
|
33
33
|
# To target all data streams and indices, omit this parameter or use `*` or `_all`.
|
34
|
-
# @option arguments [String, Array<String>] :h
|
34
|
+
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
|
35
35
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
36
36
|
# Sorting defaults to ascending and can be changed by setting `:asc`
|
37
37
|
# or `:desc` as a suffix to the column name.
|
@@ -30,7 +30,7 @@ module Elasticsearch
|
|
30
30
|
# @option arguments [String, Array<String>] :fields Comma-separated list of fields used to limit returned information.
|
31
31
|
# To retrieve all fields, omit this parameter.
|
32
32
|
# @option arguments [String] :bytes The unit used to display byte values.
|
33
|
-
# @option arguments [String, Array<String>] :h
|
33
|
+
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
|
34
34
|
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
|
35
35
|
# Sorting defaults to ascending and can be changed by setting `:asc`
|
36
36
|
# or `:desc` as a suffix to the column name.
|
@@ -26,7 +26,12 @@ module Elasticsearch
|
|
26
26
|
# By default, it returns only settings that have been explicitly defined.
|
27
27
|
#
|
28
28
|
# @option arguments [Boolean] :flat_settings If `true`, returns settings in flat format.
|
29
|
-
# @option arguments [Boolean] :include_defaults If `true`, returns default cluster settings
|
29
|
+
# @option arguments [Boolean] :include_defaults If `true`, also returns default values for all other cluster settings, reflecting the values
|
30
|
+
# in the `elasticsearch.yml` file of one of the nodes in the cluster. If the nodes in your
|
31
|
+
# cluster do not all have the same values in their `elasticsearch.yml` config files then the
|
32
|
+
# values returned by this API may vary from invocation to invocation and may not reflect the
|
33
|
+
# values that Elasticsearch uses in all situations. Use the `GET _nodes/settings` API to
|
34
|
+
# fetch the settings for each individual node in your cluster.
|
30
35
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node.
|
31
36
|
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
32
37
|
# @option arguments [Time] :timeout Period to wait for a response.
|
@@ -32,7 +32,8 @@ module Elasticsearch
|
|
32
32
|
# It is valid only for the CSV format.
|
33
33
|
# @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
|
34
34
|
# If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
|
35
|
-
# @option arguments [String] :format A short version of the Accept header,
|
35
|
+
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.For async requests, nothing will be returned if the async query doesn't finish within the timeout.
|
36
|
+
# The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
|
36
37
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
37
38
|
# when they occur.
|
38
39
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
@@ -43,7 +43,7 @@ module Elasticsearch
|
|
43
43
|
# this option for debugging only.
|
44
44
|
# @option arguments [Hash] :headers Custom HTTP headers
|
45
45
|
#
|
46
|
-
# @see
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-get-query
|
47
47
|
#
|
48
48
|
def get_query(arguments = {})
|
49
49
|
request_opts = { endpoint: arguments[:endpoint] || 'esql.get_query' }
|
@@ -42,7 +42,7 @@ module Elasticsearch
|
|
42
42
|
# this option for debugging only.
|
43
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
44
44
|
#
|
45
|
-
# @see
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-list-queries
|
46
46
|
#
|
47
47
|
def list_queries(arguments = {})
|
48
48
|
request_opts = { endpoint: arguments[:endpoint] || 'esql.list_queries' }
|
@@ -28,7 +28,7 @@ module Elasticsearch
|
|
28
28
|
# minor version, meaning that your referencing code may break when this
|
29
29
|
# library is upgraded.
|
30
30
|
#
|
31
|
-
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
|
31
|
+
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
|
32
32
|
# @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
|
33
33
|
# @option arguments [Boolean] :drop_null_columns Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
|
34
34
|
# Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.
|
@@ -108,9 +108,7 @@ module Elasticsearch
|
|
108
108
|
payload = body
|
109
109
|
end
|
110
110
|
|
111
|
-
|
112
|
-
'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9'
|
113
|
-
})
|
111
|
+
Utils.update_ndjson_headers!(headers, client.transport.options.dig(:transport_options, :headers))
|
114
112
|
Elasticsearch::API::Response.new(
|
115
113
|
perform_request(method, path, params, payload, headers, request_opts)
|
116
114
|
)
|
@@ -42,7 +42,7 @@ module Elasticsearch
|
|
42
42
|
# this option for debugging only.
|
43
43
|
# @option arguments [Hash] :headers Custom HTTP headers
|
44
44
|
#
|
45
|
-
# @see https://www.elastic.co/
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream-options
|
46
46
|
#
|
47
47
|
def delete_data_stream_options(arguments = {})
|
48
48
|
request_opts = { endpoint: arguments[:endpoint] || 'indices.delete_data_stream_options' }
|
@@ -44,7 +44,7 @@ module Elasticsearch
|
|
44
44
|
# this option for debugging only.
|
45
45
|
# @option arguments [Hash] :headers Custom HTTP headers
|
46
46
|
#
|
47
|
-
# @see https://www.elastic.co/
|
47
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-options
|
48
48
|
#
|
49
49
|
def get_data_stream_options(arguments = {})
|
50
50
|
request_opts = { endpoint: arguments[:endpoint] || 'indices.get_data_stream_options' }
|
@@ -49,7 +49,7 @@ module Elasticsearch
|
|
49
49
|
# @option arguments [Hash] :headers Custom HTTP headers
|
50
50
|
# @option arguments [Hash] :body request body
|
51
51
|
#
|
52
|
-
# @see https://www.elastic.co/
|
52
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-options
|
53
53
|
#
|
54
54
|
def put_data_stream_options(arguments = {})
|
55
55
|
request_opts = { endpoint: arguments[:endpoint] || 'indices.put_data_stream_options' }
|
@@ -32,7 +32,7 @@ module Elasticsearch
|
|
32
32
|
# - Update supported mapping parameters
|
33
33
|
# - Change a field's mapping using reindexing
|
34
34
|
# - Rename a field using a field alias
|
35
|
-
# Learn how to use the update mapping API with practical examples in the {https://www.elastic.co/docs
|
35
|
+
# Learn how to use the update mapping API with practical examples in the {https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples Update mapping API examples} guide.
|
36
36
|
#
|
37
37
|
# @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. (*Required*)
|
38
38
|
# @option arguments [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
|
@@ -29,21 +29,23 @@ module Elasticsearch
|
|
29
29
|
# The following integrations are available through the inference API. You can find the available task types next to the integration name:
|
30
30
|
# * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
|
31
31
|
# * Amazon Bedrock (`completion`, `text_embedding`)
|
32
|
+
# * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)
|
32
33
|
# * Anthropic (`completion`)
|
33
34
|
# * Azure AI Studio (`completion`, `text_embedding`)
|
34
35
|
# * Azure OpenAI (`completion`, `text_embedding`)
|
35
36
|
# * Cohere (`completion`, `rerank`, `text_embedding`)
|
36
|
-
# * DeepSeek (`
|
37
|
+
# * DeepSeek (`chat_completion`, `completion`)
|
37
38
|
# * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)
|
38
39
|
# * ELSER (`sparse_embedding`)
|
39
40
|
# * Google AI Studio (`completion`, `text_embedding`)
|
40
|
-
# * Google Vertex AI (`rerank`, `text_embedding`)
|
41
|
+
# * Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)
|
41
42
|
# * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)
|
43
|
+
# * JinaAI (`rerank`, `text_embedding`)
|
44
|
+
# * Llama (`chat_completion`, `completion`, `text_embedding`)
|
42
45
|
# * Mistral (`chat_completion`, `completion`, `text_embedding`)
|
43
46
|
# * OpenAI (`chat_completion`, `completion`, `text_embedding`)
|
44
|
-
# * VoyageAI (`
|
47
|
+
# * VoyageAI (`rerank`, `text_embedding`)
|
45
48
|
# * Watsonx inference integration (`text_embedding`)
|
46
|
-
# * JinaAI (`text_embedding`, `rerank`)
|
47
49
|
#
|
48
50
|
# @option arguments [String] :task_type The task type. Refer to the integration list in the API description for the available task types.
|
49
51
|
# @option arguments [String] :inference_id The inference Id (*Required*)
|
@@ -0,0 +1,82 @@
|
|
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 Inference
|
24
|
+
module Actions
|
25
|
+
# Create an Amazon SageMaker inference endpoint.
|
26
|
+
# Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.
|
27
|
+
#
|
28
|
+
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
|
29
|
+
# @option arguments [String] :amazonsagemaker_inference_id The unique identifier of the inference endpoint. (*Required*)
|
30
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
32
|
+
# when they occur.
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
34
|
+
# returned by Elasticsearch.
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
39
|
+
# only by machines.
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
41
|
+
# this option for debugging only.
|
42
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
43
|
+
# @option arguments [Hash] :body request body
|
44
|
+
#
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonsagemaker
|
46
|
+
#
|
47
|
+
def put_amazonsagemaker(arguments = {})
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_amazonsagemaker' }
|
49
|
+
|
50
|
+
defined_params = [:task_type, :amazonsagemaker_inference_id].each_with_object({}) do |variable, set_variables|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
52
|
+
end
|
53
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
54
|
+
|
55
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
56
|
+
|
57
|
+
unless arguments[:amazonsagemaker_inference_id]
|
58
|
+
raise ArgumentError,
|
59
|
+
"Required argument 'amazonsagemaker_inference_id' missing"
|
60
|
+
end
|
61
|
+
|
62
|
+
arguments = arguments.clone
|
63
|
+
headers = arguments.delete(:headers) || {}
|
64
|
+
|
65
|
+
body = arguments.delete(:body)
|
66
|
+
|
67
|
+
_task_type = arguments.delete(:task_type)
|
68
|
+
|
69
|
+
_amazonsagemaker_inference_id = arguments.delete(:amazonsagemaker_inference_id)
|
70
|
+
|
71
|
+
method = Elasticsearch::API::HTTP_PUT
|
72
|
+
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_amazonsagemaker_inference_id)}"
|
73
|
+
params = Utils.process_params(arguments)
|
74
|
+
|
75
|
+
Elasticsearch::API::Response.new(
|
76
|
+
perform_request(method, path, params, body, headers, request_opts)
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -120,9 +120,7 @@ module Elasticsearch
|
|
120
120
|
payload = body
|
121
121
|
end
|
122
122
|
|
123
|
-
|
124
|
-
'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9'
|
125
|
-
})
|
123
|
+
Utils.update_ndjson_headers!(headers, transport.options.dig(:transport_options, :headers))
|
126
124
|
Elasticsearch::API::Response.new(
|
127
125
|
perform_request(method, path, params, payload, headers, request_opts)
|
128
126
|
)
|
@@ -93,9 +93,7 @@ module Elasticsearch
|
|
93
93
|
payload = body
|
94
94
|
end
|
95
95
|
|
96
|
-
|
97
|
-
'Content-Type' => 'application/vnd.elasticsearch+x-ndjson; compatible-with=9'
|
98
|
-
})
|
96
|
+
Utils.update_ndjson_headers!(headers, transport.options.dig(:transport_options, :headers))
|
99
97
|
Elasticsearch::API::Response.new(
|
100
98
|
perform_request(method, path, params, payload, headers, request_opts)
|
101
99
|
)
|
@@ -51,6 +51,11 @@ 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.
|
@@ -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
|
)
|
@@ -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
|
@@ -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.2'.freeze
|
21
|
+
ES_SPECIFICATION_COMMIT = 'eeef9c87c1273e5dd3a5a313768bfa6728cd39cc'.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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic Client Library Maintainers
|
@@ -499,6 +499,7 @@ files:
|
|
499
499
|
- lib/elasticsearch/api/actions/inference/put.rb
|
500
500
|
- lib/elasticsearch/api/actions/inference/put_alibabacloud.rb
|
501
501
|
- lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb
|
502
|
+
- lib/elasticsearch/api/actions/inference/put_amazonsagemaker.rb
|
502
503
|
- lib/elasticsearch/api/actions/inference/put_anthropic.rb
|
503
504
|
- lib/elasticsearch/api/actions/inference/put_azureaistudio.rb
|
504
505
|
- lib/elasticsearch/api/actions/inference/put_azureopenai.rb
|
@@ -784,6 +785,7 @@ files:
|
|
784
785
|
- lib/elasticsearch/api/actions/transform/put_transform.rb
|
785
786
|
- lib/elasticsearch/api/actions/transform/reset_transform.rb
|
786
787
|
- lib/elasticsearch/api/actions/transform/schedule_now_transform.rb
|
788
|
+
- lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb
|
787
789
|
- lib/elasticsearch/api/actions/transform/start_transform.rb
|
788
790
|
- lib/elasticsearch/api/actions/transform/stop_transform.rb
|
789
791
|
- lib/elasticsearch/api/actions/transform/update_transform.rb
|