diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb index 3a0091922f..9b38099c9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb @@ -78,6 +78,7 @@ module Actions # * JavaScript: Check out `client.helpers.*` # * .NET: Check out `BulkAllObservable` # * PHP: Check out bulk indexing. + # * Ruby: Check out `Elasticsearch::Helpers::BulkHelper` # **Submitting bulk requests with cURL** # If you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`. # The latter doesn't preserve newlines. For example: diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index 9aeada9d8d..b7ff709894 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -28,7 +28,7 @@ module Actions # 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. # # @option arguments [String, Array] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. - # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :h A comma-separated list of columns names to display. It supports simple wildcards. # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. # Sorting defaults to ascending and can be changed by setting `:asc` # or `:desc` as a suffix to the column name. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb index 7f07a393c8..83e81de14d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/allocation.rb @@ -28,7 +28,7 @@ module Actions # # @option arguments [String, Array] :node_id A comma-separated list of node identifiers or names used to limit the returned information. # @option arguments [String] :bytes The unit used to display byte values. - # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :h A comma-separated list of columns names to display. It supports simple wildcards. # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. # Sorting defaults to ascending and can be changed by setting `:asc` # or `:desc` as a suffix to the column name. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 4a9f7d1cad..62fb05455f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String] :name The name of the component template. # It accepts wildcard expressions. # If it is omitted, all component templates are returned. - # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :h A comma-separated list of columns names to display. It supports simple wildcards. # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. # Sorting defaults to ascending and can be changed by setting `:asc` # or `:desc` as a suffix to the column name. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb index 08892ddaf0..109e7c3f5f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb @@ -31,7 +31,7 @@ module Actions # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. # It supports wildcards (`*`). # To target all data streams and indices, omit this parameter or use `*` or `_all`. - # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :h A comma-separated list of columns names to display. It supports simple wildcards. # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. # Sorting defaults to ascending and can be changed by setting `:asc` # or `:desc` as a suffix to the column name. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb index 286b10daee..a68d445155 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/fielddata.rb @@ -30,7 +30,7 @@ module Actions # @option arguments [String, Array] :fields Comma-separated list of fields used to limit returned information. # To retrieve all fields, omit this parameter. # @option arguments [String] :bytes The unit used to display byte values. - # @option arguments [String, Array] :h List of columns to appear in the response. Supports simple wildcards. + # @option arguments [String, Array] :h A comma-separated list of columns names to display. It supports simple wildcards. # @option arguments [String, Array] :s List of columns that determine how the table should be sorted. # Sorting defaults to ascending and can be changed by setting `:asc` # or `:desc` as a suffix to the column name. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb index 892310f9b1..63b08f7769 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query.rb @@ -30,7 +30,8 @@ module Actions # It is valid only for the CSV format. # @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. # If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns. - # @option arguments [String] :format A short version of the Accept header, for example `json` or `yaml`. + # @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. + # 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. # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors # when they occur. # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb index ac9cc06f39..ebf3c17537 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/query.rb @@ -28,7 +28,7 @@ module Actions # minor version, meaning that your referencing code may break when this # library is upgraded. # - # @option arguments [String] :format A short version of the Accept header, e.g. json, yaml. + # @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. # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format. # @option arguments [Boolean] :drop_null_columns Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results? # 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. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb index 78d03e0f49..d7532504e6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/put_mapping.rb @@ -32,7 +32,7 @@ module Actions # - Update supported mapping parameters # - Change a field's mapping using reindexing # - Rename a field using a field alias - # 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. + # 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. # # @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*) # @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. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb index 192c1ce780..20e69a4e01 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/reindex.rb @@ -51,6 +51,11 @@ module Actions # In this case, the response includes a count of the version conflicts that were encountered. # Note that the handling of other error types is unaffected by the `conflicts` property. # 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. + # It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes. + # * When requested with `wait_for_completion=true` (default), the request fails if the node shuts down. + # * 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. + # When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index. + # Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause. # Refer to the linked documentation for examples of how to reindex documents. # # @option arguments [Boolean] :refresh If `true`, the request refreshes affected shards to make this operation visible to search. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb new file mode 100644 index 0000000000..75c12bc322 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/set_upgrade_mode.rb @@ -0,0 +1,50 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Transform + module Actions + # Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade. + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/transform-set-upgrade-mode.html + # + def set_upgrade_mode(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'transform.set_upgrade_mode' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_POST + path = '_transform/set_upgrade_mode' + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 7a08318e1c..8b4743ddb6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -18,6 +18,6 @@ module Elasticsearch module API VERSION = '9.0.4'.freeze - ES_SPECIFICATION_COMMIT = '6a749236ec86e65b50e31dc888c727c0aede67a3'.freeze + ES_SPECIFICATION_COMMIT = '2115c3bd38dafbe1061a520046d6f0033dd52aa1'.freeze end end diff --git a/elasticsearch-api/spec/unit/actions/transform/set_upgrade_mode_spec.rb b/elasticsearch-api/spec/unit/actions/transform/set_upgrade_mode_spec.rb new file mode 100644 index 0000000000..9dd1b158c1 --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/transform/set_upgrade_mode_spec.rb @@ -0,0 +1,35 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require 'spec_helper' + +describe 'client.transform#set_upgrade_mode' do + let(:expected_args) do + [ + 'POST', + '_transform/set_upgrade_mode', + {}, + nil, + {}, + { endpoint: 'transform.set_upgrade_mode' } + ] + end + + it 'performs the request' do + expect(client_double.transform.set_upgrade_mode).to be_a Elasticsearch::API::Response + end +end