Skip to content

Commit

Permalink
Auto-generated code for main (#2608)
Browse files Browse the repository at this point in the history
Co-authored-by: Quentin Pradet <[email protected]>
  • Loading branch information
elasticmachine and pquentin authored Jul 31, 2024
1 parent dec4858 commit 8355d56
Show file tree
Hide file tree
Showing 24 changed files with 1,280 additions and 556 deletions.
67 changes: 35 additions & 32 deletions elasticsearch/_async/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,9 @@ async def bulk(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Performs multiple indexing or delete operations in a single API call. This reduces
overhead and can greatly increase indexing speed.
Bulk index or delete documents. Performs multiple indexing or delete operations
in a single API call. This reduces overhead and can greatly increase indexing
speed.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html>`_
Expand Down Expand Up @@ -995,9 +996,9 @@ async def create(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Adds a JSON document to the specified data stream or index and makes it searchable.
If the target is an index and the document already exists, the request updates
the document and increments its version.
Index a document. Adds a JSON document to the specified data stream or index
and makes it searchable. If the target is an index and the document already exists,
the request updates the document and increments its version.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
Expand Down Expand Up @@ -1101,7 +1102,7 @@ async def delete(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Removes a JSON document from the specified index.
Delete a document. Removes a JSON document from the specified index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html>`_
Expand Down Expand Up @@ -1225,7 +1226,7 @@ async def delete_by_query(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes documents that match the specified query.
Delete documents. Deletes documents that match the specified query.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html>`_
Expand Down Expand Up @@ -1451,7 +1452,7 @@ async def delete_script(
timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes a stored script or search template.
Delete a script or search template. Deletes a stored script or search template.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
Expand Down Expand Up @@ -1519,7 +1520,7 @@ async def exists(
] = None,
) -> HeadApiResponse:
"""
Checks if a document in an index exists.
Check a document. Checks if a specified document exists.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
Expand Down Expand Up @@ -1620,7 +1621,7 @@ async def exists_source(
] = None,
) -> HeadApiResponse:
"""
Checks if a document's `_source` is stored.
Check for a document source. Checks if a document's `_source` is stored.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
Expand Down Expand Up @@ -1720,8 +1721,8 @@ async def explain(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns information about why a specific document matches (or doesn’t match)
a query.
Explain a document match result. Returns information about why a specific document
matches, or doesn’t match, a query.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html>`_
Expand Down Expand Up @@ -1959,7 +1960,8 @@ async def get(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns a document.
Get a document by its ID. Retrieves the document with the specified ID from an
index.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
Expand Down Expand Up @@ -2050,7 +2052,7 @@ async def get_script(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Retrieves a stored script or search template.
Get a script or search template. Retrieves a stored script or search template.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
Expand Down Expand Up @@ -2182,7 +2184,7 @@ async def get_source(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns the source of a document.
Get a document's source. Returns the source of a document.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
Expand Down Expand Up @@ -2340,9 +2342,9 @@ async def index(
] = None,
) -> ObjectApiResponse[t.Any]:
"""
Adds a JSON document to the specified data stream or index and makes it searchable.
If the target is an index and the document already exists, the request updates
the document and increments its version.
Index a document. Adds a JSON document to the specified data stream or index
and makes it searchable. If the target is an index and the document already exists,
the request updates the document and increments its version.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
Expand Down Expand Up @@ -2451,7 +2453,7 @@ async def info(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns basic information about the cluster.
Get cluster info. Returns basic information about the cluster.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
"""
Expand Down Expand Up @@ -3131,7 +3133,8 @@ async def put_script(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates or updates a stored script or search template.
Create or update a script or search template. Creates or updates a stored script
or search template.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
Expand Down Expand Up @@ -3311,9 +3314,9 @@ async def reindex(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Allows to copy documents from one index to another, optionally filtering the
source documents by a query, changing the destination index settings, or fetching
the documents from a remote cluster.
Reindex documents. Copies documents from a source to a destination. The source
can be any existing index, alias, or data stream. The destination must differ
from the source. For example, you cannot reindex a data stream into itself.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html>`_
Expand Down Expand Up @@ -3528,7 +3531,7 @@ async def scripts_painless_execute(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Runs a script and returns a result.
Run a script. Runs a script and returns a result.
`<https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html>`_
Expand Down Expand Up @@ -4198,8 +4201,7 @@ async def search_mvt(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> BinaryApiResponse:
"""
Searches a vector tile for geospatial values. Returns results as a binary Mapbox
vector tile.
Search a vector tile. Searches a vector tile for geospatial values.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html>`_
Expand Down Expand Up @@ -4687,8 +4689,8 @@ async def termvectors(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns information and statistics about terms in the fields of a particular
document.
Get term vector information. Returns information and statistics about terms in
the fields of a particular document.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html>`_
Expand Down Expand Up @@ -4830,7 +4832,8 @@ async def update(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Updates a document with a script or partial document.
Update a document. Updates a document by running a script or passing a partial
document.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html>`_
Expand Down Expand Up @@ -4995,9 +4998,9 @@ async def update_by_query(
body: t.Optional[t.Dict[str, t.Any]] = None,
) -> ObjectApiResponse[t.Any]:
"""
Updates documents that match the specified query. If no query is specified, performs
an update on every document in the data stream or index without modifying the
source, which is useful for picking up mapping changes.
Update documents. Updates documents that match the specified query. If no query
is specified, performs an update on every document in the data stream or index
without modifying the source, which is useful for picking up mapping changes.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html>`_
Expand Down
95 changes: 48 additions & 47 deletions elasticsearch/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ async def aliases(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Retrieves the cluster’s index aliases, including filter and routing information.
The API does not return data stream aliases. IMPORTANT: cat APIs are only intended
Get aliases. Retrieves the cluster’s index aliases, including filter and routing
information. The API does not return data stream aliases. 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.
not intended for use by applications. For application consumption, use the /_alias
endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html>`_
Expand Down Expand Up @@ -231,11 +231,12 @@ async def component_templates(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns information about component templates in a cluster. Component templates
are building blocks for constructing index templates that specify index mappings,
settings, and aliases. IMPORTANT: cat APIs are only intended for human consumption
using the command line or Kibana console. They are not intended for use by applications.
For application consumption, use the get component template API.
Get component templates. Returns information about component templates in a cluster.
Component templates are building blocks for constructing index templates that
specify index mappings, settings, and aliases. CAT APIs are only intended for
human consumption using the command line or Kibana console. They are not intended
for use by applications. For application consumption, use the /_component_template
endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html>`_
Expand Down Expand Up @@ -316,12 +317,12 @@ async def count(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Provides quick access to a document count for a data stream, an index, or an
entire cluster. NOTE: The document count only includes live documents, not deleted
documents which have not yet been removed by the merge process. IMPORTANT: cat
Get a document count. Provides quick access to a document count for a data stream,
an index, or an entire cluster.n/ The document count only includes live documents,
not deleted documents which have not yet been removed by the merge process. CAT
APIs are only intended for human consumption using the command line or Kibana
console. They are not intended for use by applications. For application consumption,
use the count API.
use /_count endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html>`_
Expand Down Expand Up @@ -585,7 +586,7 @@ async def help(
v: t.Optional[bool] = None,
) -> TextApiResponse:
"""
Returns help for the Cat APIs.
Get CAT help. Returns help for the CAT APIs.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_
Expand Down Expand Up @@ -676,16 +677,16 @@ async def indices(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns high-level information about indices in a cluster, including backing
indices for data streams. IMPORTANT: cat APIs are only intended for human consumption
using the command line or Kibana console. They are not intended for use by applications.
For application consumption, use the get index API. Use the cat indices API to
get the following information for each index in a cluster: shard count; document
count; deleted document count; primary store size; total store size of all shards,
including shard replicas. These metrics are retrieved directly from Lucene, which
Elasticsearch uses internally to power indexing and search. As a result, all
document counts include hidden nested documents. To get an accurate count of
Elasticsearch documents, use the cat count or count APIs.
Get index information. Returns high-level information about indices in a cluster,
including backing indices for data streams. Use this request to get the following
information for each index in a cluster: - shard count - document count - deleted
document count - primary store size - total store size of all shards, including
shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch
uses internally to power indexing and search. As a result, all document counts
include hidden nested documents. To get an accurate count of Elasticsearch documents,
use the /_cat/count or _count endpoints. CAT APIs are only intended for human
consumption using the command line or Kibana console. They are not intended for
use by applications. For application consumption, use an index endpoint.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html>`_
Expand Down Expand Up @@ -894,10 +895,10 @@ async def ml_data_frame_analytics(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns configuration and usage information about data frame analytics jobs.
IMPORTANT: cat APIs are only intended for human consumption using the Kibana
console or command line. They are not intended for use by applications. For application
consumption, use the get data frame analytics jobs statistics API.
Get data frame analytics jobs. Returns configuration and usage information about
data frame analytics jobs. CAT APIs are only intended for human consumption using
the Kibana console or command line. They are not intended for use by applications.
For application consumption, use the /_ml/data_frame/analytics endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-dfanalytics.html>`_
Expand Down Expand Up @@ -1016,12 +1017,12 @@ async def ml_datafeeds(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns configuration and usage information about datafeeds. This API returns
a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled,
you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges
to use this API. IMPORTANT: cat APIs are only intended for human consumption
Get datafeeds. Returns configuration and usage information about datafeeds. This
API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
cluster privileges to use this API. CAT APIs are only intended for human consumption
using the Kibana console or command line. They are not intended for use by applications.
For application consumption, use the get datafeed statistics API.
For application consumption, use the /_ml/datafeeds endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-datafeeds.html>`_
Expand Down Expand Up @@ -1146,13 +1147,13 @@ async def ml_jobs(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns configuration and usage information for anomaly detection jobs. This
API returns a maximum of 10,000 jobs. If the Elasticsearch security features
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
cluster privileges to use this API. IMPORTANT: cat APIs are only intended for
Get anomaly detection jobs. Returns configuration and usage information for anomaly
detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch
security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`,
or `manage` cluster privileges to use this API. CAT APIs are only intended for
human consumption using the Kibana console or command line. They are not intended
for use by applications. For application consumption, use the get anomaly detection
job statistics API.
for use by applications. For application consumption, use the /_ml/anomaly_detectors
endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-anomaly-detectors.html>`_
Expand Down Expand Up @@ -1280,10 +1281,10 @@ async def ml_trained_models(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns configuration and usage information about inference trained models. IMPORTANT:
cat APIs are only intended for human consumption using the Kibana console or
command line. They are not intended for use by applications. For application
consumption, use the get trained models statistics API.
Get trained models. Returns configuration and usage information about inference
trained models. CAT APIs are only intended for human consumption using the Kibana
console or command line. They are not intended for use by applications. For application
consumption, use the /_ml/trained_models endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-trained-model.html>`_
Expand Down Expand Up @@ -2458,10 +2459,10 @@ async def transforms(
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Returns configuration and usage information about transforms. IMPORTANT: cat
APIs are only intended for human consumption using the Kibana console or command
line. They are not intended for use by applications. For application consumption,
use the get transform statistics API.
Get transforms. Returns configuration and usage information about transforms.
CAT APIs are only intended for human consumption using the Kibana console or
command line. They are not intended for use by applications. For application
consumption, use the /_transform endpoints.
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-transforms.html>`_
Expand Down
Loading

0 comments on commit 8355d56

Please sign in to comment.