Skip to content

Commit b113880

Browse files
Auto-generated code for 8.16 (#2693)
1 parent c3158f2 commit b113880

File tree

8 files changed

+442
-74
lines changed

8 files changed

+442
-74
lines changed

Diff for: elasticsearch/_async/client/__init__.py

+46-27
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,8 @@ async def clear_scroll(
743743
body: t.Optional[t.Dict[str, t.Any]] = None,
744744
) -> ObjectApiResponse[t.Any]:
745745
"""
746-
Clears the search context and results for a scrolling search.
746+
Clear a scrolling search. Clear the search context and results for a scrolling
747+
search.
747748
748749
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html>`_
749750
@@ -793,7 +794,11 @@ async def close_point_in_time(
793794
body: t.Optional[t.Dict[str, t.Any]] = None,
794795
) -> ObjectApiResponse[t.Any]:
795796
"""
796-
Closes a point-in-time.
797+
Close a point in time. A point in time must be opened explicitly before being
798+
used in search requests. The `keep_alive` parameter tells Elasticsearch how long
799+
it should persist. A point in time is automatically closed when the `keep_alive`
800+
period has elapsed. However, keeping points in time has a cost; close them as
801+
soon as they are no longer required for search requests.
797802
798803
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
799804
@@ -1844,10 +1849,11 @@ async def field_caps(
18441849
body: t.Optional[t.Dict[str, t.Any]] = None,
18451850
) -> ObjectApiResponse[t.Any]:
18461851
"""
1847-
The field capabilities API returns the information about the capabilities of
1848-
fields among multiple indices. The field capabilities API returns runtime fields
1849-
like any other field. For example, a runtime field with a type of keyword is
1850-
returned as any other field that belongs to the `keyword` family.
1852+
Get the field capabilities. Get information about the capabilities of fields
1853+
among multiple indices. For data streams, the API returns field capabilities
1854+
among the stream’s backing indices. It returns runtime fields like any other
1855+
field. For example, a runtime field with a type of keyword is returned the same
1856+
as any other field that belongs to the `keyword` family.
18511857
18521858
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html>`_
18531859
@@ -2490,6 +2496,7 @@ async def info(
24902496
),
24912497
parameter_aliases={"_source": "source"},
24922498
)
2499+
@_stability_warning(Stability.EXPERIMENTAL)
24932500
async def knn_search(
24942501
self,
24952502
*,
@@ -2510,7 +2517,15 @@ async def knn_search(
25102517
body: t.Optional[t.Dict[str, t.Any]] = None,
25112518
) -> ObjectApiResponse[t.Any]:
25122519
"""
2513-
Performs a kNN search.
2520+
Run a knn search. NOTE: The kNN search API has been replaced by the `knn` option
2521+
in the search API. Perform a k-nearest neighbor (kNN) search on a dense_vector
2522+
field and return the matching documents. Given a query vector, the API finds
2523+
the k closest vectors and returns those documents as search hits. Elasticsearch
2524+
uses the HNSW algorithm to support efficient kNN search. Like most kNN algorithms,
2525+
HNSW is an approximate method that sacrifices result accuracy for improved search
2526+
speed. This means the results returned are not always the true k closest neighbors.
2527+
The kNN search API supports restricting the search using a filter. The search
2528+
will return the top k documents that also match the filter query.
25142529
25152530
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
25162531
@@ -2873,7 +2888,7 @@ async def msearch_template(
28732888
typed_keys: t.Optional[bool] = None,
28742889
) -> ObjectApiResponse[t.Any]:
28752890
"""
2876-
Runs multiple templated searches with a single request.
2891+
Run multiple templated searches.
28772892
28782893
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-multi-search.html>`_
28792894
@@ -3083,13 +3098,15 @@ async def open_point_in_time(
30833098
body: t.Optional[t.Dict[str, t.Any]] = None,
30843099
) -> ObjectApiResponse[t.Any]:
30853100
"""
3086-
A search request by default executes against the most recent visible data of
3087-
the target indices, which is called point in time. Elasticsearch pit (point in
3088-
time) is a lightweight view into the state of the data as it existed when initiated.
3089-
In some cases, it’s preferred to perform multiple search requests using the same
3090-
point in time. For example, if refreshes happen between `search_after` requests,
3091-
then the results of those requests might not be consistent as changes happening
3092-
between searches are only visible to the more recent point in time.
3101+
Open a point in time. A search request by default runs against the most recent
3102+
visible data of the target indices, which is called point in time. Elasticsearch
3103+
pit (point in time) is a lightweight view into the state of the data as it existed
3104+
when initiated. In some cases, it’s preferred to perform multiple search requests
3105+
using the same point in time. For example, if refreshes happen between `search_after`
3106+
requests, then the results of those requests might not be consistent as changes
3107+
happening between searches are only visible to the more recent point in time.
3108+
A point in time must be opened explicitly before being used in search requests.
3109+
The `keep_alive` parameter tells Elasticsearch how long it should persist.
30933110
30943111
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html>`_
30953112
@@ -3256,8 +3273,8 @@ async def rank_eval(
32563273
body: t.Optional[t.Dict[str, t.Any]] = None,
32573274
) -> ObjectApiResponse[t.Any]:
32583275
"""
3259-
Enables you to evaluate the quality of ranked search results over a set of typical
3260-
search queries.
3276+
Evaluate ranked search results. Evaluate the quality of ranked search results
3277+
over a set of typical search queries.
32613278
32623279
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-rank-eval.html>`_
32633280
@@ -3501,7 +3518,7 @@ async def render_search_template(
35013518
body: t.Optional[t.Dict[str, t.Any]] = None,
35023519
) -> ObjectApiResponse[t.Any]:
35033520
"""
3504-
Renders a search template as a search request body.
3521+
Render a search template. Render a search template as a search request body.
35053522
35063523
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/render-search-template-api.html>`_
35073524
@@ -3833,9 +3850,9 @@ async def search(
38333850
body: t.Optional[t.Dict[str, t.Any]] = None,
38343851
) -> ObjectApiResponse[t.Any]:
38353852
"""
3836-
Returns search hits that match the query defined in the request. You can provide
3837-
search queries using the `q` query string parameter or the request body. If both
3838-
are specified, only the query parameter is used.
3853+
Run a search. Get search hits that match the query defined in the request. You
3854+
can provide search queries using the `q` query string parameter or the request
3855+
body. If both are specified, only the query parameter is used.
38393856
38403857
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-search.html>`_
38413858
@@ -4265,7 +4282,7 @@ async def search_mvt(
42654282
body: t.Optional[t.Dict[str, t.Any]] = None,
42664283
) -> BinaryApiResponse:
42674284
"""
4268-
Search a vector tile. Searches a vector tile for geospatial values.
4285+
Search a vector tile. Search a vector tile for geospatial values.
42694286
42704287
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-vector-tile-api.html>`_
42714288
@@ -4419,8 +4436,10 @@ async def search_shards(
44194436
routing: t.Optional[str] = None,
44204437
) -> ObjectApiResponse[t.Any]:
44214438
"""
4422-
Returns information about the indices and shards that a search request would
4423-
be executed against.
4439+
Get the search shards. Get the indices and shards that a search request would
4440+
be run against. This information can be useful for working out issues or planning
4441+
optimizations with routing and shard preferences. When filtered aliases are used,
4442+
the filter is returned as part of the indices section.
44244443
44254444
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-shards.html>`_
44264445
@@ -4521,7 +4540,7 @@ async def search_template(
45214540
body: t.Optional[t.Dict[str, t.Any]] = None,
45224541
) -> ObjectApiResponse[t.Any]:
45234542
"""
4524-
Runs a search with a search template.
4543+
Run a search with a search template.
45254544
45264545
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-template.html>`_
45274546
@@ -4759,8 +4778,8 @@ async def termvectors(
47594778
body: t.Optional[t.Dict[str, t.Any]] = None,
47604779
) -> ObjectApiResponse[t.Any]:
47614780
"""
4762-
Get term vector information. Returns information and statistics about terms in
4763-
the fields of a particular document.
4781+
Get term vector information. Get information and statistics about terms in the
4782+
fields of a particular document.
47644783
47654784
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-termvectors.html>`_
47664785

Diff for: elasticsearch/_async/client/async_search.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ async def status(
148148
pretty: t.Optional[bool] = None,
149149
) -> ObjectApiResponse[t.Any]:
150150
"""
151-
Get async search status. Retrieve the status of a previously submitted async
152-
search request given its identifier, without retrieving search results. If the
153-
Elasticsearch security features are enabled, use of this API is restricted to
154-
the `monitoring_user` role.
151+
Get the async search status. Get the status of a previously submitted async search
152+
request given its identifier, without retrieving search results. If the Elasticsearch
153+
security features are enabled, use of this API is restricted to the `monitoring_user`
154+
role.
155155
156156
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html>`_
157157

Diff for: elasticsearch/_async/client/autoscaling.py

+19-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async def delete_autoscaling_policy(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
39+
Delete an autoscaling policy. NOTE: This feature is designed for indirect use
40+
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
4041
Direct use is not supported.
4142
4243
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-delete-autoscaling-policy.html>`_
@@ -76,8 +77,18 @@ async def get_autoscaling_capacity(
7677
pretty: t.Optional[bool] = None,
7778
) -> ObjectApiResponse[t.Any]:
7879
"""
79-
Gets the current autoscaling capacity based on the configured autoscaling policy.
80-
Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
80+
Get the autoscaling capacity. NOTE: This feature is designed for indirect use
81+
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
82+
Direct use is not supported. This API gets the current autoscaling capacity based
83+
on the configured autoscaling policy. It will return information to size the
84+
cluster appropriately to the current workload. The `required_capacity` is calculated
85+
as the maximum of the `required_capacity` result of all individual deciders that
86+
are enabled for the policy. The operator should verify that the `current_nodes`
87+
match the operator’s knowledge of the cluster to avoid making autoscaling decisions
88+
based on stale or incomplete information. The response contains decider-specific
89+
information you can use to diagnose how and why autoscaling determined a certain
90+
capacity was required. This information is provided for diagnosis only. Do not
91+
use this information to make autoscaling decisions.
8192
8293
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
8394
"""
@@ -113,7 +124,8 @@ async def get_autoscaling_policy(
113124
pretty: t.Optional[bool] = None,
114125
) -> ObjectApiResponse[t.Any]:
115126
"""
116-
Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
127+
Get an autoscaling policy. NOTE: This feature is designed for indirect use by
128+
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
117129
Direct use is not supported.
118130
119131
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html>`_
@@ -158,8 +170,9 @@ async def put_autoscaling_policy(
158170
pretty: t.Optional[bool] = None,
159171
) -> ObjectApiResponse[t.Any]:
160172
"""
161-
Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK.
162-
Direct use is not supported.
173+
Create or update an autoscaling policy. NOTE: This feature is designed for indirect
174+
use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on
175+
Kubernetes. Direct use is not supported.
163176
164177
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-put-autoscaling-policy.html>`_
165178

0 commit comments

Comments
 (0)