Skip to content

Commit 3dce87d

Browse files
Auto-generated API code
1 parent 7310c34 commit 3dce87d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5904
-2764
lines changed

elasticsearch_serverless/_async/client/__init__.py

+1,388-519
Large diffs are not rendered by default.

elasticsearch_serverless/_async/client/async_search.py

+33-22
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ async def delete(
3636
pretty: t.Optional[bool] = None,
3737
) -> ObjectApiResponse[t.Any]:
3838
"""
39-
Delete an async search. If the asynchronous search is still running, it is cancelled.
40-
Otherwise, the saved search results are deleted. If the Elasticsearch security
41-
features are enabled, the deletion of a specific async search is restricted to:
42-
the authenticated user that submitted the original search request; users that
43-
have the `cancel_task` cluster privilege.
39+
.. raw:: html
40+
41+
<p>Delete an async search.</p>
42+
<p>If the asynchronous search is still running, it is cancelled.
43+
Otherwise, the saved search results are deleted.
44+
If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the <code>cancel_task</code> cluster privilege.</p>
45+
4446
4547
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
4648
@@ -85,10 +87,12 @@ async def get(
8587
] = None,
8688
) -> ObjectApiResponse[t.Any]:
8789
"""
88-
Get async search results. Retrieve the results of a previously submitted asynchronous
89-
search request. If the Elasticsearch security features are enabled, access to
90-
the results of a specific async search is restricted to the user or API key that
91-
submitted it.
90+
.. raw:: html
91+
92+
<p>Get async search results.</p>
93+
<p>Retrieve the results of a previously submitted asynchronous search request.
94+
If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.</p>
95+
9296
9397
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
9498
@@ -149,10 +153,12 @@ async def status(
149153
pretty: t.Optional[bool] = None,
150154
) -> ObjectApiResponse[t.Any]:
151155
"""
152-
Get the async search status. Get the status of a previously submitted async search
153-
request given its identifier, without retrieving search results. If the Elasticsearch
154-
security features are enabled, use of this API is restricted to the `monitoring_user`
155-
role.
156+
.. raw:: html
157+
158+
<p>Get the async search status.</p>
159+
<p>Get the status of a previously submitted async search request given its identifier, without retrieving search results.
160+
If the Elasticsearch security features are enabled, use of this API is restricted to the <code>monitoring_user</code> role.</p>
161+
156162
157163
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
158164
@@ -264,6 +270,7 @@ async def submit(
264270
ignore_throttled: t.Optional[bool] = None,
265271
ignore_unavailable: t.Optional[bool] = None,
266272
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
273+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
267274
keep_on_completion: t.Optional[bool] = None,
268275
knn: t.Optional[
269276
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -325,15 +332,14 @@ async def submit(
325332
body: t.Optional[t.Dict[str, t.Any]] = None,
326333
) -> ObjectApiResponse[t.Any]:
327334
"""
328-
Run an async search. When the primary sort of the results is an indexed field,
329-
shards get sorted based on minimum and maximum value that they hold for that
330-
field. Partial results become available following the sort criteria that was
331-
requested. Warning: Asynchronous search does not support scroll or search requests
332-
that include only the suggest section. By default, Elasticsearch does not allow
333-
you to store an async search response larger than 10Mb and an attempt to do this
334-
results in an error. The maximum allowed size for a stored async search response
335-
can be set by changing the `search.max_async_search_response_size` cluster level
336-
setting.
335+
.. raw:: html
336+
337+
<p>Run an async search.</p>
338+
<p>When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.</p>
339+
<p>Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.</p>
340+
<p>By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
341+
The maximum allowed size for a stored async search response can be set by changing the <code>search.max_async_search_response_size</code> cluster level setting.</p>
342+
337343
338344
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
339345
@@ -378,6 +384,9 @@ async def submit(
378384
:param ignore_unavailable: Whether specified concrete indices should be ignored
379385
when unavailable (missing or closed)
380386
:param indices_boost: Boosts the _score of documents from specified indices.
387+
:param keep_alive: Specifies how long the async search needs to be available.
388+
Ongoing async searches and any saved search results are deleted after this
389+
period.
381390
:param keep_on_completion: If `true`, results are stored for later retrieval
382391
when the search completes within the `wait_for_completion_timeout`.
383392
:param knn: Defines the approximate kNN search to run.
@@ -503,6 +512,8 @@ async def submit(
503512
__query["ignore_throttled"] = ignore_throttled
504513
if ignore_unavailable is not None:
505514
__query["ignore_unavailable"] = ignore_unavailable
515+
if keep_alive is not None:
516+
__query["keep_alive"] = keep_alive
506517
if keep_on_completion is not None:
507518
__query["keep_on_completion"] = keep_on_completion
508519
if lenient is not None:

0 commit comments

Comments
 (0)