elasticsearch 9.1.2__py3-none-any.whl → 9.2.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.
- elasticsearch/_async/client/__init__.py +94 -44
- elasticsearch/_async/client/async_search.py +7 -0
- elasticsearch/_async/client/cat.py +8 -1
- elasticsearch/_async/client/cluster.py +9 -8
- elasticsearch/_async/client/eql.py +7 -0
- elasticsearch/_async/client/esql.py +26 -3
- elasticsearch/_async/client/fleet.py +1 -5
- elasticsearch/_async/client/graph.py +1 -5
- elasticsearch/_async/client/ilm.py +2 -10
- elasticsearch/_async/client/indices.py +158 -28
- elasticsearch/_async/client/inference.py +280 -123
- elasticsearch/_async/client/ingest.py +8 -0
- elasticsearch/_async/client/license.py +4 -2
- elasticsearch/_async/client/ml.py +2 -2
- elasticsearch/_async/client/nodes.py +1 -3
- elasticsearch/_async/client/project.py +67 -0
- elasticsearch/_async/client/security.py +39 -0
- elasticsearch/_async/client/simulate.py +8 -0
- elasticsearch/_async/client/slm.py +1 -5
- elasticsearch/_async/client/snapshot.py +20 -10
- elasticsearch/_async/client/sql.py +7 -0
- elasticsearch/_async/client/streams.py +2 -3
- elasticsearch/_async/helpers.py +28 -15
- elasticsearch/_sync/client/__init__.py +94 -44
- elasticsearch/_sync/client/async_search.py +7 -0
- elasticsearch/_sync/client/cat.py +8 -1
- elasticsearch/_sync/client/cluster.py +9 -8
- elasticsearch/_sync/client/eql.py +7 -0
- elasticsearch/_sync/client/esql.py +26 -3
- elasticsearch/_sync/client/fleet.py +1 -5
- elasticsearch/_sync/client/graph.py +1 -5
- elasticsearch/_sync/client/ilm.py +2 -10
- elasticsearch/_sync/client/indices.py +158 -28
- elasticsearch/_sync/client/inference.py +280 -123
- elasticsearch/_sync/client/ingest.py +8 -0
- elasticsearch/_sync/client/license.py +4 -2
- elasticsearch/_sync/client/ml.py +2 -2
- elasticsearch/_sync/client/nodes.py +1 -3
- elasticsearch/_sync/client/project.py +67 -0
- elasticsearch/_sync/client/security.py +39 -0
- elasticsearch/_sync/client/simulate.py +8 -0
- elasticsearch/_sync/client/slm.py +1 -5
- elasticsearch/_sync/client/snapshot.py +20 -10
- elasticsearch/_sync/client/sql.py +7 -0
- elasticsearch/_sync/client/streams.py +2 -3
- elasticsearch/_version.py +2 -2
- elasticsearch/client.py +2 -0
- elasticsearch/compat.py +2 -15
- elasticsearch/dsl/_async/document.py +2 -1
- elasticsearch/dsl/_sync/document.py +2 -1
- elasticsearch/dsl/document_base.py +38 -13
- elasticsearch/dsl/pydantic.py +152 -0
- elasticsearch/dsl/search_base.py +5 -1
- elasticsearch/esql/esql.py +331 -41
- elasticsearch/esql/functions.py +88 -0
- elasticsearch/helpers/actions.py +1 -1
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/METADATA +26 -4
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/RECORD +61 -58
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/WHEEL +0 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.1.2.dist-info → elasticsearch-9.2.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -63,6 +63,7 @@ from .migration import MigrationClient
|
|
|
63
63
|
from .ml import MlClient
|
|
64
64
|
from .monitoring import MonitoringClient
|
|
65
65
|
from .nodes import NodesClient
|
|
66
|
+
from .project import ProjectClient
|
|
66
67
|
from .query_rules import QueryRulesClient
|
|
67
68
|
from .rollup import RollupClient
|
|
68
69
|
from .search_application import SearchApplicationClient
|
|
@@ -369,6 +370,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
369
370
|
self.migration = MigrationClient(self)
|
|
370
371
|
self.ml = MlClient(self)
|
|
371
372
|
self.monitoring = MonitoringClient(self)
|
|
373
|
+
self.project = ProjectClient(self)
|
|
372
374
|
self.query_rules = QueryRulesClient(self)
|
|
373
375
|
self.rollup = RollupClient(self)
|
|
374
376
|
self.search_application = SearchApplicationClient(self)
|
|
@@ -847,11 +849,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
847
849
|
if not __body:
|
|
848
850
|
if id is not None:
|
|
849
851
|
__body["id"] = id
|
|
850
|
-
|
|
851
|
-
__body = None # type: ignore[assignment]
|
|
852
|
-
__headers = {"accept": "application/json"}
|
|
853
|
-
if __body is not None:
|
|
854
|
-
__headers["content-type"] = "application/json"
|
|
852
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
855
853
|
return await self.perform_request( # type: ignore[return-value]
|
|
856
854
|
"DELETE",
|
|
857
855
|
__path,
|
|
@@ -891,6 +889,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
891
889
|
min_score: t.Optional[float] = None,
|
|
892
890
|
preference: t.Optional[str] = None,
|
|
893
891
|
pretty: t.Optional[bool] = None,
|
|
892
|
+
project_routing: t.Optional[str] = None,
|
|
894
893
|
q: t.Optional[str] = None,
|
|
895
894
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
896
895
|
routing: t.Optional[str] = None,
|
|
@@ -924,8 +923,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
924
923
|
This parameter can be used only when the `q` query string parameter is specified.
|
|
925
924
|
:param analyzer: The analyzer to use for the query string. This parameter can
|
|
926
925
|
be used only when the `q` query string parameter is specified.
|
|
927
|
-
:param default_operator: The default operator for query string query: `
|
|
928
|
-
`
|
|
926
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
927
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
929
928
|
is specified.
|
|
930
929
|
:param df: The field to use as a default when no field prefix is given in the
|
|
931
930
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -945,6 +944,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
945
944
|
in the result.
|
|
946
945
|
:param preference: The node or shard the operation should be performed on. By
|
|
947
946
|
default, it is random.
|
|
947
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
948
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
949
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
950
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
948
951
|
:param q: The query in Lucene query string syntax. This parameter cannot be used
|
|
949
952
|
with a request body.
|
|
950
953
|
:param query: Defines the search query using Query DSL. A request body query
|
|
@@ -997,6 +1000,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
997
1000
|
__query["preference"] = preference
|
|
998
1001
|
if pretty is not None:
|
|
999
1002
|
__query["pretty"] = pretty
|
|
1003
|
+
if project_routing is not None:
|
|
1004
|
+
__query["project_routing"] = project_routing
|
|
1000
1005
|
if q is not None:
|
|
1001
1006
|
__query["q"] = q
|
|
1002
1007
|
if routing is not None:
|
|
@@ -1046,7 +1051,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1046
1051
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1047
1052
|
version: t.Optional[int] = None,
|
|
1048
1053
|
version_type: t.Optional[
|
|
1049
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1054
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1050
1055
|
] = None,
|
|
1051
1056
|
wait_for_active_shards: t.Optional[
|
|
1052
1057
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -1225,7 +1230,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1225
1230
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1226
1231
|
version: t.Optional[int] = None,
|
|
1227
1232
|
version_type: t.Optional[
|
|
1228
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1233
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1229
1234
|
] = None,
|
|
1230
1235
|
wait_for_active_shards: t.Optional[
|
|
1231
1236
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -1470,8 +1475,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1470
1475
|
used only when the `q` query string parameter is specified.
|
|
1471
1476
|
:param conflicts: What to do if delete by query hits version conflicts: `abort`
|
|
1472
1477
|
or `proceed`.
|
|
1473
|
-
:param default_operator: The default operator for query string query: `
|
|
1474
|
-
`
|
|
1478
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
1479
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
1475
1480
|
is specified.
|
|
1476
1481
|
:param df: The field to use as default where no field prefix is given in the
|
|
1477
1482
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -1765,7 +1770,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1765
1770
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1766
1771
|
version: t.Optional[int] = None,
|
|
1767
1772
|
version_type: t.Optional[
|
|
1768
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1773
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1769
1774
|
] = None,
|
|
1770
1775
|
) -> HeadApiResponse:
|
|
1771
1776
|
"""
|
|
@@ -1894,7 +1899,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1894
1899
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1895
1900
|
version: t.Optional[int] = None,
|
|
1896
1901
|
version_type: t.Optional[
|
|
1897
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1902
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1898
1903
|
] = None,
|
|
1899
1904
|
) -> HeadApiResponse:
|
|
1900
1905
|
"""
|
|
@@ -2023,8 +2028,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2023
2028
|
This parameter can be used only when the `q` query string parameter is specified.
|
|
2024
2029
|
:param analyzer: The analyzer to use for the query string. This parameter can
|
|
2025
2030
|
be used only when the `q` query string parameter is specified.
|
|
2026
|
-
:param default_operator: The default operator for query string query: `
|
|
2027
|
-
`
|
|
2031
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
2032
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
2028
2033
|
is specified.
|
|
2029
2034
|
:param df: The field to use as default where no field prefix is given in the
|
|
2030
2035
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -2135,6 +2140,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2135
2140
|
include_unmapped: t.Optional[bool] = None,
|
|
2136
2141
|
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
2137
2142
|
pretty: t.Optional[bool] = None,
|
|
2143
|
+
project_routing: t.Optional[str] = None,
|
|
2138
2144
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
2139
2145
|
types: t.Optional[t.Sequence[str]] = None,
|
|
2140
2146
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
@@ -2178,6 +2184,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2178
2184
|
deleted documents) are outside of the provided range. However, not all queries
|
|
2179
2185
|
can rewrite to `match_none` so this API may return an index even if the provided
|
|
2180
2186
|
filter matches no document.
|
|
2187
|
+
:param project_routing: Specifies a subset of projects to target for the field-caps
|
|
2188
|
+
query using project metadata tags in a subset of Lucene query syntax. Allowed
|
|
2189
|
+
Lucene queries: the _alias tag and a single value (possibly wildcarded).
|
|
2190
|
+
Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
|
|
2191
|
+
only.
|
|
2181
2192
|
:param runtime_mappings: Define ad-hoc runtime fields in the request similar
|
|
2182
2193
|
to the way it is done in search requests. These fields exist only as part
|
|
2183
2194
|
of the query and take precedence over fields defined with the same name in
|
|
@@ -2215,6 +2226,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2215
2226
|
__query["include_unmapped"] = include_unmapped
|
|
2216
2227
|
if pretty is not None:
|
|
2217
2228
|
__query["pretty"] = pretty
|
|
2229
|
+
if project_routing is not None:
|
|
2230
|
+
__query["project_routing"] = project_routing
|
|
2218
2231
|
if types is not None:
|
|
2219
2232
|
__query["types"] = types
|
|
2220
2233
|
if not __body:
|
|
@@ -2242,6 +2255,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2242
2255
|
@_rewrite_parameters(
|
|
2243
2256
|
parameter_aliases={
|
|
2244
2257
|
"_source": "source",
|
|
2258
|
+
"_source_exclude_vectors": "source_exclude_vectors",
|
|
2245
2259
|
"_source_excludes": "source_excludes",
|
|
2246
2260
|
"_source_includes": "source_includes",
|
|
2247
2261
|
},
|
|
@@ -2261,12 +2275,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2261
2275
|
refresh: t.Optional[bool] = None,
|
|
2262
2276
|
routing: t.Optional[str] = None,
|
|
2263
2277
|
source: t.Optional[t.Union[bool, t.Union[str, t.Sequence[str]]]] = None,
|
|
2278
|
+
source_exclude_vectors: t.Optional[bool] = None,
|
|
2264
2279
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2265
2280
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2266
2281
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2267
2282
|
version: t.Optional[int] = None,
|
|
2268
2283
|
version_type: t.Optional[
|
|
2269
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2284
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2270
2285
|
] = None,
|
|
2271
2286
|
) -> ObjectApiResponse[t.Any]:
|
|
2272
2287
|
"""
|
|
@@ -2334,6 +2349,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2334
2349
|
:param routing: A custom value used to route operations to a specific shard.
|
|
2335
2350
|
:param source: Indicates whether to return the `_source` field (`true` or `false`)
|
|
2336
2351
|
or lists the fields to return.
|
|
2352
|
+
:param source_exclude_vectors: Whether vectors should be excluded from _source
|
|
2337
2353
|
:param source_excludes: A comma-separated list of source fields to exclude from
|
|
2338
2354
|
the response. You can also use this parameter to exclude fields from the
|
|
2339
2355
|
subset specified in `_source_includes` query parameter. If the `_source`
|
|
@@ -2379,6 +2395,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2379
2395
|
__query["routing"] = routing
|
|
2380
2396
|
if source is not None:
|
|
2381
2397
|
__query["_source"] = source
|
|
2398
|
+
if source_exclude_vectors is not None:
|
|
2399
|
+
__query["_source_exclude_vectors"] = source_exclude_vectors
|
|
2382
2400
|
if source_excludes is not None:
|
|
2383
2401
|
__query["_source_excludes"] = source_excludes
|
|
2384
2402
|
if source_includes is not None:
|
|
@@ -2553,7 +2571,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2553
2571
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2554
2572
|
version: t.Optional[int] = None,
|
|
2555
2573
|
version_type: t.Optional[
|
|
2556
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2574
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2557
2575
|
] = None,
|
|
2558
2576
|
) -> ObjectApiResponse[t.Any]:
|
|
2559
2577
|
"""
|
|
@@ -2733,7 +2751,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2733
2751
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2734
2752
|
version: t.Optional[int] = None,
|
|
2735
2753
|
version_type: t.Optional[
|
|
2736
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2754
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2737
2755
|
] = None,
|
|
2738
2756
|
wait_for_active_shards: t.Optional[
|
|
2739
2757
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -3148,6 +3166,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3148
3166
|
max_concurrent_shard_requests: t.Optional[int] = None,
|
|
3149
3167
|
pre_filter_shard_size: t.Optional[int] = None,
|
|
3150
3168
|
pretty: t.Optional[bool] = None,
|
|
3169
|
+
project_routing: t.Optional[str] = None,
|
|
3151
3170
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3152
3171
|
routing: t.Optional[str] = None,
|
|
3153
3172
|
search_type: t.Optional[
|
|
@@ -3209,6 +3228,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3209
3228
|
roundtrip can limit the number of shards significantly if for instance a
|
|
3210
3229
|
shard can not match any documents based on its rewrite method i.e., if date
|
|
3211
3230
|
filters are mandatory to match but the shard bounds and the query are disjoint.
|
|
3231
|
+
:param project_routing: Specifies a subset of projects to target for a search
|
|
3232
|
+
using project metadata tags in a subset Lucene syntax. Allowed Lucene queries:
|
|
3233
|
+
the _alias tag and a single value (possible wildcarded). Examples: _alias:my-project
|
|
3234
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
3212
3235
|
:param rest_total_hits_as_int: If true, hits.total are returned as an integer
|
|
3213
3236
|
in the response. Defaults to false, which returns an object.
|
|
3214
3237
|
:param routing: Custom routing value used to route search operations to a specific
|
|
@@ -3258,6 +3281,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3258
3281
|
__query["pre_filter_shard_size"] = pre_filter_shard_size
|
|
3259
3282
|
if pretty is not None:
|
|
3260
3283
|
__query["pretty"] = pretty
|
|
3284
|
+
if project_routing is not None:
|
|
3285
|
+
__query["project_routing"] = project_routing
|
|
3261
3286
|
if rest_total_hits_as_int is not None:
|
|
3262
3287
|
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
|
|
3263
3288
|
if routing is not None:
|
|
@@ -3296,6 +3321,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3296
3321
|
human: t.Optional[bool] = None,
|
|
3297
3322
|
max_concurrent_searches: t.Optional[int] = None,
|
|
3298
3323
|
pretty: t.Optional[bool] = None,
|
|
3324
|
+
project_routing: t.Optional[str] = None,
|
|
3299
3325
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
3300
3326
|
search_type: t.Optional[
|
|
3301
3327
|
t.Union[str, t.Literal["dfs_query_then_fetch", "query_then_fetch"]]
|
|
@@ -3329,6 +3355,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3329
3355
|
for cross-cluster search requests.
|
|
3330
3356
|
:param max_concurrent_searches: The maximum number of concurrent searches the
|
|
3331
3357
|
API can run.
|
|
3358
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
3359
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
3360
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
3361
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
3332
3362
|
:param rest_total_hits_as_int: If `true`, the response returns `hits.total` as
|
|
3333
3363
|
an integer. If `false`, it returns `hits.total` as an object.
|
|
3334
3364
|
:param search_type: The type of the search operation.
|
|
@@ -3361,6 +3391,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3361
3391
|
__query["max_concurrent_searches"] = max_concurrent_searches
|
|
3362
3392
|
if pretty is not None:
|
|
3363
3393
|
__query["pretty"] = pretty
|
|
3394
|
+
if project_routing is not None:
|
|
3395
|
+
__query["project_routing"] = project_routing
|
|
3364
3396
|
if rest_total_hits_as_int is not None:
|
|
3365
3397
|
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
|
|
3366
3398
|
if search_type is not None:
|
|
@@ -3406,7 +3438,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3406
3438
|
term_statistics: t.Optional[bool] = None,
|
|
3407
3439
|
version: t.Optional[int] = None,
|
|
3408
3440
|
version_type: t.Optional[
|
|
3409
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
3441
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
3410
3442
|
] = None,
|
|
3411
3443
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3412
3444
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -3531,6 +3563,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3531
3563
|
max_concurrent_shard_requests: t.Optional[int] = None,
|
|
3532
3564
|
preference: t.Optional[str] = None,
|
|
3533
3565
|
pretty: t.Optional[bool] = None,
|
|
3566
|
+
project_routing: t.Optional[str] = None,
|
|
3534
3567
|
routing: t.Optional[str] = None,
|
|
3535
3568
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3536
3569
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -3587,6 +3620,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3587
3620
|
that each sub-search request executes per node.
|
|
3588
3621
|
:param preference: The node or shard the operation should be performed on. By
|
|
3589
3622
|
default, it is random.
|
|
3623
|
+
:param project_routing: Specifies a subset of projects to target for the PIT
|
|
3624
|
+
request using project metadata tags in a subset of Lucene query syntax. Allowed
|
|
3625
|
+
Lucene queries: the _alias tag and a single value (possibly wildcarded).
|
|
3626
|
+
Examples: _alias:my-project _alias:_origin _alias:*pr* Supported in serverless
|
|
3627
|
+
only.
|
|
3590
3628
|
:param routing: A custom value that is used to route operations to a specific
|
|
3591
3629
|
shard.
|
|
3592
3630
|
"""
|
|
@@ -3618,6 +3656,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3618
3656
|
__query["preference"] = preference
|
|
3619
3657
|
if pretty is not None:
|
|
3620
3658
|
__query["pretty"] = pretty
|
|
3659
|
+
if project_routing is not None:
|
|
3660
|
+
__query["project_routing"] = project_routing
|
|
3621
3661
|
if routing is not None:
|
|
3622
3662
|
__query["routing"] = routing
|
|
3623
3663
|
if not __body:
|
|
@@ -3816,7 +3856,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3816
3856
|
)
|
|
3817
3857
|
|
|
3818
3858
|
@_rewrite_parameters(
|
|
3819
|
-
body_fields=("dest", "source", "conflicts", "max_docs", "script"
|
|
3859
|
+
body_fields=("dest", "source", "conflicts", "max_docs", "script"),
|
|
3820
3860
|
)
|
|
3821
3861
|
async def reindex(
|
|
3822
3862
|
self,
|
|
@@ -3834,7 +3874,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3834
3874
|
require_alias: t.Optional[bool] = None,
|
|
3835
3875
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
3836
3876
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3837
|
-
size: t.Optional[int] = None,
|
|
3838
3877
|
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
3839
3878
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3840
3879
|
wait_for_active_shards: t.Optional[
|
|
@@ -3910,7 +3949,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3910
3949
|
reindexing.
|
|
3911
3950
|
:param scroll: The period of time that a consistent view of the index should
|
|
3912
3951
|
be maintained for scrolled search.
|
|
3913
|
-
:param size:
|
|
3914
3952
|
:param slices: The number of slices this task should be divided into. It defaults
|
|
3915
3953
|
to one slice, which means the task isn't sliced into subtasks. Reindex supports
|
|
3916
3954
|
sliced scroll to parallelize the reindexing process. This parallelization
|
|
@@ -3975,8 +4013,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3975
4013
|
__body["max_docs"] = max_docs
|
|
3976
4014
|
if script is not None:
|
|
3977
4015
|
__body["script"] = script
|
|
3978
|
-
if size is not None:
|
|
3979
|
-
__body["size"] = size
|
|
3980
4016
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3981
4017
|
return await self.perform_request( # type: ignore[return-value]
|
|
3982
4018
|
"POST",
|
|
@@ -4103,11 +4139,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4103
4139
|
__body["params"] = params
|
|
4104
4140
|
if source is not None:
|
|
4105
4141
|
__body["source"] = source
|
|
4106
|
-
|
|
4107
|
-
__body = None # type: ignore[assignment]
|
|
4108
|
-
__headers = {"accept": "application/json"}
|
|
4109
|
-
if __body is not None:
|
|
4110
|
-
__headers["content-type"] = "application/json"
|
|
4142
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
4111
4143
|
return await self.perform_request( # type: ignore[return-value]
|
|
4112
4144
|
"POST",
|
|
4113
4145
|
__path,
|
|
@@ -4190,11 +4222,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4190
4222
|
__body["context_setup"] = context_setup
|
|
4191
4223
|
if script is not None:
|
|
4192
4224
|
__body["script"] = script
|
|
4193
|
-
|
|
4194
|
-
__body = None # type: ignore[assignment]
|
|
4195
|
-
__headers = {"accept": "application/json"}
|
|
4196
|
-
if __body is not None:
|
|
4197
|
-
__headers["content-type"] = "application/json"
|
|
4225
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
4198
4226
|
return await self.perform_request( # type: ignore[return-value]
|
|
4199
4227
|
"POST",
|
|
4200
4228
|
__path,
|
|
@@ -4319,6 +4347,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4319
4347
|
),
|
|
4320
4348
|
parameter_aliases={
|
|
4321
4349
|
"_source": "source",
|
|
4350
|
+
"_source_exclude_vectors": "source_exclude_vectors",
|
|
4322
4351
|
"_source_excludes": "source_excludes",
|
|
4323
4352
|
"_source_includes": "source_includes",
|
|
4324
4353
|
"from": "from_",
|
|
@@ -4373,6 +4402,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4373
4402
|
preference: t.Optional[str] = None,
|
|
4374
4403
|
pretty: t.Optional[bool] = None,
|
|
4375
4404
|
profile: t.Optional[bool] = None,
|
|
4405
|
+
project_routing: t.Optional[str] = None,
|
|
4376
4406
|
q: t.Optional[str] = None,
|
|
4377
4407
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4378
4408
|
rank: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
@@ -4402,6 +4432,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4402
4432
|
]
|
|
4403
4433
|
] = None,
|
|
4404
4434
|
source: t.Optional[t.Union[bool, t.Mapping[str, t.Any]]] = None,
|
|
4435
|
+
source_exclude_vectors: t.Optional[bool] = None,
|
|
4405
4436
|
source_excludes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4406
4437
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4407
4438
|
stats: t.Optional[t.Sequence[str]] = None,
|
|
@@ -4469,8 +4500,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4469
4500
|
node and the remote clusters are minimized when running cross-cluster search
|
|
4470
4501
|
(CCS) requests.
|
|
4471
4502
|
:param collapse: Collapses search results the values of the specified field.
|
|
4472
|
-
:param default_operator: The default operator for the query string query: `
|
|
4473
|
-
or `
|
|
4503
|
+
:param default_operator: The default operator for the query string query: `and`
|
|
4504
|
+
or `or`. This parameter can be used only when the `q` query string parameter
|
|
4474
4505
|
is specified.
|
|
4475
4506
|
:param df: The field to use as a default when no field prefix is given in the
|
|
4476
4507
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -4555,6 +4586,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4555
4586
|
:param profile: Set to `true` to return detailed timing information about the
|
|
4556
4587
|
execution of individual components in a search request. NOTE: This is a debugging
|
|
4557
4588
|
tool and adds significant overhead to search execution.
|
|
4589
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
4590
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
4591
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
4592
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
4558
4593
|
:param q: A query in the Lucene query string syntax. Query parameter searches
|
|
4559
4594
|
do not support the full Elasticsearch Query DSL but are handy for testing.
|
|
4560
4595
|
IMPORTANT: This parameter overrides the query parameter in the request body.
|
|
@@ -4596,6 +4631,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4596
4631
|
fields are returned in the `hits._source` property of the search response.
|
|
4597
4632
|
If the `stored_fields` property is specified, the `_source` property defaults
|
|
4598
4633
|
to `false`. Otherwise, it defaults to `true`.
|
|
4634
|
+
:param source_exclude_vectors: Whether vectors should be excluded from _source
|
|
4599
4635
|
:param source_excludes: A comma-separated list of source fields to exclude from
|
|
4600
4636
|
the response. You can also use this parameter to exclude fields from the
|
|
4601
4637
|
subset specified in `_source_includes` query parameter. If the `_source`
|
|
@@ -4708,6 +4744,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4708
4744
|
__query["preference"] = preference
|
|
4709
4745
|
if pretty is not None:
|
|
4710
4746
|
__query["pretty"] = pretty
|
|
4747
|
+
if project_routing is not None:
|
|
4748
|
+
__query["project_routing"] = project_routing
|
|
4711
4749
|
if q is not None:
|
|
4712
4750
|
__query["q"] = q
|
|
4713
4751
|
if request_cache is not None:
|
|
@@ -4720,6 +4758,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4720
4758
|
__query["scroll"] = scroll
|
|
4721
4759
|
if search_type is not None:
|
|
4722
4760
|
__query["search_type"] = search_type
|
|
4761
|
+
if source_exclude_vectors is not None:
|
|
4762
|
+
__query["_source_exclude_vectors"] = source_exclude_vectors
|
|
4723
4763
|
if source_excludes is not None:
|
|
4724
4764
|
__query["_source_excludes"] = source_excludes
|
|
4725
4765
|
if source_includes is not None:
|
|
@@ -4860,6 +4900,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4860
4900
|
] = None,
|
|
4861
4901
|
human: t.Optional[bool] = None,
|
|
4862
4902
|
pretty: t.Optional[bool] = None,
|
|
4903
|
+
project_routing: t.Optional[str] = None,
|
|
4863
4904
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4864
4905
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
4865
4906
|
size: t.Optional[int] = None,
|
|
@@ -5177,6 +5218,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5177
5218
|
In the aggs layer, each feature represents a `geotile_grid` cell. If `grid,
|
|
5178
5219
|
each feature is a polygon of the cells bounding box. If `point`, each feature
|
|
5179
5220
|
is a Point that is the centroid of the cell.
|
|
5221
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
5222
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
5223
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
5224
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
5180
5225
|
:param query: The query DSL used to filter documents for the search.
|
|
5181
5226
|
:param runtime_mappings: Defines one or more runtime fields in the search request.
|
|
5182
5227
|
These fields take precedence over mapped fields with the same name.
|
|
@@ -5240,6 +5285,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5240
5285
|
__query["human"] = human
|
|
5241
5286
|
if pretty is not None:
|
|
5242
5287
|
__query["pretty"] = pretty
|
|
5288
|
+
if project_routing is not None:
|
|
5289
|
+
__query["project_routing"] = project_routing
|
|
5243
5290
|
if not __body:
|
|
5244
5291
|
if aggs is not None:
|
|
5245
5292
|
__body["aggs"] = aggs
|
|
@@ -5413,6 +5460,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5413
5460
|
preference: t.Optional[str] = None,
|
|
5414
5461
|
pretty: t.Optional[bool] = None,
|
|
5415
5462
|
profile: t.Optional[bool] = None,
|
|
5463
|
+
project_routing: t.Optional[str] = None,
|
|
5416
5464
|
rest_total_hits_as_int: t.Optional[bool] = None,
|
|
5417
5465
|
routing: t.Optional[str] = None,
|
|
5418
5466
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
@@ -5458,6 +5506,10 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5458
5506
|
:param preference: The node or shard the operation should be performed on. It
|
|
5459
5507
|
is random by default.
|
|
5460
5508
|
:param profile: If `true`, the query execution is profiled.
|
|
5509
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
5510
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
5511
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
5512
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
5461
5513
|
:param rest_total_hits_as_int: If `true`, `hits.total` is rendered as an integer
|
|
5462
5514
|
in the response. If `false`, it is rendered as an object.
|
|
5463
5515
|
:param routing: A custom value used to route operations to a specific shard.
|
|
@@ -5499,6 +5551,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5499
5551
|
__query["preference"] = preference
|
|
5500
5552
|
if pretty is not None:
|
|
5501
5553
|
__query["pretty"] = pretty
|
|
5554
|
+
if project_routing is not None:
|
|
5555
|
+
__query["project_routing"] = project_routing
|
|
5502
5556
|
if rest_total_hits_as_int is not None:
|
|
5503
5557
|
__query["rest_total_hits_as_int"] = rest_total_hits_as_int
|
|
5504
5558
|
if routing is not None:
|
|
@@ -5625,11 +5679,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5625
5679
|
__body["string"] = string
|
|
5626
5680
|
if timeout is not None:
|
|
5627
5681
|
__body["timeout"] = timeout
|
|
5628
|
-
|
|
5629
|
-
__body = None # type: ignore[assignment]
|
|
5630
|
-
__headers = {"accept": "application/json"}
|
|
5631
|
-
if __body is not None:
|
|
5632
|
-
__headers["content-type"] = "application/json"
|
|
5682
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5633
5683
|
return await self.perform_request( # type: ignore[return-value]
|
|
5634
5684
|
"POST",
|
|
5635
5685
|
__path,
|
|
@@ -5679,7 +5729,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5679
5729
|
term_statistics: t.Optional[bool] = None,
|
|
5680
5730
|
version: t.Optional[int] = None,
|
|
5681
5731
|
version_type: t.Optional[
|
|
5682
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
5732
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
5683
5733
|
] = None,
|
|
5684
5734
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
5685
5735
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -6155,8 +6205,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6155
6205
|
be used only when the `q` query string parameter is specified.
|
|
6156
6206
|
:param conflicts: The preferred behavior when update by query hits version conflicts:
|
|
6157
6207
|
`abort` or `proceed`.
|
|
6158
|
-
:param default_operator: The default operator for query string query: `
|
|
6159
|
-
`
|
|
6208
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
6209
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
6160
6210
|
is specified.
|
|
6161
6211
|
:param df: The field to use as default where no field prefix is given in the
|
|
6162
6212
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -287,6 +287,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
287
287
|
preference: t.Optional[str] = None,
|
|
288
288
|
pretty: t.Optional[bool] = None,
|
|
289
289
|
profile: t.Optional[bool] = None,
|
|
290
|
+
project_routing: t.Optional[str] = None,
|
|
290
291
|
q: t.Optional[str] = None,
|
|
291
292
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
292
293
|
request_cache: t.Optional[bool] = None,
|
|
@@ -408,6 +409,10 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
408
409
|
:param preference: Specify the node or shard the operation should be performed
|
|
409
410
|
on (default: random)
|
|
410
411
|
:param profile:
|
|
412
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
413
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
414
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
415
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
411
416
|
:param q: Query in the Lucene query string syntax
|
|
412
417
|
:param query: Defines the search definition using the Query DSL.
|
|
413
418
|
:param request_cache: Specify if request cache should be used for this request
|
|
@@ -528,6 +533,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
528
533
|
__query["preference"] = preference
|
|
529
534
|
if pretty is not None:
|
|
530
535
|
__query["pretty"] = pretty
|
|
536
|
+
if project_routing is not None:
|
|
537
|
+
__query["project_routing"] = project_routing
|
|
531
538
|
if q is not None:
|
|
532
539
|
__query["q"] = q
|
|
533
540
|
if request_cache is not None:
|
|
@@ -488,6 +488,7 @@ class CatClient(NamespacedClient):
|
|
|
488
488
|
help: t.Optional[bool] = None,
|
|
489
489
|
human: t.Optional[bool] = None,
|
|
490
490
|
pretty: t.Optional[bool] = None,
|
|
491
|
+
project_routing: t.Optional[str] = None,
|
|
491
492
|
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
492
493
|
time: t.Optional[
|
|
493
494
|
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
|
|
@@ -523,6 +524,10 @@ class CatClient(NamespacedClient):
|
|
|
523
524
|
wildcards.
|
|
524
525
|
:param help: When set to `true` will output available columns. This option can't
|
|
525
526
|
be combined with any other query string option.
|
|
527
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
528
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
529
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
530
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
526
531
|
:param s: List of columns that determine how the table should be sorted. Sorting
|
|
527
532
|
defaults to ascending and can be changed by setting `:asc` or `:desc` as
|
|
528
533
|
a suffix to the column name.
|
|
@@ -558,6 +563,8 @@ class CatClient(NamespacedClient):
|
|
|
558
563
|
__query["human"] = human
|
|
559
564
|
if pretty is not None:
|
|
560
565
|
__query["pretty"] = pretty
|
|
566
|
+
if project_routing is not None:
|
|
567
|
+
__query["project_routing"] = project_routing
|
|
561
568
|
if s is not None:
|
|
562
569
|
__query["s"] = s
|
|
563
570
|
if time is not None:
|
|
@@ -2502,7 +2509,7 @@ class CatClient(NamespacedClient):
|
|
|
2502
2509
|
error_trace: t.Optional[bool] = None,
|
|
2503
2510
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2504
2511
|
format: t.Optional[str] = None,
|
|
2505
|
-
full_id: t.Optional[
|
|
2512
|
+
full_id: t.Optional[bool] = None,
|
|
2506
2513
|
h: t.Optional[
|
|
2507
2514
|
t.Union[
|
|
2508
2515
|
t.Sequence[
|
|
@@ -49,6 +49,7 @@ class ClusterClient(NamespacedClient):
|
|
|
49
49
|
|
|
50
50
|
<p>Explain the shard allocations.
|
|
51
51
|
Get explanations for shard allocations in the cluster.
|
|
52
|
+
This API accepts the current_node, index, primary and shard parameters in the request body or in query parameters, but not in both at the same time.
|
|
52
53
|
For unassigned shards, it provides an explanation for why the shard is unassigned.
|
|
53
54
|
For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node.
|
|
54
55
|
This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.
|
|
@@ -57,17 +58,16 @@ class ClusterClient(NamespacedClient):
|
|
|
57
58
|
|
|
58
59
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain>`_
|
|
59
60
|
|
|
60
|
-
:param current_node:
|
|
61
|
-
|
|
61
|
+
:param current_node: Explain a shard only if it is currently located on the specified
|
|
62
|
+
node name or node ID.
|
|
62
63
|
:param include_disk_info: If true, returns information about disk usage and shard
|
|
63
64
|
sizes.
|
|
64
65
|
:param include_yes_decisions: If true, returns YES decisions in explanation.
|
|
65
|
-
:param index:
|
|
66
|
-
for.
|
|
66
|
+
:param index: The name of the index that you would like an explanation for.
|
|
67
67
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
68
|
-
:param primary: If true, returns explanation for the primary shard for the
|
|
69
|
-
shard ID.
|
|
70
|
-
:param shard:
|
|
68
|
+
:param primary: If true, returns an explanation for the primary shard for the
|
|
69
|
+
specified shard ID.
|
|
70
|
+
:param shard: An identifier for the shard that you would like an explanation
|
|
71
71
|
for.
|
|
72
72
|
"""
|
|
73
73
|
__path_parts: t.Dict[str, str] = {}
|
|
@@ -1124,7 +1124,8 @@ class ClusterClient(NamespacedClient):
|
|
|
1124
1124
|
when unavailable (missing or closed)
|
|
1125
1125
|
:param local: Return local information, do not retrieve the state from master
|
|
1126
1126
|
node (default: false)
|
|
1127
|
-
:param master_timeout:
|
|
1127
|
+
:param master_timeout: Timeout for waiting for new cluster state in case it is
|
|
1128
|
+
blocked
|
|
1128
1129
|
:param wait_for_metadata_version: Wait for the metadata version to be equal or
|
|
1129
1130
|
greater than the specified metadata version
|
|
1130
1131
|
:param wait_for_timeout: The maximum time to wait for wait_for_metadata_version
|
|
@@ -229,6 +229,7 @@ class EqlClient(NamespacedClient):
|
|
|
229
229
|
keep_on_completion: t.Optional[bool] = None,
|
|
230
230
|
max_samples_per_key: t.Optional[int] = None,
|
|
231
231
|
pretty: t.Optional[bool] = None,
|
|
232
|
+
project_routing: t.Optional[str] = None,
|
|
232
233
|
result_position: t.Optional[t.Union[str, t.Literal["head", "tail"]]] = None,
|
|
233
234
|
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
|
|
234
235
|
size: t.Optional[int] = None,
|
|
@@ -285,6 +286,10 @@ class EqlClient(NamespacedClient):
|
|
|
285
286
|
`size` parameter to get a smaller or larger set of samples. To retrieve more
|
|
286
287
|
than one sample per set of join keys, use the `max_samples_per_key` parameter.
|
|
287
288
|
Pipes are not supported for sample queries.
|
|
289
|
+
:param project_routing: Specifies a subset of projects to target for the search
|
|
290
|
+
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
291
|
+
queries: the _alias tag and a single value (possibly wildcarded). Examples:
|
|
292
|
+
_alias:my-project _alias:_origin _alias:*pr* Supported in serverless only.
|
|
288
293
|
:param result_position:
|
|
289
294
|
:param runtime_mappings:
|
|
290
295
|
:param size: For basic queries, the maximum number of matching events to return.
|
|
@@ -318,6 +323,8 @@ class EqlClient(NamespacedClient):
|
|
|
318
323
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
319
324
|
if pretty is not None:
|
|
320
325
|
__query["pretty"] = pretty
|
|
326
|
+
if project_routing is not None:
|
|
327
|
+
__query["project_routing"] = project_routing
|
|
321
328
|
if not __body:
|
|
322
329
|
if query is not None:
|
|
323
330
|
__body["query"] = query
|