elasticsearch-api 9.0.4 → 9.0.5
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/esql/async_query.rb +2 -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/put_mapping.rb +1 -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/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 +50 -0
- data/lib/elasticsearch/api/utils.rb +15 -0
- data/lib/elasticsearch/api/version.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33f62431eebf3e1b094974f355ccbe95fb948639b2f1e09f5aa6b641d0e5cfe2
|
4
|
+
data.tar.gz: 21a94c747bb929d7594dafbc19e76d748ff04ff7191c42465761805bb17124fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09a46b80b6c651891f03232088a30f3eea8ca58cee618369774dc5472ef5260a9fa74594bbd7abef2c0413da78002d8069774134de9b7aeaf234c79a4cb935db'
|
7
|
+
data.tar.gz: 47b0605b9213d4dd72311043a9e275e656f122f4c18bebc90a5989706a045b432afef0f089285e57cb9e4ce55e469ed82c7c8c983698a8b86ccf50145ee9f111
|
@@ -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.
|
@@ -30,7 +30,8 @@ module Elasticsearch
|
|
30
30
|
# It is valid only for the CSV format.
|
31
31
|
# @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.
|
32
32
|
# If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
|
33
|
-
# @option arguments [String] :format A short version of the Accept header,
|
33
|
+
# @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.
|
34
|
+
# 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.
|
34
35
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
35
36
|
# when they occur.
|
36
37
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
@@ -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
|
)
|
@@ -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.
|
@@ -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, which can be used via the task management API to monitor, debug, or cancel the task. 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,50 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# 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
|
+
# Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
|
26
|
+
#
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
#
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-set-upgrade-mode.html
|
30
|
+
#
|
31
|
+
def set_upgrade_mode(arguments = {})
|
32
|
+
request_opts = { endpoint: arguments[:endpoint] || 'transform.set_upgrade_mode' }
|
33
|
+
|
34
|
+
arguments = arguments.clone
|
35
|
+
headers = arguments.delete(:headers) || {}
|
36
|
+
|
37
|
+
body = nil
|
38
|
+
|
39
|
+
method = Elasticsearch::API::HTTP_POST
|
40
|
+
path = '_transform/set_upgrade_mode'
|
41
|
+
params = {}
|
42
|
+
|
43
|
+
Elasticsearch::API::Response.new(
|
44
|
+
perform_request(method, path, params, body, headers, request_opts)
|
45
|
+
)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
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.0.
|
21
|
-
ES_SPECIFICATION_COMMIT = '
|
20
|
+
VERSION = '9.0.5'.freeze
|
21
|
+
ES_SPECIFICATION_COMMIT = '941744bd0826657988ca8f9a336795092b3dbb9b'.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.0.
|
4
|
+
version: 9.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic Client Library Maintainers
|
@@ -771,6 +771,7 @@ files:
|
|
771
771
|
- lib/elasticsearch/api/actions/transform/put_transform.rb
|
772
772
|
- lib/elasticsearch/api/actions/transform/reset_transform.rb
|
773
773
|
- lib/elasticsearch/api/actions/transform/schedule_now_transform.rb
|
774
|
+
- lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb
|
774
775
|
- lib/elasticsearch/api/actions/transform/start_transform.rb
|
775
776
|
- lib/elasticsearch/api/actions/transform/stop_transform.rb
|
776
777
|
- lib/elasticsearch/api/actions/transform/update_transform.rb
|