Skip to content

Commit 0f40947

Browse files
author
Alisson Claudino
authored
Merge branch 'main' into main
2 parents becab2d + 8355d56 commit 0f40947

24 files changed

+1280
-556
lines changed

elasticsearch/_async/client/__init__.py

+35-32
Original file line numberDiff line numberDiff line change
@@ -638,8 +638,9 @@ async def bulk(
638638
] = None,
639639
) -> ObjectApiResponse[t.Any]:
640640
"""
641-
Performs multiple indexing or delete operations in a single API call. This reduces
642-
overhead and can greatly increase indexing speed.
641+
Bulk index or delete documents. Performs multiple indexing or delete operations
642+
in a single API call. This reduces overhead and can greatly increase indexing
643+
speed.
643644
644645
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html>`_
645646
@@ -995,9 +996,9 @@ async def create(
995996
] = None,
996997
) -> ObjectApiResponse[t.Any]:
997998
"""
998-
Adds a JSON document to the specified data stream or index and makes it searchable.
999-
If the target is an index and the document already exists, the request updates
1000-
the document and increments its version.
999+
Index a document. Adds a JSON document to the specified data stream or index
1000+
and makes it searchable. If the target is an index and the document already exists,
1001+
the request updates the document and increments its version.
10011002
10021003
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
10031004
@@ -1101,7 +1102,7 @@ async def delete(
11011102
] = None,
11021103
) -> ObjectApiResponse[t.Any]:
11031104
"""
1104-
Removes a JSON document from the specified index.
1105+
Delete a document. Removes a JSON document from the specified index.
11051106
11061107
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html>`_
11071108
@@ -1225,7 +1226,7 @@ async def delete_by_query(
12251226
body: t.Optional[t.Dict[str, t.Any]] = None,
12261227
) -> ObjectApiResponse[t.Any]:
12271228
"""
1228-
Deletes documents that match the specified query.
1229+
Delete documents. Deletes documents that match the specified query.
12291230
12301231
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html>`_
12311232
@@ -1451,7 +1452,7 @@ async def delete_script(
14511452
timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
14521453
) -> ObjectApiResponse[t.Any]:
14531454
"""
1454-
Deletes a stored script or search template.
1455+
Delete a script or search template. Deletes a stored script or search template.
14551456
14561457
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
14571458
@@ -1519,7 +1520,7 @@ async def exists(
15191520
] = None,
15201521
) -> HeadApiResponse:
15211522
"""
1522-
Checks if a document in an index exists.
1523+
Check a document. Checks if a specified document exists.
15231524
15241525
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
15251526
@@ -1620,7 +1621,7 @@ async def exists_source(
16201621
] = None,
16211622
) -> HeadApiResponse:
16221623
"""
1623-
Checks if a document's `_source` is stored.
1624+
Check for a document source. Checks if a document's `_source` is stored.
16241625
16251626
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
16261627
@@ -1720,8 +1721,8 @@ async def explain(
17201721
body: t.Optional[t.Dict[str, t.Any]] = None,
17211722
) -> ObjectApiResponse[t.Any]:
17221723
"""
1723-
Returns information about why a specific document matches (or doesn’t match)
1724-
a query.
1724+
Explain a document match result. Returns information about why a specific document
1725+
matches, or doesn’t match, a query.
17251726
17261727
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html>`_
17271728
@@ -1959,7 +1960,8 @@ async def get(
19591960
] = None,
19601961
) -> ObjectApiResponse[t.Any]:
19611962
"""
1962-
Returns a document.
1963+
Get a document by its ID. Retrieves the document with the specified ID from an
1964+
index.
19631965
19641966
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
19651967
@@ -2050,7 +2052,7 @@ async def get_script(
20502052
pretty: t.Optional[bool] = None,
20512053
) -> ObjectApiResponse[t.Any]:
20522054
"""
2053-
Retrieves a stored script or search template.
2055+
Get a script or search template. Retrieves a stored script or search template.
20542056
20552057
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
20562058
@@ -2182,7 +2184,7 @@ async def get_source(
21822184
] = None,
21832185
) -> ObjectApiResponse[t.Any]:
21842186
"""
2185-
Returns the source of a document.
2187+
Get a document's source. Returns the source of a document.
21862188
21872189
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html>`_
21882190
@@ -2340,9 +2342,9 @@ async def index(
23402342
] = None,
23412343
) -> ObjectApiResponse[t.Any]:
23422344
"""
2343-
Adds a JSON document to the specified data stream or index and makes it searchable.
2344-
If the target is an index and the document already exists, the request updates
2345-
the document and increments its version.
2345+
Index a document. Adds a JSON document to the specified data stream or index
2346+
and makes it searchable. If the target is an index and the document already exists,
2347+
the request updates the document and increments its version.
23462348
23472349
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html>`_
23482350
@@ -2451,7 +2453,7 @@ async def info(
24512453
pretty: t.Optional[bool] = None,
24522454
) -> ObjectApiResponse[t.Any]:
24532455
"""
2454-
Returns basic information about the cluster.
2456+
Get cluster info. Returns basic information about the cluster.
24552457
24562458
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/index.html>`_
24572459
"""
@@ -3131,7 +3133,8 @@ async def put_script(
31313133
body: t.Optional[t.Dict[str, t.Any]] = None,
31323134
) -> ObjectApiResponse[t.Any]:
31333135
"""
3134-
Creates or updates a stored script or search template.
3136+
Create or update a script or search template. Creates or updates a stored script
3137+
or search template.
31353138
31363139
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html>`_
31373140
@@ -3311,9 +3314,9 @@ async def reindex(
33113314
body: t.Optional[t.Dict[str, t.Any]] = None,
33123315
) -> ObjectApiResponse[t.Any]:
33133316
"""
3314-
Allows to copy documents from one index to another, optionally filtering the
3315-
source documents by a query, changing the destination index settings, or fetching
3316-
the documents from a remote cluster.
3317+
Reindex documents. Copies documents from a source to a destination. The source
3318+
can be any existing index, alias, or data stream. The destination must differ
3319+
from the source. For example, you cannot reindex a data stream into itself.
33173320
33183321
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html>`_
33193322
@@ -3528,7 +3531,7 @@ async def scripts_painless_execute(
35283531
body: t.Optional[t.Dict[str, t.Any]] = None,
35293532
) -> ObjectApiResponse[t.Any]:
35303533
"""
3531-
Runs a script and returns a result.
3534+
Run a script. Runs a script and returns a result.
35323535
35333536
`<https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html>`_
35343537
@@ -4198,8 +4201,7 @@ async def search_mvt(
41984201
body: t.Optional[t.Dict[str, t.Any]] = None,
41994202
) -> BinaryApiResponse:
42004203
"""
4201-
Searches a vector tile for geospatial values. Returns results as a binary Mapbox
4202-
vector tile.
4204+
Search a vector tile. Searches a vector tile for geospatial values.
42034205
42044206
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html>`_
42054207
@@ -4687,8 +4689,8 @@ async def termvectors(
46874689
body: t.Optional[t.Dict[str, t.Any]] = None,
46884690
) -> ObjectApiResponse[t.Any]:
46894691
"""
4690-
Returns information and statistics about terms in the fields of a particular
4691-
document.
4692+
Get term vector information. Returns information and statistics about terms in
4693+
the fields of a particular document.
46924694
46934695
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html>`_
46944696
@@ -4830,7 +4832,8 @@ async def update(
48304832
body: t.Optional[t.Dict[str, t.Any]] = None,
48314833
) -> ObjectApiResponse[t.Any]:
48324834
"""
4833-
Updates a document with a script or partial document.
4835+
Update a document. Updates a document by running a script or passing a partial
4836+
document.
48344837
48354838
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html>`_
48364839
@@ -4995,9 +4998,9 @@ async def update_by_query(
49954998
body: t.Optional[t.Dict[str, t.Any]] = None,
49964999
) -> ObjectApiResponse[t.Any]:
49975000
"""
4998-
Updates documents that match the specified query. If no query is specified, performs
4999-
an update on every document in the data stream or index without modifying the
5000-
source, which is useful for picking up mapping changes.
5001+
Update documents. Updates documents that match the specified query. If no query
5002+
is specified, performs an update on every document in the data stream or index
5003+
without modifying the source, which is useful for picking up mapping changes.
50015004
50025005
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html>`_
50035006

elasticsearch/_async/client/cat.py

+48-47
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ async def aliases(
5353
v: t.Optional[bool] = None,
5454
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
5555
"""
56-
Retrieves the cluster’s index aliases, including filter and routing information.
57-
The API does not return data stream aliases. IMPORTANT: cat APIs are only intended
56+
Get aliases. Retrieves the cluster’s index aliases, including filter and routing
57+
information. The API does not return data stream aliases. CAT APIs are only intended
5858
for human consumption using the command line or the Kibana console. They are
59-
not intended for use by applications. For application consumption, use the aliases
60-
API.
59+
not intended for use by applications. For application consumption, use the /_alias
60+
endpoints.
6161
6262
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html>`_
6363
@@ -231,11 +231,12 @@ async def component_templates(
231231
v: t.Optional[bool] = None,
232232
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
233233
"""
234-
Returns information about component templates in a cluster. Component templates
235-
are building blocks for constructing index templates that specify index mappings,
236-
settings, and aliases. IMPORTANT: cat APIs are only intended for human consumption
237-
using the command line or Kibana console. They are not intended for use by applications.
238-
For application consumption, use the get component template API.
234+
Get component templates. Returns information about component templates in a cluster.
235+
Component templates are building blocks for constructing index templates that
236+
specify index mappings, settings, and aliases. CAT APIs are only intended for
237+
human consumption using the command line or Kibana console. They are not intended
238+
for use by applications. For application consumption, use the /_component_template
239+
endpoints.
239240
240241
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-component-templates.html>`_
241242
@@ -316,12 +317,12 @@ async def count(
316317
v: t.Optional[bool] = None,
317318
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
318319
"""
319-
Provides quick access to a document count for a data stream, an index, or an
320-
entire cluster. NOTE: The document count only includes live documents, not deleted
321-
documents which have not yet been removed by the merge process. IMPORTANT: cat
320+
Get a document count. Provides quick access to a document count for a data stream,
321+
an index, or an entire cluster.n/ The document count only includes live documents,
322+
not deleted documents which have not yet been removed by the merge process. CAT
322323
APIs are only intended for human consumption using the command line or Kibana
323324
console. They are not intended for use by applications. For application consumption,
324-
use the count API.
325+
use /_count endpoints.
325326
326327
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html>`_
327328
@@ -585,7 +586,7 @@ async def help(
585586
v: t.Optional[bool] = None,
586587
) -> TextApiResponse:
587588
"""
588-
Returns help for the Cat APIs.
589+
Get CAT help. Returns help for the CAT APIs.
589590
590591
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_
591592
@@ -676,16 +677,16 @@ async def indices(
676677
v: t.Optional[bool] = None,
677678
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
678679
"""
679-
Returns high-level information about indices in a cluster, including backing
680-
indices for data streams. IMPORTANT: cat APIs are only intended for human consumption
681-
using the command line or Kibana console. They are not intended for use by applications.
682-
For application consumption, use the get index API. Use the cat indices API to
683-
get the following information for each index in a cluster: shard count; document
684-
count; deleted document count; primary store size; total store size of all shards,
685-
including shard replicas. These metrics are retrieved directly from Lucene, which
686-
Elasticsearch uses internally to power indexing and search. As a result, all
687-
document counts include hidden nested documents. To get an accurate count of
688-
Elasticsearch documents, use the cat count or count APIs.
680+
Get index information. Returns high-level information about indices in a cluster,
681+
including backing indices for data streams. Use this request to get the following
682+
information for each index in a cluster: - shard count - document count - deleted
683+
document count - primary store size - total store size of all shards, including
684+
shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch
685+
uses internally to power indexing and search. As a result, all document counts
686+
include hidden nested documents. To get an accurate count of Elasticsearch documents,
687+
use the /_cat/count or _count endpoints. CAT APIs are only intended for human
688+
consumption using the command line or Kibana console. They are not intended for
689+
use by applications. For application consumption, use an index endpoint.
689690
690691
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html>`_
691692
@@ -894,10 +895,10 @@ async def ml_data_frame_analytics(
894895
v: t.Optional[bool] = None,
895896
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
896897
"""
897-
Returns configuration and usage information about data frame analytics jobs.
898-
IMPORTANT: cat APIs are only intended for human consumption using the Kibana
899-
console or command line. They are not intended for use by applications. For application
900-
consumption, use the get data frame analytics jobs statistics API.
898+
Get data frame analytics jobs. Returns configuration and usage information about
899+
data frame analytics jobs. CAT APIs are only intended for human consumption using
900+
the Kibana console or command line. They are not intended for use by applications.
901+
For application consumption, use the /_ml/data_frame/analytics endpoints.
901902
902903
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-dfanalytics.html>`_
903904
@@ -1016,12 +1017,12 @@ async def ml_datafeeds(
10161017
v: t.Optional[bool] = None,
10171018
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
10181019
"""
1019-
Returns configuration and usage information about datafeeds. This API returns
1020-
a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled,
1021-
you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges
1022-
to use this API. IMPORTANT: cat APIs are only intended for human consumption
1020+
Get datafeeds. Returns configuration and usage information about datafeeds. This
1021+
API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features
1022+
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
1023+
cluster privileges to use this API. CAT APIs are only intended for human consumption
10231024
using the Kibana console or command line. They are not intended for use by applications.
1024-
For application consumption, use the get datafeed statistics API.
1025+
For application consumption, use the /_ml/datafeeds endpoints.
10251026
10261027
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-datafeeds.html>`_
10271028
@@ -1146,13 +1147,13 @@ async def ml_jobs(
11461147
v: t.Optional[bool] = None,
11471148
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
11481149
"""
1149-
Returns configuration and usage information for anomaly detection jobs. This
1150-
API returns a maximum of 10,000 jobs. If the Elasticsearch security features
1151-
are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
1152-
cluster privileges to use this API. IMPORTANT: cat APIs are only intended for
1150+
Get anomaly detection jobs. Returns configuration and usage information for anomaly
1151+
detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch
1152+
security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`,
1153+
or `manage` cluster privileges to use this API. CAT APIs are only intended for
11531154
human consumption using the Kibana console or command line. They are not intended
1154-
for use by applications. For application consumption, use the get anomaly detection
1155-
job statistics API.
1155+
for use by applications. For application consumption, use the /_ml/anomaly_detectors
1156+
endpoints.
11561157
11571158
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-anomaly-detectors.html>`_
11581159
@@ -1280,10 +1281,10 @@ async def ml_trained_models(
12801281
v: t.Optional[bool] = None,
12811282
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
12821283
"""
1283-
Returns configuration and usage information about inference trained models. IMPORTANT:
1284-
cat APIs are only intended for human consumption using the Kibana console or
1285-
command line. They are not intended for use by applications. For application
1286-
consumption, use the get trained models statistics API.
1284+
Get trained models. Returns configuration and usage information about inference
1285+
trained models. CAT APIs are only intended for human consumption using the Kibana
1286+
console or command line. They are not intended for use by applications. For application
1287+
consumption, use the /_ml/trained_models endpoints.
12871288
12881289
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-trained-model.html>`_
12891290
@@ -2458,10 +2459,10 @@ async def transforms(
24582459
v: t.Optional[bool] = None,
24592460
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
24602461
"""
2461-
Returns configuration and usage information about transforms. IMPORTANT: cat
2462-
APIs are only intended for human consumption using the Kibana console or command
2463-
line. They are not intended for use by applications. For application consumption,
2464-
use the get transform statistics API.
2462+
Get transforms. Returns configuration and usage information about transforms.
2463+
CAT APIs are only intended for human consumption using the Kibana console or
2464+
command line. They are not intended for use by applications. For application
2465+
consumption, use the /_transform endpoints.
24652466
24662467
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-transforms.html>`_
24672468

0 commit comments

Comments
 (0)