@@ -42,7 +42,7 @@ async def delete(
42
42
the authenticated user that submitted the original search request; users that
43
43
have the `cancel_task` cluster privilege.
44
44
45
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16 /async-search.html>`_
45
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17 /async-search.html>`_
46
46
47
47
:param id: A unique identifier for the async search.
48
48
"""
@@ -90,7 +90,7 @@ async def get(
90
90
the results of a specific async search is restricted to the user or API key that
91
91
submitted it.
92
92
93
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16 /async-search.html>`_
93
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17 /async-search.html>`_
94
94
95
95
:param id: A unique identifier for the async search.
96
96
:param keep_alive: Specifies how long the async search should be available in
@@ -145,6 +145,7 @@ async def status(
145
145
error_trace : t .Optional [bool ] = None ,
146
146
filter_path : t .Optional [t .Union [str , t .Sequence [str ]]] = None ,
147
147
human : t .Optional [bool ] = None ,
148
+ keep_alive : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
148
149
pretty : t .Optional [bool ] = None ,
149
150
) -> ObjectApiResponse [t .Any ]:
150
151
"""
@@ -153,9 +154,12 @@ async def status(
153
154
security features are enabled, use of this API is restricted to the `monitoring_user`
154
155
role.
155
156
156
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16 /async-search.html>`_
157
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17 /async-search.html>`_
157
158
158
159
:param id: A unique identifier for the async search.
160
+ :param keep_alive: Specifies how long the async search needs to be available.
161
+ Ongoing async searches and any saved search results are deleted after this
162
+ period.
159
163
"""
160
164
if id in SKIP_IN_PATH :
161
165
raise ValueError ("Empty value passed for parameter 'id'" )
@@ -168,6 +172,8 @@ async def status(
168
172
__query ["filter_path" ] = filter_path
169
173
if human is not None :
170
174
__query ["human" ] = human
175
+ if keep_alive is not None :
176
+ __query ["keep_alive" ] = keep_alive
171
177
if pretty is not None :
172
178
__query ["pretty" ] = pretty
173
179
__headers = {"accept" : "application/json" }
@@ -258,7 +264,6 @@ async def submit(
258
264
ignore_throttled : t .Optional [bool ] = None ,
259
265
ignore_unavailable : t .Optional [bool ] = None ,
260
266
indices_boost : t .Optional [t .Sequence [t .Mapping [str , float ]]] = None ,
261
- keep_alive : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
262
267
keep_on_completion : t .Optional [bool ] = None ,
263
268
knn : t .Optional [
264
269
t .Union [t .Mapping [str , t .Any ], t .Sequence [t .Mapping [str , t .Any ]]]
@@ -269,7 +274,6 @@ async def submit(
269
274
min_score : t .Optional [float ] = None ,
270
275
pit : t .Optional [t .Mapping [str , t .Any ]] = None ,
271
276
post_filter : t .Optional [t .Mapping [str , t .Any ]] = None ,
272
- pre_filter_shard_size : t .Optional [int ] = None ,
273
277
preference : t .Optional [str ] = None ,
274
278
pretty : t .Optional [bool ] = None ,
275
279
profile : t .Optional [bool ] = None ,
@@ -283,7 +287,6 @@ async def submit(
283
287
routing : t .Optional [str ] = None ,
284
288
runtime_mappings : t .Optional [t .Mapping [str , t .Mapping [str , t .Any ]]] = None ,
285
289
script_fields : t .Optional [t .Mapping [str , t .Mapping [str , t .Any ]]] = None ,
286
- scroll : t .Optional [t .Union [str , t .Literal [- 1 ], t .Literal [0 ]]] = None ,
287
290
search_after : t .Optional [
288
291
t .Sequence [t .Union [None , bool , float , int , str , t .Any ]]
289
292
] = None ,
@@ -333,7 +336,7 @@ async def submit(
333
336
can be set by changing the `search.max_async_search_response_size` cluster level
334
337
setting.
335
338
336
- `<https://www.elastic.co/guide/en/elasticsearch/reference/8.16 /async-search.html>`_
339
+ `<https://www.elastic.co/guide/en/elasticsearch/reference/8.17 /async-search.html>`_
337
340
338
341
:param index: A comma-separated list of index names to search; use `_all` or
339
342
empty string to perform the operation on all indices
@@ -376,9 +379,6 @@ async def submit(
376
379
:param ignore_unavailable: Whether specified concrete indices should be ignored
377
380
when unavailable (missing or closed)
378
381
:param indices_boost: Boosts the _score of documents from specified indices.
379
- :param keep_alive: Specifies how long the async search needs to be available.
380
- Ongoing async searches and any saved search results are deleted after this
381
- period.
382
382
:param keep_on_completion: If `true`, results are stored for later retrieval
383
383
when the search completes within the `wait_for_completion_timeout`.
384
384
:param knn: Defines the approximate kNN search to run.
@@ -394,10 +394,6 @@ async def submit(
394
394
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
395
395
you cannot specify an <index> in the request path.
396
396
:param post_filter:
397
- :param pre_filter_shard_size: The default value cannot be changed, which enforces
398
- the execution of a pre-filter roundtrip to retrieve statistics from each
399
- shard so that the ones that surely don’t hold any document matching the query
400
- get skipped.
401
397
:param preference: Specify the node or shard the operation should be performed
402
398
on (default: random)
403
399
:param profile:
@@ -406,13 +402,13 @@ async def submit(
406
402
:param request_cache: Specify if request cache should be used for this request
407
403
or not, defaults to true
408
404
:param rescore:
409
- :param rest_total_hits_as_int:
405
+ :param rest_total_hits_as_int: Indicates whether hits.total should be rendered
406
+ as an integer or an object in the rest search response
410
407
:param routing: A comma-separated list of specific routing values
411
408
:param runtime_mappings: Defines one or more runtime fields in the search request.
412
409
These fields take precedence over mapped fields with the same name.
413
410
:param script_fields: Retrieve a script evaluation (based on different fields)
414
411
for each hit.
415
- :param scroll:
416
412
:param search_after:
417
413
:param search_type: Search operation type
418
414
:param seq_no_primary_term: If true, returns sequence number and primary term
@@ -509,8 +505,6 @@ async def submit(
509
505
__query ["ignore_throttled" ] = ignore_throttled
510
506
if ignore_unavailable is not None :
511
507
__query ["ignore_unavailable" ] = ignore_unavailable
512
- if keep_alive is not None :
513
- __query ["keep_alive" ] = keep_alive
514
508
if keep_on_completion is not None :
515
509
__query ["keep_on_completion" ] = keep_on_completion
516
510
if lenient is not None :
@@ -519,8 +513,6 @@ async def submit(
519
513
__query ["max_concurrent_shard_requests" ] = max_concurrent_shard_requests
520
514
if min_compatible_shard_node is not None :
521
515
__query ["min_compatible_shard_node" ] = min_compatible_shard_node
522
- if pre_filter_shard_size is not None :
523
- __query ["pre_filter_shard_size" ] = pre_filter_shard_size
524
516
if preference is not None :
525
517
__query ["preference" ] = preference
526
518
if pretty is not None :
@@ -533,8 +525,6 @@ async def submit(
533
525
__query ["rest_total_hits_as_int" ] = rest_total_hits_as_int
534
526
if routing is not None :
535
527
__query ["routing" ] = routing
536
- if scroll is not None :
537
- __query ["scroll" ] = scroll
538
528
if search_type is not None :
539
529
__query ["search_type" ] = search_type
540
530
if source_excludes is not None :
0 commit comments