elasticsearch9 9.2.1__py3-none-any.whl → 9.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch9/_async/client/__init__.py +44 -40
- elasticsearch9/_async/client/async_search.py +4 -3
- elasticsearch9/_async/client/cat.py +163 -8
- elasticsearch9/_async/client/cluster.py +66 -34
- elasticsearch9/_async/client/eql.py +7 -6
- elasticsearch9/_async/client/esql.py +157 -8
- elasticsearch9/_async/client/fleet.py +1 -1
- elasticsearch9/_async/client/graph.py +1 -1
- elasticsearch9/_async/client/indices.py +436 -17
- elasticsearch9/_async/client/inference.py +299 -9
- elasticsearch9/_async/client/ml.py +7 -3
- elasticsearch9/_async/client/nodes.py +167 -5
- elasticsearch9/_async/client/project.py +9 -1
- elasticsearch9/_async/client/security.py +26 -3
- elasticsearch9/_async/client/snapshot.py +1 -1
- elasticsearch9/_async/client/sql.py +7 -6
- elasticsearch9/_async/client/streams.py +0 -1
- elasticsearch9/_async/client/text_structure.py +3 -3
- elasticsearch9/_sync/client/__init__.py +44 -40
- elasticsearch9/_sync/client/async_search.py +4 -3
- elasticsearch9/_sync/client/cat.py +163 -8
- elasticsearch9/_sync/client/cluster.py +66 -34
- elasticsearch9/_sync/client/eql.py +7 -6
- elasticsearch9/_sync/client/esql.py +157 -8
- elasticsearch9/_sync/client/fleet.py +1 -1
- elasticsearch9/_sync/client/graph.py +1 -1
- elasticsearch9/_sync/client/indices.py +436 -17
- elasticsearch9/_sync/client/inference.py +299 -9
- elasticsearch9/_sync/client/ml.py +7 -3
- elasticsearch9/_sync/client/nodes.py +167 -5
- elasticsearch9/_sync/client/project.py +9 -1
- elasticsearch9/_sync/client/project_routing.py +264 -0
- elasticsearch9/_sync/client/security.py +26 -3
- elasticsearch9/_sync/client/snapshot.py +1 -1
- elasticsearch9/_sync/client/sql.py +7 -6
- elasticsearch9/_sync/client/streams.py +0 -1
- elasticsearch9/_sync/client/text_structure.py +3 -3
- elasticsearch9/_version.py +2 -2
- elasticsearch9/dsl/__init__.py +4 -0
- elasticsearch9/dsl/aggs.py +6 -6
- elasticsearch9/dsl/field.py +91 -7
- elasticsearch9/dsl/query.py +2 -2
- elasticsearch9/dsl/response/__init__.py +2 -0
- elasticsearch9/dsl/types.py +66 -7
- elasticsearch9/dsl/utils.py +11 -2
- elasticsearch9/esql/functions.py +924 -250
- elasticsearch9/helpers/__init__.py +2 -0
- elasticsearch9/helpers/actions.py +21 -0
- elasticsearch9/helpers/vectorstore/_async/vectorstore.py +3 -0
- elasticsearch9/helpers/vectorstore/_sync/vectorstore.py +3 -0
- {elasticsearch9-9.2.1.dist-info → elasticsearch9-9.3.0.dist-info}/METADATA +2 -1
- {elasticsearch9-9.2.1.dist-info → elasticsearch9-9.3.0.dist-info}/RECORD +55 -54
- {elasticsearch9-9.2.1.dist-info → elasticsearch9-9.3.0.dist-info}/WHEEL +0 -0
- {elasticsearch9-9.2.1.dist-info → elasticsearch9-9.3.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch9-9.2.1.dist-info → elasticsearch9-9.3.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -555,7 +555,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
555
555
|
] = None,
|
|
556
556
|
require_alias: t.Optional[bool] = None,
|
|
557
557
|
require_data_stream: t.Optional[bool] = None,
|
|
558
|
-
routing: t.Optional[str] = None,
|
|
558
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
559
559
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
560
560
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
561
561
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -868,7 +868,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
868
868
|
)
|
|
869
869
|
|
|
870
870
|
@_rewrite_parameters(
|
|
871
|
-
body_fields=("query"
|
|
871
|
+
body_fields=("project_routing", "query"),
|
|
872
872
|
)
|
|
873
873
|
async def count(
|
|
874
874
|
self,
|
|
@@ -899,7 +899,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
899
899
|
project_routing: t.Optional[str] = None,
|
|
900
900
|
q: t.Optional[str] = None,
|
|
901
901
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
902
|
-
routing: t.Optional[str] = None,
|
|
902
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
903
903
|
terminate_after: t.Optional[int] = None,
|
|
904
904
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
905
905
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -951,10 +951,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
951
951
|
in the result.
|
|
952
952
|
:param preference: The node or shard the operation should be performed on. By
|
|
953
953
|
default, it is random.
|
|
954
|
-
:param project_routing: Specifies a subset of projects to target
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
_alias:
|
|
954
|
+
:param project_routing: Specifies a subset of projects to target using project
|
|
955
|
+
metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
|
|
956
|
+
the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
|
|
957
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
958
958
|
:param q: The query in Lucene query string syntax. This parameter cannot be used
|
|
959
959
|
with a request body.
|
|
960
960
|
:param query: Defines the search query using Query DSL. A request body query
|
|
@@ -1007,8 +1007,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1007
1007
|
__query["preference"] = preference
|
|
1008
1008
|
if pretty is not None:
|
|
1009
1009
|
__query["pretty"] = pretty
|
|
1010
|
-
if project_routing is not None:
|
|
1011
|
-
__query["project_routing"] = project_routing
|
|
1012
1010
|
if q is not None:
|
|
1013
1011
|
__query["q"] = q
|
|
1014
1012
|
if routing is not None:
|
|
@@ -1016,6 +1014,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1016
1014
|
if terminate_after is not None:
|
|
1017
1015
|
__query["terminate_after"] = terminate_after
|
|
1018
1016
|
if not __body:
|
|
1017
|
+
if project_routing is not None:
|
|
1018
|
+
__body["project_routing"] = project_routing
|
|
1019
1019
|
if query is not None:
|
|
1020
1020
|
__body["query"] = query
|
|
1021
1021
|
if not __body:
|
|
@@ -1054,7 +1054,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1054
1054
|
] = None,
|
|
1055
1055
|
require_alias: t.Optional[bool] = None,
|
|
1056
1056
|
require_data_stream: t.Optional[bool] = None,
|
|
1057
|
-
routing: t.Optional[str] = None,
|
|
1057
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1058
1058
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1059
1059
|
version: t.Optional[int] = None,
|
|
1060
1060
|
version_type: t.Optional[
|
|
@@ -1233,7 +1233,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1233
1233
|
refresh: t.Optional[
|
|
1234
1234
|
t.Union[bool, str, t.Literal["false", "true", "wait_for"]]
|
|
1235
1235
|
] = None,
|
|
1236
|
-
routing: t.Optional[str] = None,
|
|
1236
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1237
1237
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1238
1238
|
version: t.Optional[int] = None,
|
|
1239
1239
|
version_type: t.Optional[
|
|
@@ -1376,7 +1376,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1376
1376
|
refresh: t.Optional[bool] = None,
|
|
1377
1377
|
request_cache: t.Optional[bool] = None,
|
|
1378
1378
|
requests_per_second: t.Optional[float] = None,
|
|
1379
|
-
routing: t.Optional[str] = None,
|
|
1379
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1380
1380
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1381
1381
|
scroll_size: t.Optional[int] = None,
|
|
1382
1382
|
search_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
@@ -1772,7 +1772,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1772
1772
|
pretty: t.Optional[bool] = None,
|
|
1773
1773
|
realtime: t.Optional[bool] = None,
|
|
1774
1774
|
refresh: t.Optional[bool] = None,
|
|
1775
|
-
routing: t.Optional[str] = None,
|
|
1775
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1776
1776
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
1777
1777
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1778
1778
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -1902,7 +1902,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1902
1902
|
pretty: t.Optional[bool] = None,
|
|
1903
1903
|
realtime: t.Optional[bool] = None,
|
|
1904
1904
|
refresh: t.Optional[bool] = None,
|
|
1905
|
-
routing: t.Optional[str] = None,
|
|
1905
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1906
1906
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
1907
1907
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1908
1908
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -2013,7 +2013,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2013
2013
|
pretty: t.Optional[bool] = None,
|
|
2014
2014
|
q: t.Optional[str] = None,
|
|
2015
2015
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
2016
|
-
routing: t.Optional[str] = None,
|
|
2016
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2017
2017
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
2018
2018
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2019
2019
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -2124,7 +2124,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2124
2124
|
)
|
|
2125
2125
|
|
|
2126
2126
|
@_rewrite_parameters(
|
|
2127
|
-
body_fields=("fields", "index_filter", "runtime_mappings"),
|
|
2127
|
+
body_fields=("fields", "index_filter", "project_routing", "runtime_mappings"),
|
|
2128
2128
|
)
|
|
2129
2129
|
async def field_caps(
|
|
2130
2130
|
self,
|
|
@@ -2142,7 +2142,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2142
2142
|
] = None,
|
|
2143
2143
|
fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2144
2144
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2145
|
-
filters: t.Optional[str] = None,
|
|
2145
|
+
filters: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2146
2146
|
human: t.Optional[bool] = None,
|
|
2147
2147
|
ignore_unavailable: t.Optional[bool] = None,
|
|
2148
2148
|
include_empty_fields: t.Optional[bool] = None,
|
|
@@ -2235,8 +2235,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2235
2235
|
__query["include_unmapped"] = include_unmapped
|
|
2236
2236
|
if pretty is not None:
|
|
2237
2237
|
__query["pretty"] = pretty
|
|
2238
|
-
if project_routing is not None:
|
|
2239
|
-
__query["project_routing"] = project_routing
|
|
2240
2238
|
if types is not None:
|
|
2241
2239
|
__query["types"] = types
|
|
2242
2240
|
if not __body:
|
|
@@ -2244,6 +2242,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2244
2242
|
__body["fields"] = fields
|
|
2245
2243
|
if index_filter is not None:
|
|
2246
2244
|
__body["index_filter"] = index_filter
|
|
2245
|
+
if project_routing is not None:
|
|
2246
|
+
__body["project_routing"] = project_routing
|
|
2247
2247
|
if runtime_mappings is not None:
|
|
2248
2248
|
__body["runtime_mappings"] = runtime_mappings
|
|
2249
2249
|
if not __body:
|
|
@@ -2282,7 +2282,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2282
2282
|
pretty: t.Optional[bool] = None,
|
|
2283
2283
|
realtime: t.Optional[bool] = None,
|
|
2284
2284
|
refresh: t.Optional[bool] = None,
|
|
2285
|
-
routing: t.Optional[str] = None,
|
|
2285
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2286
2286
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
2287
2287
|
source_exclude_vectors: t.Optional[bool] = None,
|
|
2288
2288
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -2574,7 +2574,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2574
2574
|
pretty: t.Optional[bool] = None,
|
|
2575
2575
|
realtime: t.Optional[bool] = None,
|
|
2576
2576
|
refresh: t.Optional[bool] = None,
|
|
2577
|
-
routing: t.Optional[str] = None,
|
|
2577
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2578
2578
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
2579
2579
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2580
2580
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -2756,7 +2756,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2756
2756
|
] = None,
|
|
2757
2757
|
require_alias: t.Optional[bool] = None,
|
|
2758
2758
|
require_data_stream: t.Optional[bool] = None,
|
|
2759
|
-
routing: t.Optional[str] = None,
|
|
2759
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2760
2760
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2761
2761
|
version: t.Optional[int] = None,
|
|
2762
2762
|
version_type: t.Optional[
|
|
@@ -3038,7 +3038,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3038
3038
|
pretty: t.Optional[bool] = None,
|
|
3039
3039
|
realtime: t.Optional[bool] = None,
|
|
3040
3040
|
refresh: t.Optional[bool] = None,
|
|
3041
|
-
routing: t.Optional[str] = None,
|
|
3041
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3042
3042
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
3043
3043
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3044
3044
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -3175,7 +3175,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3175
3175
|
pretty: t.Optional[bool] = None,
|
|
3176
3176
|
project_routing: t.Optional[str] = None,
|
|
3177
3177
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3178
|
-
routing: t.Optional[str] = None,
|
|
3178
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3179
3179
|
search_type: t.Optional[
|
|
3180
3180
|
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
3181
3181
|
] = None,
|
|
@@ -3441,7 +3441,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3441
3441
|
preference: t.Optional[str] = None,
|
|
3442
3442
|
pretty: t.Optional[bool] = None,
|
|
3443
3443
|
realtime: t.Optional[bool] = None,
|
|
3444
|
-
routing: t.Optional[str] = None,
|
|
3444
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3445
3445
|
term_statistics: t.Optional[bool] = None,
|
|
3446
3446
|
version: t.Optional[int] = None,
|
|
3447
3447
|
version_type: t.Optional[
|
|
@@ -3546,7 +3546,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3546
3546
|
)
|
|
3547
3547
|
|
|
3548
3548
|
@_rewrite_parameters(
|
|
3549
|
-
body_fields=("index_filter",),
|
|
3549
|
+
body_fields=("index_filter", "project_routing"),
|
|
3550
3550
|
)
|
|
3551
3551
|
async def open_point_in_time(
|
|
3552
3552
|
self,
|
|
@@ -3571,7 +3571,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3571
3571
|
preference: t.Optional[str] = None,
|
|
3572
3572
|
pretty: t.Optional[bool] = None,
|
|
3573
3573
|
project_routing: t.Optional[str] = None,
|
|
3574
|
-
routing: t.Optional[str] = None,
|
|
3574
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3575
3575
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3576
3576
|
) -> ObjectApiResponse[t.Any]:
|
|
3577
3577
|
"""
|
|
@@ -3663,13 +3663,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3663
3663
|
__query["preference"] = preference
|
|
3664
3664
|
if pretty is not None:
|
|
3665
3665
|
__query["pretty"] = pretty
|
|
3666
|
-
if project_routing is not None:
|
|
3667
|
-
__query["project_routing"] = project_routing
|
|
3668
3666
|
if routing is not None:
|
|
3669
3667
|
__query["routing"] = routing
|
|
3670
3668
|
if not __body:
|
|
3671
3669
|
if index_filter is not None:
|
|
3672
3670
|
__body["index_filter"] = index_filter
|
|
3671
|
+
if project_routing is not None:
|
|
3672
|
+
__body["project_routing"] = project_routing
|
|
3673
3673
|
if not __body:
|
|
3674
3674
|
__body = None # type: ignore[assignment]
|
|
3675
3675
|
__headers = {"accept": "application/json"}
|
|
@@ -3789,7 +3789,9 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3789
3789
|
ignore_unavailable: t.Optional[bool] = None,
|
|
3790
3790
|
metric: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3791
3791
|
pretty: t.Optional[bool] = None,
|
|
3792
|
-
search_type: t.Optional[
|
|
3792
|
+
search_type: t.Optional[
|
|
3793
|
+
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
3794
|
+
] = None,
|
|
3793
3795
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3794
3796
|
) -> ObjectApiResponse[t.Any]:
|
|
3795
3797
|
"""
|
|
@@ -3909,7 +3911,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3909
3911
|
<li>To automatically create a data stream or index with a reindex API request, you must have the <code>auto_configure</code>, <code>create_index</code>, or <code>manage</code> index privilege for the destination data stream, index, or alias.</li>
|
|
3910
3912
|
<li>If reindexing from a remote cluster, the <code>source.remote.user</code> must have the <code>monitor</code> cluster privilege and the <code>read</code> index privilege for the source data stream, index, or alias.</li>
|
|
3911
3913
|
</ul>
|
|
3912
|
-
<p>If reindexing from a remote cluster, you must explicitly allow the remote host
|
|
3914
|
+
<p>If reindexing from a remote cluster into a cluster using Elastic Stack, you must explicitly allow the remote host using the <code>reindex.remote.whitelist</code> node setting on the destination cluster.
|
|
3915
|
+
If reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.
|
|
3913
3916
|
Automatic data stream creation requires a matching index template with data stream enabled.</p>
|
|
3914
3917
|
<p>The <code>dest</code> element can be configured like the index API to control optimistic concurrency control.
|
|
3915
3918
|
Omitting <code>version_type</code> or setting it to <code>internal</code> causes Elasticsearch to blindly dump documents into the destination, overwriting any that happen to have the same ID.</p>
|
|
@@ -4333,6 +4336,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4333
4336
|
"pit",
|
|
4334
4337
|
"post_filter",
|
|
4335
4338
|
"profile",
|
|
4339
|
+
"project_routing",
|
|
4336
4340
|
"query",
|
|
4337
4341
|
"rank",
|
|
4338
4342
|
"rescore",
|
|
@@ -4421,7 +4425,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4421
4425
|
] = None,
|
|
4422
4426
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
4423
4427
|
retriever: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4424
|
-
routing: t.Optional[str] = None,
|
|
4428
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4425
4429
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
4426
4430
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
4427
4431
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
@@ -4753,8 +4757,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4753
4757
|
__query["preference"] = preference
|
|
4754
4758
|
if pretty is not None:
|
|
4755
4759
|
__query["pretty"] = pretty
|
|
4756
|
-
if project_routing is not None:
|
|
4757
|
-
__query["project_routing"] = project_routing
|
|
4758
4760
|
if q is not None:
|
|
4759
4761
|
__query["q"] = q
|
|
4760
4762
|
if request_cache is not None:
|
|
@@ -4814,6 +4816,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4814
4816
|
__body["post_filter"] = post_filter
|
|
4815
4817
|
if profile is not None:
|
|
4816
4818
|
__body["profile"] = profile
|
|
4819
|
+
if project_routing is not None:
|
|
4820
|
+
__body["project_routing"] = project_routing
|
|
4817
4821
|
if query is not None:
|
|
4818
4822
|
__body["query"] = query
|
|
4819
4823
|
if rank is not None:
|
|
@@ -5370,7 +5374,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5370
5374
|
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
5371
5375
|
preference: t.Optional[str] = None,
|
|
5372
5376
|
pretty: t.Optional[bool] = None,
|
|
5373
|
-
routing: t.Optional[str] = None,
|
|
5377
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
5374
5378
|
) -> ObjectApiResponse[t.Any]:
|
|
5375
5379
|
"""
|
|
5376
5380
|
.. raw:: html
|
|
@@ -5479,7 +5483,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5479
5483
|
profile: t.Optional[bool] = None,
|
|
5480
5484
|
project_routing: t.Optional[str] = None,
|
|
5481
5485
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
5482
|
-
routing: t.Optional[str] = None,
|
|
5486
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
5483
5487
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
5484
5488
|
search_type: t.Optional[
|
|
5485
5489
|
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
@@ -5616,7 +5620,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5616
5620
|
async def terms_enum(
|
|
5617
5621
|
self,
|
|
5618
5622
|
*,
|
|
5619
|
-
index: str,
|
|
5623
|
+
index: t.Union[str, t.Sequence[str]],
|
|
5620
5624
|
field: t.Optional[str] = None,
|
|
5621
5625
|
case_insensitive: t.Optional[bool] = None,
|
|
5622
5626
|
error_trace: t.Optional[bool] = None,
|
|
@@ -5742,7 +5746,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5742
5746
|
preference: t.Optional[str] = None,
|
|
5743
5747
|
pretty: t.Optional[bool] = None,
|
|
5744
5748
|
realtime: t.Optional[bool] = None,
|
|
5745
|
-
routing: t.Optional[str] = None,
|
|
5749
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
5746
5750
|
term_statistics: t.Optional[bool] = None,
|
|
5747
5751
|
version: t.Optional[int] = None,
|
|
5748
5752
|
version_type: t.Optional[
|
|
@@ -5926,7 +5930,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5926
5930
|
] = None,
|
|
5927
5931
|
require_alias: t.Optional[bool] = None,
|
|
5928
5932
|
retry_on_conflict: t.Optional[int] = None,
|
|
5929
|
-
routing: t.Optional[str] = None,
|
|
5933
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
5930
5934
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
5931
5935
|
scripted_upsert: t.Optional[bool] = None,
|
|
5932
5936
|
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
|
|
@@ -6106,7 +6110,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6106
6110
|
refresh: t.Optional[bool] = None,
|
|
6107
6111
|
request_cache: t.Optional[bool] = None,
|
|
6108
6112
|
requests_per_second: t.Optional[float] = None,
|
|
6109
|
-
routing: t.Optional[str] = None,
|
|
6113
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
6110
6114
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
6111
6115
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
6112
6116
|
scroll_size: t.Optional[int] = None,
|
|
@@ -213,6 +213,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
213
213
|
"pit",
|
|
214
214
|
"post_filter",
|
|
215
215
|
"profile",
|
|
216
|
+
"project_routing",
|
|
216
217
|
"query",
|
|
217
218
|
"rescore",
|
|
218
219
|
"runtime_mappings",
|
|
@@ -295,7 +296,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
295
296
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
296
297
|
] = None,
|
|
297
298
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
298
|
-
routing: t.Optional[str] = None,
|
|
299
|
+
routing: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
299
300
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
300
301
|
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
301
302
|
search_after: t.Optional[
|
|
@@ -533,8 +534,6 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
533
534
|
__query["preference"] = preference
|
|
534
535
|
if pretty is not None:
|
|
535
536
|
__query["pretty"] = pretty
|
|
536
|
-
if project_routing is not None:
|
|
537
|
-
__query["project_routing"] = project_routing
|
|
538
537
|
if q is not None:
|
|
539
538
|
__query["q"] = q
|
|
540
539
|
if request_cache is not None:
|
|
@@ -592,6 +591,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
592
591
|
__body["post_filter"] = post_filter
|
|
593
592
|
if profile is not None:
|
|
594
593
|
__body["profile"] = profile
|
|
594
|
+
if project_routing is not None:
|
|
595
|
+
__body["project_routing"] = project_routing
|
|
595
596
|
if query is not None:
|
|
596
597
|
__body["query"] = query
|
|
597
598
|
if rescore is not None:
|
|
@@ -328,6 +328,149 @@ class CatClient(NamespacedClient):
|
|
|
328
328
|
path_parts=__path_parts,
|
|
329
329
|
)
|
|
330
330
|
|
|
331
|
+
@_rewrite_parameters()
|
|
332
|
+
async def circuit_breaker(
|
|
333
|
+
self,
|
|
334
|
+
*,
|
|
335
|
+
circuit_breaker_patterns: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
336
|
+
bytes: t.Optional[
|
|
337
|
+
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
|
|
338
|
+
] = None,
|
|
339
|
+
error_trace: t.Optional[bool] = None,
|
|
340
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
341
|
+
format: t.Optional[str] = None,
|
|
342
|
+
h: t.Optional[
|
|
343
|
+
t.Union[
|
|
344
|
+
t.Sequence[
|
|
345
|
+
t.Union[
|
|
346
|
+
str,
|
|
347
|
+
t.Literal[
|
|
348
|
+
"breaker",
|
|
349
|
+
"estimated",
|
|
350
|
+
"estimated_bytes",
|
|
351
|
+
"limit",
|
|
352
|
+
"limit_bytes",
|
|
353
|
+
"node_id",
|
|
354
|
+
"node_name",
|
|
355
|
+
"overhead",
|
|
356
|
+
"tripped",
|
|
357
|
+
],
|
|
358
|
+
]
|
|
359
|
+
],
|
|
360
|
+
t.Union[
|
|
361
|
+
str,
|
|
362
|
+
t.Literal[
|
|
363
|
+
"breaker",
|
|
364
|
+
"estimated",
|
|
365
|
+
"estimated_bytes",
|
|
366
|
+
"limit",
|
|
367
|
+
"limit_bytes",
|
|
368
|
+
"node_id",
|
|
369
|
+
"node_name",
|
|
370
|
+
"overhead",
|
|
371
|
+
"tripped",
|
|
372
|
+
],
|
|
373
|
+
],
|
|
374
|
+
]
|
|
375
|
+
] = None,
|
|
376
|
+
help: t.Optional[bool] = None,
|
|
377
|
+
human: t.Optional[bool] = None,
|
|
378
|
+
local: t.Optional[bool] = None,
|
|
379
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
380
|
+
pretty: t.Optional[bool] = None,
|
|
381
|
+
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
382
|
+
time: t.Optional[
|
|
383
|
+
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
384
|
+
] = None,
|
|
385
|
+
v: t.Optional[bool] = None,
|
|
386
|
+
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
387
|
+
"""
|
|
388
|
+
.. raw:: html
|
|
389
|
+
|
|
390
|
+
<p>Get circuit breakers statistics.</p>
|
|
391
|
+
<p>IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.</p>
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch#TODO>`_
|
|
395
|
+
|
|
396
|
+
:param circuit_breaker_patterns: A comma-separated list of regular-expressions
|
|
397
|
+
to filter the circuit breakers in the output
|
|
398
|
+
:param bytes: Sets the units for columns that contain a byte-size value. Note
|
|
399
|
+
that byte-size value units work in terms of powers of 1024. For instance
|
|
400
|
+
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
|
|
401
|
+
rendered with a suffix such as `kb`, `mb`, or `gb`, chosen such that the
|
|
402
|
+
numeric value of the column is as small as possible whilst still being at
|
|
403
|
+
least `1.0`. If given, byte-size values are rendered as an integer with no
|
|
404
|
+
suffix, representing the value of the column in the chosen unit. Values that
|
|
405
|
+
are not an exact multiple of the chosen unit are rounded down.
|
|
406
|
+
:param format: Specifies the format to return the columnar data in, can be set
|
|
407
|
+
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
408
|
+
:param h: A comma-separated list of columns names to display. It supports simple
|
|
409
|
+
wildcards.
|
|
410
|
+
:param help: When set to `true` will output available columns. This option can't
|
|
411
|
+
be combined with any other query string option.
|
|
412
|
+
:param local: If `true`, the request computes the list of selected nodes from
|
|
413
|
+
the local cluster state. If `false` the list of selected nodes are computed
|
|
414
|
+
from the cluster state of the master node. In both cases the coordinating
|
|
415
|
+
node will send requests for further information to each selected node.
|
|
416
|
+
:param master_timeout: Period to wait for a connection to the master node.
|
|
417
|
+
:param s: List of columns that determine how the table should be sorted. Sorting
|
|
418
|
+
defaults to ascending and can be changed by setting `:asc` or `:desc` as
|
|
419
|
+
a suffix to the column name.
|
|
420
|
+
:param time: Sets the units for columns that contain a time duration. If omitted,
|
|
421
|
+
time duration values are rendered with a suffix such as `ms`, `s`, `m` or
|
|
422
|
+
`h`, chosen such that the numeric value of the column is as small as possible
|
|
423
|
+
whilst still being at least `1.0`. If given, time duration values are rendered
|
|
424
|
+
as an integer with no suffix. Values that are not an exact multiple of the
|
|
425
|
+
chosen unit are rounded down.
|
|
426
|
+
:param v: When set to `true` will enable verbose output.
|
|
427
|
+
"""
|
|
428
|
+
__path_parts: t.Dict[str, str]
|
|
429
|
+
if circuit_breaker_patterns not in SKIP_IN_PATH:
|
|
430
|
+
__path_parts = {
|
|
431
|
+
"circuit_breaker_patterns": _quote(circuit_breaker_patterns)
|
|
432
|
+
}
|
|
433
|
+
__path = f'/_cat/circuit_breaker/{__path_parts["circuit_breaker_patterns"]}'
|
|
434
|
+
else:
|
|
435
|
+
__path_parts = {}
|
|
436
|
+
__path = "/_cat/circuit_breaker"
|
|
437
|
+
__query: t.Dict[str, t.Any] = {}
|
|
438
|
+
if bytes is not None:
|
|
439
|
+
__query["bytes"] = bytes
|
|
440
|
+
if error_trace is not None:
|
|
441
|
+
__query["error_trace"] = error_trace
|
|
442
|
+
if filter_path is not None:
|
|
443
|
+
__query["filter_path"] = filter_path
|
|
444
|
+
if format is not None:
|
|
445
|
+
__query["format"] = format
|
|
446
|
+
if h is not None:
|
|
447
|
+
__query["h"] = h
|
|
448
|
+
if help is not None:
|
|
449
|
+
__query["help"] = help
|
|
450
|
+
if human is not None:
|
|
451
|
+
__query["human"] = human
|
|
452
|
+
if local is not None:
|
|
453
|
+
__query["local"] = local
|
|
454
|
+
if master_timeout is not None:
|
|
455
|
+
__query["master_timeout"] = master_timeout
|
|
456
|
+
if pretty is not None:
|
|
457
|
+
__query["pretty"] = pretty
|
|
458
|
+
if s is not None:
|
|
459
|
+
__query["s"] = s
|
|
460
|
+
if time is not None:
|
|
461
|
+
__query["time"] = time
|
|
462
|
+
if v is not None:
|
|
463
|
+
__query["v"] = v
|
|
464
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
465
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
466
|
+
"GET",
|
|
467
|
+
__path,
|
|
468
|
+
params=__query,
|
|
469
|
+
headers=__headers,
|
|
470
|
+
endpoint_id="cat.circuit_breaker",
|
|
471
|
+
path_parts=__path_parts,
|
|
472
|
+
)
|
|
473
|
+
|
|
331
474
|
@_rewrite_parameters()
|
|
332
475
|
async def component_templates(
|
|
333
476
|
self,
|
|
@@ -468,7 +611,9 @@ class CatClient(NamespacedClient):
|
|
|
468
611
|
path_parts=__path_parts,
|
|
469
612
|
)
|
|
470
613
|
|
|
471
|
-
@_rewrite_parameters(
|
|
614
|
+
@_rewrite_parameters(
|
|
615
|
+
body_fields=("project_routing",),
|
|
616
|
+
)
|
|
472
617
|
async def count(
|
|
473
618
|
self,
|
|
474
619
|
*,
|
|
@@ -494,6 +639,7 @@ class CatClient(NamespacedClient):
|
|
|
494
639
|
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
495
640
|
] = None,
|
|
496
641
|
v: t.Optional[bool] = None,
|
|
642
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
497
643
|
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
|
|
498
644
|
"""
|
|
499
645
|
.. raw:: html
|
|
@@ -524,10 +670,10 @@ class CatClient(NamespacedClient):
|
|
|
524
670
|
wildcards.
|
|
525
671
|
:param help: When set to `true` will output available columns. This option can't
|
|
526
672
|
be combined with any other query string option.
|
|
527
|
-
:param project_routing: Specifies a subset of projects to target
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
_alias:
|
|
673
|
+
:param project_routing: Specifies a subset of projects to target using project
|
|
674
|
+
metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
|
|
675
|
+
the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
|
|
676
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
531
677
|
:param s: List of columns that determine how the table should be sorted. Sorting
|
|
532
678
|
defaults to ascending and can be changed by setting `:asc` or `:desc` as
|
|
533
679
|
a suffix to the column name.
|
|
@@ -547,6 +693,7 @@ class CatClient(NamespacedClient):
|
|
|
547
693
|
__path_parts = {}
|
|
548
694
|
__path = "/_cat/count"
|
|
549
695
|
__query: t.Dict[str, t.Any] = {}
|
|
696
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
550
697
|
if bytes is not None:
|
|
551
698
|
__query["bytes"] = bytes
|
|
552
699
|
if error_trace is not None:
|
|
@@ -563,20 +710,26 @@ class CatClient(NamespacedClient):
|
|
|
563
710
|
__query["human"] = human
|
|
564
711
|
if pretty is not None:
|
|
565
712
|
__query["pretty"] = pretty
|
|
566
|
-
if project_routing is not None:
|
|
567
|
-
__query["project_routing"] = project_routing
|
|
568
713
|
if s is not None:
|
|
569
714
|
__query["s"] = s
|
|
570
715
|
if time is not None:
|
|
571
716
|
__query["time"] = time
|
|
572
717
|
if v is not None:
|
|
573
718
|
__query["v"] = v
|
|
719
|
+
if not __body:
|
|
720
|
+
if project_routing is not None:
|
|
721
|
+
__body["project_routing"] = project_routing
|
|
722
|
+
if not __body:
|
|
723
|
+
__body = None # type: ignore[assignment]
|
|
574
724
|
__headers = {"accept": "text/plain,application/json"}
|
|
725
|
+
if __body is not None:
|
|
726
|
+
__headers["content-type"] = "application/json"
|
|
575
727
|
return await self.perform_request( # type: ignore[return-value]
|
|
576
|
-
"
|
|
728
|
+
"POST",
|
|
577
729
|
__path,
|
|
578
730
|
params=__query,
|
|
579
731
|
headers=__headers,
|
|
732
|
+
body=__body,
|
|
580
733
|
endpoint_id="cat.count",
|
|
581
734
|
path_parts=__path_parts,
|
|
582
735
|
)
|
|
@@ -2516,6 +2669,7 @@ class CatClient(NamespacedClient):
|
|
|
2516
2669
|
t.Union[
|
|
2517
2670
|
str,
|
|
2518
2671
|
t.Literal[
|
|
2672
|
+
"available_processors",
|
|
2519
2673
|
"build",
|
|
2520
2674
|
"completion.size",
|
|
2521
2675
|
"cpu",
|
|
@@ -2611,6 +2765,7 @@ class CatClient(NamespacedClient):
|
|
|
2611
2765
|
t.Union[
|
|
2612
2766
|
str,
|
|
2613
2767
|
t.Literal[
|
|
2768
|
+
"available_processors",
|
|
2614
2769
|
"build",
|
|
2615
2770
|
"completion.size",
|
|
2616
2771
|
"cpu",
|