Skip to content

Commit d4b923b

Browse files
Auto-generated API code
1 parent 41f4ef7 commit d4b923b

File tree

14 files changed

+386
-250
lines changed

14 files changed

+386
-250
lines changed

elasticsearch_serverless/_async/client/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,7 @@ async def msearch(
22712271
human: t.Optional[bool] = None,
22722272
ignore_throttled: t.Optional[bool] = None,
22732273
ignore_unavailable: t.Optional[bool] = None,
2274+
include_named_queries_score: t.Optional[bool] = None,
22742275
max_concurrent_searches: t.Optional[int] = None,
22752276
max_concurrent_shard_requests: t.Optional[int] = None,
22762277
pre_filter_shard_size: t.Optional[int] = None,
@@ -2304,6 +2305,13 @@ async def msearch(
23042305
when frozen.
23052306
:param ignore_unavailable: If true, missing or closed indices are not included
23062307
in the response.
2308+
:param include_named_queries_score: Indicates whether hit.matched_queries should
2309+
be rendered as a map that includes the name of the matched query associated
2310+
with its score (true) or as an array containing the name of the matched queries
2311+
(false) This functionality reruns each named query on every hit in a search
2312+
response. Typically, this adds a small overhead to a request. However, using
2313+
computationally expensive named queries on a large number of hits may add
2314+
significant overhead.
23072315
:param max_concurrent_searches: Maximum number of concurrent searches the multi
23082316
search API can execute.
23092317
:param max_concurrent_shard_requests: Maximum number of concurrent shard requests
@@ -2353,6 +2361,8 @@ async def msearch(
23532361
__query["ignore_throttled"] = ignore_throttled
23542362
if ignore_unavailable is not None:
23552363
__query["ignore_unavailable"] = ignore_unavailable
2364+
if include_named_queries_score is not None:
2365+
__query["include_named_queries_score"] = include_named_queries_score
23562366
if max_concurrent_searches is not None:
23572367
__query["max_concurrent_searches"] = max_concurrent_searches
23582368
if max_concurrent_shard_requests is not None:
@@ -3221,6 +3231,7 @@ async def search(
32213231
human: t.Optional[bool] = None,
32223232
ignore_throttled: t.Optional[bool] = None,
32233233
ignore_unavailable: t.Optional[bool] = None,
3234+
include_named_queries_score: t.Optional[bool] = None,
32243235
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
32253236
knn: t.Optional[
32263237
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -3348,6 +3359,13 @@ async def search(
33483359
be ignored when frozen.
33493360
:param ignore_unavailable: If `false`, the request returns an error if it targets
33503361
a missing or closed index.
3362+
:param include_named_queries_score: Indicates whether hit.matched_queries should
3363+
be rendered as a map that includes the name of the matched query associated
3364+
with its score (true) or as an array containing the name of the matched queries
3365+
(false) This functionality reruns each named query on every hit in a search
3366+
response. Typically, this adds a small overhead to a request. However, using
3367+
computationally expensive named queries on a large number of hits may add
3368+
significant overhead.
33513369
:param indices_boost: Boosts the _score of documents from specified indices.
33523370
:param knn: Defines the approximate kNN search to run.
33533371
:param lenient: If `true`, format-based query failures (such as providing text
@@ -3529,6 +3547,8 @@ async def search(
35293547
__query["ignore_throttled"] = ignore_throttled
35303548
if ignore_unavailable is not None:
35313549
__query["ignore_unavailable"] = ignore_unavailable
3550+
if include_named_queries_score is not None:
3551+
__query["include_named_queries_score"] = include_named_queries_score
35323552
if lenient is not None:
35333553
__query["lenient"] = lenient
35343554
if max_concurrent_shard_requests is not None:
@@ -4389,6 +4409,7 @@ async def update_by_query(
43894409
pipeline: t.Optional[str] = None,
43904410
preference: t.Optional[str] = None,
43914411
pretty: t.Optional[bool] = None,
4412+
q: t.Optional[str] = None,
43924413
query: t.Optional[t.Mapping[str, t.Any]] = None,
43934414
refresh: t.Optional[bool] = None,
43944415
request_cache: t.Optional[bool] = None,
@@ -4455,6 +4476,7 @@ async def update_by_query(
44554476
parameter.
44564477
:param preference: Specifies the node or shard the operation should be performed
44574478
on. Random by default.
4479+
:param q: Query in the Lucene query string syntax.
44584480
:param query: Specifies the documents to update using the Query DSL.
44594481
:param refresh: If `true`, Elasticsearch refreshes affected shards to make the
44604482
operation visible to search.
@@ -4539,6 +4561,8 @@ async def update_by_query(
45394561
__query["preference"] = preference
45404562
if pretty is not None:
45414563
__query["pretty"] = pretty
4564+
if q is not None:
4565+
__query["q"] = q
45424566
if refresh is not None:
45434567
__query["refresh"] = refresh
45444568
if request_cache is not None:

elasticsearch_serverless/_async/client/cat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async def count(
223223
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
224224
"""
225225
Get a document count. Provides quick access to a document count for a data stream,
226-
an index, or an entire cluster.n/ The document count only includes live documents,
226+
an index, or an entire cluster. The document count only includes live documents,
227227
not deleted documents which have not yet been removed by the merge process. CAT
228228
APIs are only intended for human consumption using the command line or Kibana
229229
console. They are not intended for use by applications. For application consumption,

elasticsearch_serverless/_async/client/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async def put_component_template(
284284
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
285285
286286
:param name: Name of the component template to create. Elasticsearch includes
287-
the following built-in component templates: `logs-mappings`; 'logs-settings`;
287+
the following built-in component templates: `logs-mappings`; `logs-settings`;
288288
`metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.
289289
Elastic Agent uses these templates to configure backing indices for its data
290290
streams. If you use Elastic Agent and want to overwrite one of these templates,

elasticsearch_serverless/_async/client/indices.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ async def create_data_stream(
303303
error_trace: t.Optional[bool] = None,
304304
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
305305
human: t.Optional[bool] = None,
306+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
306307
pretty: t.Optional[bool] = None,
308+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
307309
) -> ObjectApiResponse[t.Any]:
308310
"""
309311
Create a data stream. Creates a data stream. You must have a matching index template
@@ -316,6 +318,11 @@ async def create_data_stream(
316318
`#`, `:`, or a space character; Cannot start with `-`, `_`, `+`, or `.ds-`;
317319
Cannot be `.` or `..`; Cannot be longer than 255 bytes. Multi-byte characters
318320
count towards this limit faster.
321+
:param master_timeout: Period to wait for a connection to the master node. If
322+
no response is received before the timeout expires, the request fails and
323+
returns an error.
324+
:param timeout: Period to wait for a response. If no response is received before
325+
the timeout expires, the request fails and returns an error.
319326
"""
320327
if name in SKIP_IN_PATH:
321328
raise ValueError("Empty value passed for parameter 'name'")
@@ -328,8 +335,12 @@ async def create_data_stream(
328335
__query["filter_path"] = filter_path
329336
if human is not None:
330337
__query["human"] = human
338+
if master_timeout is not None:
339+
__query["master_timeout"] = master_timeout
331340
if pretty is not None:
332341
__query["pretty"] = pretty
342+
if timeout is not None:
343+
__query["timeout"] = timeout
333344
__headers = {"accept": "application/json"}
334345
return await self.perform_request( # type: ignore[return-value]
335346
"PUT",
@@ -611,6 +622,7 @@ async def delete_data_stream(
611622
] = None,
612623
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
613624
human: t.Optional[bool] = None,
625+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
614626
pretty: t.Optional[bool] = None,
615627
) -> ObjectApiResponse[t.Any]:
616628
"""
@@ -622,6 +634,9 @@ async def delete_data_stream(
622634
are supported.
623635
:param expand_wildcards: Type of data stream that wildcard patterns can match.
624636
Supports comma-separated values,such as `open,hidden`.
637+
:param master_timeout: Period to wait for a connection to the master node. If
638+
no response is received before the timeout expires, the request fails and
639+
returns an error.
625640
"""
626641
if name in SKIP_IN_PATH:
627642
raise ValueError("Empty value passed for parameter 'name'")
@@ -636,6 +651,8 @@ async def delete_data_stream(
636651
__query["filter_path"] = filter_path
637652
if human is not None:
638653
__query["human"] = human
654+
if master_timeout is not None:
655+
__query["master_timeout"] = master_timeout
639656
if pretty is not None:
640657
__query["pretty"] = pretty
641658
__headers = {"accept": "application/json"}
@@ -1162,6 +1179,7 @@ async def get_data_lifecycle(
11621179
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
11631180
human: t.Optional[bool] = None,
11641181
include_defaults: t.Optional[bool] = None,
1182+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
11651183
pretty: t.Optional[bool] = None,
11661184
) -> ObjectApiResponse[t.Any]:
11671185
"""
@@ -1177,6 +1195,9 @@ async def get_data_lifecycle(
11771195
Supports comma-separated values, such as `open,hidden`. Valid values are:
11781196
`all`, `open`, `closed`, `hidden`, `none`.
11791197
:param include_defaults: If `true`, return all default settings in the response.
1198+
:param master_timeout: Period to wait for a connection to the master node. If
1199+
no response is received before the timeout expires, the request fails and
1200+
returns an error.
11801201
"""
11811202
if name in SKIP_IN_PATH:
11821203
raise ValueError("Empty value passed for parameter 'name'")
@@ -1193,6 +1214,8 @@ async def get_data_lifecycle(
11931214
__query["human"] = human
11941215
if include_defaults is not None:
11951216
__query["include_defaults"] = include_defaults
1217+
if master_timeout is not None:
1218+
__query["master_timeout"] = master_timeout
11961219
if pretty is not None:
11971220
__query["pretty"] = pretty
11981221
__headers = {"accept": "application/json"}
@@ -1222,6 +1245,7 @@ async def get_data_stream(
12221245
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
12231246
human: t.Optional[bool] = None,
12241247
include_defaults: t.Optional[bool] = None,
1248+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
12251249
pretty: t.Optional[bool] = None,
12261250
) -> ObjectApiResponse[t.Any]:
12271251
"""
@@ -1236,6 +1260,9 @@ async def get_data_stream(
12361260
Supports comma-separated values, such as `open,hidden`.
12371261
:param include_defaults: If true, returns all relevant default configurations
12381262
for the index template.
1263+
:param master_timeout: Period to wait for a connection to the master node. If
1264+
no response is received before the timeout expires, the request fails and
1265+
returns an error.
12391266
"""
12401267
__path_parts: t.Dict[str, str]
12411268
if name not in SKIP_IN_PATH:
@@ -1255,6 +1282,8 @@ async def get_data_stream(
12551282
__query["human"] = human
12561283
if include_defaults is not None:
12571284
__query["include_defaults"] = include_defaults
1285+
if master_timeout is not None:
1286+
__query["master_timeout"] = master_timeout
12581287
if pretty is not None:
12591288
__query["pretty"] = pretty
12601289
__headers = {"accept": "application/json"}
@@ -1522,7 +1551,9 @@ async def migrate_to_data_stream(
15221551
error_trace: t.Optional[bool] = None,
15231552
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
15241553
human: t.Optional[bool] = None,
1554+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
15251555
pretty: t.Optional[bool] = None,
1556+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
15261557
) -> ObjectApiResponse[t.Any]:
15271558
"""
15281559
Convert an index alias to a data stream. Converts an index alias to a data stream.
@@ -1537,6 +1568,11 @@ async def migrate_to_data_stream(
15371568
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
15381569
15391570
:param name: Name of the index alias to convert to a data stream.
1571+
:param master_timeout: Period to wait for a connection to the master node. If
1572+
no response is received before the timeout expires, the request fails and
1573+
returns an error.
1574+
:param timeout: Period to wait for a response. If no response is received before
1575+
the timeout expires, the request fails and returns an error.
15401576
"""
15411577
if name in SKIP_IN_PATH:
15421578
raise ValueError("Empty value passed for parameter 'name'")
@@ -1549,8 +1585,12 @@ async def migrate_to_data_stream(
15491585
__query["filter_path"] = filter_path
15501586
if human is not None:
15511587
__query["human"] = human
1588+
if master_timeout is not None:
1589+
__query["master_timeout"] = master_timeout
15521590
if pretty is not None:
15531591
__query["pretty"] = pretty
1592+
if timeout is not None:
1593+
__query["timeout"] = timeout
15541594
__headers = {"accept": "application/json"}
15551595
return await self.perform_request( # type: ignore[return-value]
15561596
"POST",

0 commit comments

Comments
 (0)