Skip to content

Commit f8bf402

Browse files
Auto-generated API code
1 parent 4ee4650 commit f8bf402

File tree

14 files changed

+502
-352
lines changed

14 files changed

+502
-352
lines changed

elasticsearch/_async/client/__init__.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,7 @@ async def msearch(
27142714
human: t.Optional[bool] = None,
27152715
ignore_throttled: t.Optional[bool] = None,
27162716
ignore_unavailable: t.Optional[bool] = None,
2717+
include_named_queries_score: t.Optional[bool] = None,
27172718
max_concurrent_searches: t.Optional[int] = None,
27182719
max_concurrent_shard_requests: t.Optional[int] = None,
27192720
pre_filter_shard_size: t.Optional[int] = None,
@@ -2747,6 +2748,13 @@ async def msearch(
27472748
when frozen.
27482749
:param ignore_unavailable: If true, missing or closed indices are not included
27492750
in the response.
2751+
:param include_named_queries_score: Indicates whether hit.matched_queries should
2752+
be rendered as a map that includes the name of the matched query associated
2753+
with its score (true) or as an array containing the name of the matched queries
2754+
(false) This functionality reruns each named query on every hit in a search
2755+
response. Typically, this adds a small overhead to a request. However, using
2756+
computationally expensive named queries on a large number of hits may add
2757+
significant overhead.
27502758
:param max_concurrent_searches: Maximum number of concurrent searches the multi
27512759
search API can execute.
27522760
:param max_concurrent_shard_requests: Maximum number of concurrent shard requests
@@ -2796,6 +2804,8 @@ async def msearch(
27962804
__query["ignore_throttled"] = ignore_throttled
27972805
if ignore_unavailable is not None:
27982806
__query["ignore_unavailable"] = ignore_unavailable
2807+
if include_named_queries_score is not None:
2808+
__query["include_named_queries_score"] = include_named_queries_score
27992809
if max_concurrent_searches is not None:
28002810
__query["max_concurrent_searches"] = max_concurrent_searches
28012811
if max_concurrent_shard_requests is not None:
@@ -3709,6 +3719,7 @@ async def search(
37093719
human: t.Optional[bool] = None,
37103720
ignore_throttled: t.Optional[bool] = None,
37113721
ignore_unavailable: t.Optional[bool] = None,
3722+
include_named_queries_score: t.Optional[bool] = None,
37123723
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
37133724
knn: t.Optional[
37143725
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
@@ -3836,6 +3847,13 @@ async def search(
38363847
be ignored when frozen.
38373848
:param ignore_unavailable: If `false`, the request returns an error if it targets
38383849
a missing or closed index.
3850+
:param include_named_queries_score: Indicates whether hit.matched_queries should
3851+
be rendered as a map that includes the name of the matched query associated
3852+
with its score (true) or as an array containing the name of the matched queries
3853+
(false) This functionality reruns each named query on every hit in a search
3854+
response. Typically, this adds a small overhead to a request. However, using
3855+
computationally expensive named queries on a large number of hits may add
3856+
significant overhead.
38393857
:param indices_boost: Boosts the _score of documents from specified indices.
38403858
:param knn: Defines the approximate kNN search to run.
38413859
:param lenient: If `true`, format-based query failures (such as providing text
@@ -4017,6 +4035,8 @@ async def search(
40174035
__query["ignore_throttled"] = ignore_throttled
40184036
if ignore_unavailable is not None:
40194037
__query["ignore_unavailable"] = ignore_unavailable
4038+
if include_named_queries_score is not None:
4039+
__query["include_named_queries_score"] = include_named_queries_score
40204040
if lenient is not None:
40214041
__query["lenient"] = lenient
40224042
if max_concurrent_shard_requests is not None:
@@ -4963,6 +4983,7 @@ async def update_by_query(
49634983
pipeline: t.Optional[str] = None,
49644984
preference: t.Optional[str] = None,
49654985
pretty: t.Optional[bool] = None,
4986+
q: t.Optional[str] = None,
49664987
query: t.Optional[t.Mapping[str, t.Any]] = None,
49674988
refresh: t.Optional[bool] = None,
49684989
request_cache: t.Optional[bool] = None,
@@ -5029,6 +5050,7 @@ async def update_by_query(
50295050
parameter.
50305051
:param preference: Specifies the node or shard the operation should be performed
50315052
on. Random by default.
5053+
:param q: Query in the Lucene query string syntax.
50325054
:param query: Specifies the documents to update using the Query DSL.
50335055
:param refresh: If `true`, Elasticsearch refreshes affected shards to make the
50345056
operation visible to search.
@@ -5113,6 +5135,8 @@ async def update_by_query(
51135135
__query["preference"] = preference
51145136
if pretty is not None:
51155137
__query["pretty"] = pretty
5138+
if q is not None:
5139+
__query["q"] = q
51165140
if refresh is not None:
51175141
__query["refresh"] = refresh
51185142
if request_cache is not None:

elasticsearch/_async/client/cat.py

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

elasticsearch/_async/client/cluster.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ async def health(
427427
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html>`_
428428
429429
:param index: Comma-separated list of data streams, indices, and index aliases
430-
used to limit the request. Wildcard expressions (*) are supported. To target
430+
used to limit the request. Wildcard expressions (`*`) are supported. To target
431431
all data streams and indices in a cluster, omit this parameter or use _all
432-
or *.
432+
or `*`.
433433
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
434434
that are open, closed or both.
435435
:param level: Can be one of cluster, indices or shards. Controls the details
@@ -703,7 +703,7 @@ async def put_component_template(
703703
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html>`_
704704
705705
:param name: Name of the component template to create. Elasticsearch includes
706-
the following built-in component templates: `logs-mappings`; 'logs-settings`;
706+
the following built-in component templates: `logs-mappings`; `logs-settings`;
707707
`metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.
708708
Elastic Agent uses these templates to configure backing indices for its data
709709
streams. If you use Elastic Agent and want to overwrite one of these templates,

elasticsearch/_async/client/indices.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,9 @@ async def create_data_stream(
561561
error_trace: t.Optional[bool] = None,
562562
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
563563
human: t.Optional[bool] = None,
564+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
564565
pretty: t.Optional[bool] = None,
566+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
565567
) -> ObjectApiResponse[t.Any]:
566568
"""
567569
Create a data stream. Creates a data stream. You must have a matching index template
@@ -574,6 +576,11 @@ async def create_data_stream(
574576
`#`, `:`, or a space character; Cannot start with `-`, `_`, `+`, or `.ds-`;
575577
Cannot be `.` or `..`; Cannot be longer than 255 bytes. Multi-byte characters
576578
count towards this limit faster.
579+
:param master_timeout: Period to wait for a connection to the master node. If
580+
no response is received before the timeout expires, the request fails and
581+
returns an error.
582+
:param timeout: Period to wait for a response. If no response is received before
583+
the timeout expires, the request fails and returns an error.
577584
"""
578585
if name in SKIP_IN_PATH:
579586
raise ValueError("Empty value passed for parameter 'name'")
@@ -586,8 +593,12 @@ async def create_data_stream(
586593
__query["filter_path"] = filter_path
587594
if human is not None:
588595
__query["human"] = human
596+
if master_timeout is not None:
597+
__query["master_timeout"] = master_timeout
589598
if pretty is not None:
590599
__query["pretty"] = pretty
600+
if timeout is not None:
601+
__query["timeout"] = timeout
591602
__headers = {"accept": "application/json"}
592603
return await self.perform_request( # type: ignore[return-value]
593604
"PUT",
@@ -869,6 +880,7 @@ async def delete_data_stream(
869880
] = None,
870881
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
871882
human: t.Optional[bool] = None,
883+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
872884
pretty: t.Optional[bool] = None,
873885
) -> ObjectApiResponse[t.Any]:
874886
"""
@@ -880,6 +892,9 @@ async def delete_data_stream(
880892
are supported.
881893
:param expand_wildcards: Type of data stream that wildcard patterns can match.
882894
Supports comma-separated values,such as `open,hidden`.
895+
:param master_timeout: Period to wait for a connection to the master node. If
896+
no response is received before the timeout expires, the request fails and
897+
returns an error.
883898
"""
884899
if name in SKIP_IN_PATH:
885900
raise ValueError("Empty value passed for parameter 'name'")
@@ -894,6 +909,8 @@ async def delete_data_stream(
894909
__query["filter_path"] = filter_path
895910
if human is not None:
896911
__query["human"] = human
912+
if master_timeout is not None:
913+
__query["master_timeout"] = master_timeout
897914
if pretty is not None:
898915
__query["pretty"] = pretty
899916
__headers = {"accept": "application/json"}
@@ -1928,6 +1945,7 @@ async def get_data_lifecycle(
19281945
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
19291946
human: t.Optional[bool] = None,
19301947
include_defaults: t.Optional[bool] = None,
1948+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
19311949
pretty: t.Optional[bool] = None,
19321950
) -> ObjectApiResponse[t.Any]:
19331951
"""
@@ -1943,6 +1961,9 @@ async def get_data_lifecycle(
19431961
Supports comma-separated values, such as `open,hidden`. Valid values are:
19441962
`all`, `open`, `closed`, `hidden`, `none`.
19451963
:param include_defaults: If `true`, return all default settings in the response.
1964+
:param master_timeout: Period to wait for a connection to the master node. If
1965+
no response is received before the timeout expires, the request fails and
1966+
returns an error.
19461967
"""
19471968
if name in SKIP_IN_PATH:
19481969
raise ValueError("Empty value passed for parameter 'name'")
@@ -1959,6 +1980,8 @@ async def get_data_lifecycle(
19591980
__query["human"] = human
19601981
if include_defaults is not None:
19611982
__query["include_defaults"] = include_defaults
1983+
if master_timeout is not None:
1984+
__query["master_timeout"] = master_timeout
19621985
if pretty is not None:
19631986
__query["pretty"] = pretty
19641987
__headers = {"accept": "application/json"}
@@ -1988,6 +2011,7 @@ async def get_data_stream(
19882011
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
19892012
human: t.Optional[bool] = None,
19902013
include_defaults: t.Optional[bool] = None,
2014+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
19912015
pretty: t.Optional[bool] = None,
19922016
) -> ObjectApiResponse[t.Any]:
19932017
"""
@@ -2002,6 +2026,9 @@ async def get_data_stream(
20022026
Supports comma-separated values, such as `open,hidden`.
20032027
:param include_defaults: If true, returns all relevant default configurations
20042028
for the index template.
2029+
:param master_timeout: Period to wait for a connection to the master node. If
2030+
no response is received before the timeout expires, the request fails and
2031+
returns an error.
20052032
"""
20062033
__path_parts: t.Dict[str, str]
20072034
if name not in SKIP_IN_PATH:
@@ -2021,6 +2048,8 @@ async def get_data_stream(
20212048
__query["human"] = human
20222049
if include_defaults is not None:
20232050
__query["include_defaults"] = include_defaults
2051+
if master_timeout is not None:
2052+
__query["master_timeout"] = master_timeout
20242053
if pretty is not None:
20252054
__query["pretty"] = pretty
20262055
__headers = {"accept": "application/json"}
@@ -2435,7 +2464,9 @@ async def migrate_to_data_stream(
24352464
error_trace: t.Optional[bool] = None,
24362465
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
24372466
human: t.Optional[bool] = None,
2467+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
24382468
pretty: t.Optional[bool] = None,
2469+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
24392470
) -> ObjectApiResponse[t.Any]:
24402471
"""
24412472
Convert an index alias to a data stream. Converts an index alias to a data stream.
@@ -2450,6 +2481,11 @@ async def migrate_to_data_stream(
24502481
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
24512482
24522483
:param name: Name of the index alias to convert to a data stream.
2484+
:param master_timeout: Period to wait for a connection to the master node. If
2485+
no response is received before the timeout expires, the request fails and
2486+
returns an error.
2487+
:param timeout: Period to wait for a response. If no response is received before
2488+
the timeout expires, the request fails and returns an error.
24532489
"""
24542490
if name in SKIP_IN_PATH:
24552491
raise ValueError("Empty value passed for parameter 'name'")
@@ -2462,8 +2498,12 @@ async def migrate_to_data_stream(
24622498
__query["filter_path"] = filter_path
24632499
if human is not None:
24642500
__query["human"] = human
2501+
if master_timeout is not None:
2502+
__query["master_timeout"] = master_timeout
24652503
if pretty is not None:
24662504
__query["pretty"] = pretty
2505+
if timeout is not None:
2506+
__query["timeout"] = timeout
24672507
__headers = {"accept": "application/json"}
24682508
return await self.perform_request( # type: ignore[return-value]
24692509
"POST",
@@ -2620,6 +2660,7 @@ async def promote_data_stream(
26202660
error_trace: t.Optional[bool] = None,
26212661
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
26222662
human: t.Optional[bool] = None,
2663+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
26232664
pretty: t.Optional[bool] = None,
26242665
) -> ObjectApiResponse[t.Any]:
26252666
"""
@@ -2629,6 +2670,9 @@ async def promote_data_stream(
26292670
`<https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html>`_
26302671
26312672
:param name: The name of the data stream
2673+
:param master_timeout: Period to wait for a connection to the master node. If
2674+
no response is received before the timeout expires, the request fails and
2675+
returns an error.
26322676
"""
26332677
if name in SKIP_IN_PATH:
26342678
raise ValueError("Empty value passed for parameter 'name'")
@@ -2641,6 +2685,8 @@ async def promote_data_stream(
26412685
__query["filter_path"] = filter_path
26422686
if human is not None:
26432687
__query["human"] = human
2688+
if master_timeout is not None:
2689+
__query["master_timeout"] = master_timeout
26442690
if pretty is not None:
26452691
__query["pretty"] = pretty
26462692
__headers = {"accept": "application/json"}

0 commit comments

Comments
 (0)