Skip to content

Auto-generated code for main #3029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ async def bulk(
<li>JavaScript: Check out <code>client.helpers.*</code></li>
<li>.NET: Check out <code>BulkAllObservable</code></li>
<li>PHP: Check out bulk indexing.</li>
<li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
</ul>
<p><strong>Submitting bulk requests with cURL</strong></p>
<p>If you're providing text file input to <code>curl</code>, you must use the <code>--data-binary</code> flag instead of plain <code>-d</code>.
Expand Down Expand Up @@ -3875,6 +3876,13 @@ async def reindex(
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 <code>conflicts</code> property.
Additionally, if you opt to count version conflicts, the operation could attempt to reindex more documents from the source than <code>max_docs</code> until it has successfully indexed <code>max_docs</code> documents into the target or it has gone through every document in the source query.</p>
<p>It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.</p>
<ul>
<li>When requested with <code>wait_for_completion=true</code> (default), the request fails if the node shuts down.</li>
<li>When requested with <code>wait_for_completion=false</code>, 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 <code>conflicts=proceed</code> 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.</li>
</ul>
<p>Refer to the linked documentation for examples of how to reindex documents.</p>


Expand Down Expand Up @@ -5659,7 +5667,7 @@ async def termvectors(
doc: t.Optional[t.Mapping[str, t.Any]] = None,
error_trace: t.Optional[bool] = None,
field_statistics: t.Optional[bool] = None,
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
fields: t.Optional[t.Sequence[str]] = None,
filter: t.Optional[t.Mapping[str, t.Any]] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
human: t.Optional[bool] = None,
Expand Down
134 changes: 124 additions & 10 deletions elasticsearch/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,34 @@ async def aliases(
] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
h: t.Optional[
t.Union[
t.Sequence[
t.Union[
str,
t.Literal[
"alias",
"filter",
"index",
"is_write_index",
"routing.index",
"routing.search",
],
]
],
t.Union[
str,
t.Literal[
"alias",
"filter",
"index",
"is_write_index",
"routing.index",
"routing.search",
],
],
]
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
Expand All @@ -74,7 +101,8 @@ async def aliases(
values, such as `open,hidden`.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: The period to wait for a connection to the master node.
Expand Down Expand Up @@ -137,7 +165,48 @@ async def allocation(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
h: t.Optional[
t.Union[
t.Sequence[
t.Union[
str,
t.Literal[
"disk.avail",
"disk.indices",
"disk.indices.forecast",
"disk.percent",
"disk.total",
"disk.used",
"host",
"ip",
"node",
"node.role",
"shards",
"shards.undesired",
"write_load.forecast",
],
]
],
t.Union[
str,
t.Literal[
"disk.avail",
"disk.indices",
"disk.indices.forecast",
"disk.percent",
"disk.total",
"disk.used",
"host",
"ip",
"node",
"node.role",
"shards",
"shards.undesired",
"write_load.forecast",
],
],
]
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
local: t.Optional[bool] = None,
Expand All @@ -161,7 +230,8 @@ async def allocation(
:param bytes: The unit used to display byte values.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param local: If `true`, the request computes the list of selected nodes from
Expand Down Expand Up @@ -224,7 +294,36 @@ async def component_templates(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
h: t.Optional[
t.Union[
t.Sequence[
t.Union[
str,
t.Literal[
"alias_count",
"included_in",
"mapping_count",
"metadata_count",
"name",
"settings_count",
"version",
],
]
],
t.Union[
str,
t.Literal[
"alias_count",
"included_in",
"mapping_count",
"metadata_count",
"name",
"settings_count",
"version",
],
],
]
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
local: t.Optional[bool] = None,
Expand All @@ -249,7 +348,8 @@ async def component_templates(
If it is omitted, all component templates are returned.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param local: If `true`, the request computes the list of selected nodes from
Expand Down Expand Up @@ -310,7 +410,12 @@ async def count(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
h: t.Optional[
t.Union[
t.Sequence[t.Union[str, t.Literal["count", "epoch", "timestamp"]]],
t.Union[str, t.Literal["count", "epoch", "timestamp"]],
]
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
Expand All @@ -334,7 +439,8 @@ async def count(
and indices, omit this parameter or use `*` or `_all`.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param s: List of columns that determine how the table should be sorted. Sorting
Expand Down Expand Up @@ -389,7 +495,14 @@ async def fielddata(
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
h: t.Optional[
t.Union[
t.Sequence[
t.Union[str, t.Literal["field", "host", "id", "ip", "node", "size"]]
],
t.Union[str, t.Literal["field", "host", "id", "ip", "node", "size"]],
]
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
pretty: t.Optional[bool] = None,
Expand All @@ -412,7 +525,8 @@ async def fielddata(
:param bytes: The unit used to display byte values.
:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param h: A comma-separated list of columns names to display. It supports simple
wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param s: List of columns that determine how the table should be sorted. Sorting
Expand Down
9 changes: 7 additions & 2 deletions elasticsearch/_async/client/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,13 @@ async def get_settings(
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings>`_

:param flat_settings: If `true`, returns settings in flat format.
:param include_defaults: If `true`, returns default cluster settings from the
local node.
:param include_defaults: If `true`, also returns default values for all other
cluster settings, reflecting the values in the `elasticsearch.yml` file of
one of the nodes in the cluster. If the nodes in your cluster do not all
have the same values in their `elasticsearch.yml` config files then the values
returned by this API may vary from invocation to invocation and may not reflect
the values that Elasticsearch uses in all situations. Use the `GET _nodes/settings`
API to fetch the settings for each individual node in your cluster.
:param 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.
Expand Down
19 changes: 13 additions & 6 deletions elasticsearch/_async/client/esql.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class EsqlClient(NamespacedClient):
async def async_query(
self,
*,
query: t.Optional[str] = None,
query: t.Optional[t.Union[str, "ESQLBase"]] = None,
allow_partial_results: t.Optional[bool] = None,
columnar: t.Optional[bool] = None,
delimiter: t.Optional[str] = None,
Expand Down Expand Up @@ -111,7 +111,12 @@ async def async_query(
which has the name of all the columns.
:param filter: Specify a Query DSL query in the filter parameter to filter the
set of documents that an ES|QL query runs on.
:param format: A short version of the Accept header, for example `json` or `yaml`.
:param 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.
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
Expand Down Expand Up @@ -165,7 +170,7 @@ async def async_query(
__query["pretty"] = pretty
if not __body:
if query is not None:
__body["query"] = query
__body["query"] = str(query)
if columnar is not None:
__body["columnar"] = columnar
if filter is not None:
Expand Down Expand Up @@ -484,7 +489,7 @@ async def list_queries(
async def query(
self,
*,
query: t.Optional[str] = None,
query: t.Optional[t.Union[str, "ESQLBase"]] = None,
allow_partial_results: t.Optional[bool] = None,
columnar: t.Optional[bool] = None,
delimiter: t.Optional[str] = None,
Expand Down Expand Up @@ -539,7 +544,9 @@ async def query(
`all_columns` which has the name of all columns.
:param filter: Specify a Query DSL query in the filter parameter to filter the
set of documents that an ES|QL query runs on.
:param format: A short version of the Accept header, e.g. json, yaml.
:param 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.
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
query, the response will include an extra `_clusters` object with information
about the clusters that participated in the search along with info such as
Expand Down Expand Up @@ -579,7 +586,7 @@ async def query(
__query["pretty"] = pretty
if not __body:
if query is not None:
__body["query"] = query
__body["query"] = str(query)
if columnar is not None:
__body["columnar"] = columnar
if filter is not None:
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/_async/client/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -4179,7 +4179,7 @@ async def put_mapping(
<li>Change a field's mapping using reindexing</li>
<li>Rename a field using a field alias</li>
</ul>
<p>Learn how to use the update mapping API with practical examples in the <a href="https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples">Update mapping API examples</a> guide.</p>
<p>Learn how to use the update mapping API with practical examples in the <a href="https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples">Update mapping API examples</a> guide.</p>


`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping>`_
Expand Down
Loading
Loading