Skip to content

Commit 0a9abbc

Browse files
Auto-generated API code
1 parent b08c205 commit 0a9abbc

File tree

2 files changed

+64
-38
lines changed

2 files changed

+64
-38
lines changed

elasticsearch/_async/client/async_search.py

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def delete(
4242
4343
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
4444
45-
:param id: The async search ID
45+
:param id: A unique identifier for the async search.
4646
"""
4747
if id in SKIP_IN_PATH:
4848
raise ValueError("Empty value passed for parameter 'id'")
@@ -84,13 +84,21 @@ async def get(
8484
8585
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
8686
87-
:param id: The async search ID
88-
:param keep_alive: Specify the time interval in which the results (partial or
89-
final) for this search will be available
87+
:param id: A unique identifier for the async search.
88+
:param keep_alive: Specifies how long the async search should be available in
89+
the cluster. When not specified, the `keep_alive` set with the corresponding
90+
submit async request will be used. Otherwise, it is possible to override
91+
the value and extend the validity of the request. When this period expires,
92+
the search, if still running, is cancelled. If the search is completed, its
93+
saved results are deleted.
9094
:param typed_keys: Specify whether aggregation and suggester names should be
9195
prefixed by their respective types in the response
92-
:param wait_for_completion_timeout: Specify the time that the request should
93-
block waiting for the final response
96+
:param wait_for_completion_timeout: Specifies to wait for the search to be completed
97+
up until the provided timeout. Final results will be returned if available
98+
before the timeout expires, otherwise the currently available results will
99+
be returned once the timeout expires. By default no timeout is set meaning
100+
that the currently available results will be returned without any additional
101+
wait.
94102
"""
95103
if id in SKIP_IN_PATH:
96104
raise ValueError("Empty value passed for parameter 'id'")
@@ -133,7 +141,7 @@ async def status(
133141
134142
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
135143
136-
:param id: The async search ID
144+
:param id: A unique identifier for the async search.
137145
"""
138146
if id in SKIP_IN_PATH:
139147
raise ValueError("Empty value passed for parameter 'id'")
@@ -316,10 +324,11 @@ async def submit(
316324
:param analyze_wildcard: Specify whether wildcard and prefix queries should be
317325
analyzed (default: false)
318326
:param analyzer: The analyzer to use for the query string
319-
:param batched_reduce_size: The number of shard results that should be reduced
320-
at once on the coordinating node. This value should be used as the granularity
321-
at which progress results will be made available.
322-
:param ccs_minimize_roundtrips:
327+
:param batched_reduce_size: Affects how often partial results become available,
328+
which happens whenever shard results are reduced. A partial reduction is
329+
performed every time the coordinating node has received a certain number
330+
of new shard responses (5 by default).
331+
:param ccs_minimize_roundtrips: The default value is the only supported value.
323332
:param collapse:
324333
:param default_operator: The default operator for query string query (AND or
325334
OR)
@@ -344,11 +353,11 @@ async def submit(
344353
:param ignore_unavailable: Whether specified concrete indices should be ignored
345354
when unavailable (missing or closed)
346355
:param indices_boost: Boosts the _score of documents from specified indices.
347-
:param keep_alive: Update the time interval in which the results (partial or
348-
final) for this search will be available
349-
:param keep_on_completion: Control whether the response should be stored in the
350-
cluster if it completed within the provided [wait_for_completion] time (default:
351-
false)
356+
:param keep_alive: Specifies how long the async search needs to be available.
357+
Ongoing async searches and any saved search results are deleted after this
358+
period.
359+
:param keep_on_completion: If `true`, results are stored for later retrieval
360+
when the search completes within the `wait_for_completion_timeout`.
352361
:param knn: Defines the approximate kNN search to run.
353362
:param lenient: Specify whether format-based query failures (such as providing
354363
text to a numeric field) should be ignored
@@ -362,7 +371,10 @@ async def submit(
362371
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
363372
you cannot specify an <index> in the request path.
364373
:param post_filter:
365-
:param pre_filter_shard_size:
374+
:param pre_filter_shard_size: The default value cannot be changed, which enforces
375+
the execution of a pre-filter roundtrip to retrieve statistics from each
376+
shard so that the ones that surely don’t hold any document matching the query
377+
get skipped.
366378
:param preference: Specify the node or shard the operation should be performed
367379
on (default: random)
368380
:param profile:
@@ -422,8 +434,9 @@ async def submit(
422434
:param typed_keys: Specify whether aggregation and suggester names should be
423435
prefixed by their respective types in the response
424436
:param version: If true, returns document version as part of a hit.
425-
:param wait_for_completion_timeout: Specify the time that the request should
426-
block waiting for the final response
437+
:param wait_for_completion_timeout: Blocks and waits until the search is completed
438+
up to a certain timeout. When the async search completes within the timeout,
439+
the response won’t include the ID as the results are not stored in the cluster.
427440
"""
428441
if index not in SKIP_IN_PATH:
429442
__path = f"/{_quote(index)}/_async_search"

elasticsearch/_sync/client/async_search.py

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def delete(
4242
4343
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
4444
45-
:param id: The async search ID
45+
:param id: A unique identifier for the async search.
4646
"""
4747
if id in SKIP_IN_PATH:
4848
raise ValueError("Empty value passed for parameter 'id'")
@@ -84,13 +84,21 @@ def get(
8484
8585
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
8686
87-
:param id: The async search ID
88-
:param keep_alive: Specify the time interval in which the results (partial or
89-
final) for this search will be available
87+
:param id: A unique identifier for the async search.
88+
:param keep_alive: Specifies how long the async search should be available in
89+
the cluster. When not specified, the `keep_alive` set with the corresponding
90+
submit async request will be used. Otherwise, it is possible to override
91+
the value and extend the validity of the request. When this period expires,
92+
the search, if still running, is cancelled. If the search is completed, its
93+
saved results are deleted.
9094
:param typed_keys: Specify whether aggregation and suggester names should be
9195
prefixed by their respective types in the response
92-
:param wait_for_completion_timeout: Specify the time that the request should
93-
block waiting for the final response
96+
:param wait_for_completion_timeout: Specifies to wait for the search to be completed
97+
up until the provided timeout. Final results will be returned if available
98+
before the timeout expires, otherwise the currently available results will
99+
be returned once the timeout expires. By default no timeout is set meaning
100+
that the currently available results will be returned without any additional
101+
wait.
94102
"""
95103
if id in SKIP_IN_PATH:
96104
raise ValueError("Empty value passed for parameter 'id'")
@@ -133,7 +141,7 @@ def status(
133141
134142
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html>`_
135143
136-
:param id: The async search ID
144+
:param id: A unique identifier for the async search.
137145
"""
138146
if id in SKIP_IN_PATH:
139147
raise ValueError("Empty value passed for parameter 'id'")
@@ -316,10 +324,11 @@ def submit(
316324
:param analyze_wildcard: Specify whether wildcard and prefix queries should be
317325
analyzed (default: false)
318326
:param analyzer: The analyzer to use for the query string
319-
:param batched_reduce_size: The number of shard results that should be reduced
320-
at once on the coordinating node. This value should be used as the granularity
321-
at which progress results will be made available.
322-
:param ccs_minimize_roundtrips:
327+
:param batched_reduce_size: Affects how often partial results become available,
328+
which happens whenever shard results are reduced. A partial reduction is
329+
performed every time the coordinating node has received a certain number
330+
of new shard responses (5 by default).
331+
:param ccs_minimize_roundtrips: The default value is the only supported value.
323332
:param collapse:
324333
:param default_operator: The default operator for query string query (AND or
325334
OR)
@@ -344,11 +353,11 @@ def submit(
344353
:param ignore_unavailable: Whether specified concrete indices should be ignored
345354
when unavailable (missing or closed)
346355
:param indices_boost: Boosts the _score of documents from specified indices.
347-
:param keep_alive: Update the time interval in which the results (partial or
348-
final) for this search will be available
349-
:param keep_on_completion: Control whether the response should be stored in the
350-
cluster if it completed within the provided [wait_for_completion] time (default:
351-
false)
356+
:param keep_alive: Specifies how long the async search needs to be available.
357+
Ongoing async searches and any saved search results are deleted after this
358+
period.
359+
:param keep_on_completion: If `true`, results are stored for later retrieval
360+
when the search completes within the `wait_for_completion_timeout`.
352361
:param knn: Defines the approximate kNN search to run.
353362
:param lenient: Specify whether format-based query failures (such as providing
354363
text to a numeric field) should be ignored
@@ -362,7 +371,10 @@ def submit(
362371
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
363372
you cannot specify an <index> in the request path.
364373
:param post_filter:
365-
:param pre_filter_shard_size:
374+
:param pre_filter_shard_size: The default value cannot be changed, which enforces
375+
the execution of a pre-filter roundtrip to retrieve statistics from each
376+
shard so that the ones that surely don’t hold any document matching the query
377+
get skipped.
366378
:param preference: Specify the node or shard the operation should be performed
367379
on (default: random)
368380
:param profile:
@@ -422,8 +434,9 @@ def submit(
422434
:param typed_keys: Specify whether aggregation and suggester names should be
423435
prefixed by their respective types in the response
424436
:param version: If true, returns document version as part of a hit.
425-
:param wait_for_completion_timeout: Specify the time that the request should
426-
block waiting for the final response
437+
:param wait_for_completion_timeout: Blocks and waits until the search is completed
438+
up to a certain timeout. When the async search completes within the timeout,
439+
the response won’t include the ID as the results are not stored in the cluster.
427440
"""
428441
if index not in SKIP_IN_PATH:
429442
__path = f"/{_quote(index)}/_async_search"

0 commit comments

Comments
 (0)