elasticsearch 8.19.1__py3-none-any.whl → 8.19.2__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 +27 -49
- elasticsearch/_async/client/cat.py +481 -25
- elasticsearch/_async/client/connector.py +3 -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 -31
- elasticsearch/_async/client/inference.py +35 -121
- elasticsearch/_async/client/nodes.py +2 -2
- elasticsearch/_async/client/shutdown.py +5 -15
- elasticsearch/_async/client/slm.py +1 -5
- elasticsearch/_async/client/streams.py +185 -0
- elasticsearch/_async/client/watcher.py +1 -5
- elasticsearch/_async/helpers.py +58 -9
- elasticsearch/_sync/client/__init__.py +27 -49
- elasticsearch/_sync/client/cat.py +481 -25
- elasticsearch/_sync/client/connector.py +3 -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 -31
- elasticsearch/_sync/client/inference.py +35 -121
- elasticsearch/_sync/client/nodes.py +2 -2
- elasticsearch/_sync/client/shutdown.py +5 -15
- elasticsearch/_sync/client/slm.py +1 -5
- elasticsearch/_sync/client/streams.py +185 -0
- elasticsearch/_sync/client/watcher.py +1 -5
- elasticsearch/_version.py +2 -1
- elasticsearch/client.py +2 -0
- elasticsearch/compat.py +45 -1
- elasticsearch/dsl/__init__.py +28 -0
- elasticsearch/dsl/aggs.py +97 -0
- elasticsearch/dsl/document_base.py +16 -1
- elasticsearch/dsl/field.py +12 -1
- elasticsearch/dsl/query.py +1 -1
- elasticsearch/dsl/response/__init__.py +3 -0
- elasticsearch/dsl/types.py +185 -9
- elasticsearch/helpers/__init__.py +10 -1
- elasticsearch/helpers/actions.py +106 -33
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.2.dist-info}/METADATA +2 -2
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.2.dist-info}/RECORD +44 -42
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.2.dist-info}/WHEEL +0 -0
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.2.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.19.1.dist-info → elasticsearch-8.19.2.dist-info}/licenses/NOTICE +0 -0
|
@@ -75,6 +75,7 @@ from .slm import SlmClient
|
|
|
75
75
|
from .snapshot import SnapshotClient
|
|
76
76
|
from .sql import SqlClient
|
|
77
77
|
from .ssl import SslClient
|
|
78
|
+
from .streams import StreamsClient
|
|
78
79
|
from .synonyms import SynonymsClient
|
|
79
80
|
from .tasks import TasksClient
|
|
80
81
|
from .text_structure import TextStructureClient
|
|
@@ -470,6 +471,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
470
471
|
self.shutdown = ShutdownClient(self)
|
|
471
472
|
self.sql = SqlClient(self)
|
|
472
473
|
self.ssl = SslClient(self)
|
|
474
|
+
self.streams = StreamsClient(self)
|
|
473
475
|
self.synonyms = SynonymsClient(self)
|
|
474
476
|
self.text_structure = TextStructureClient(self)
|
|
475
477
|
self.transform = TransformClient(self)
|
|
@@ -935,11 +937,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
935
937
|
if not __body:
|
|
936
938
|
if id is not None:
|
|
937
939
|
__body["id"] = id
|
|
938
|
-
|
|
939
|
-
__body = None # type: ignore[assignment]
|
|
940
|
-
__headers = {"accept": "application/json"}
|
|
941
|
-
if __body is not None:
|
|
942
|
-
__headers["content-type"] = "application/json"
|
|
940
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
943
941
|
return await self.perform_request( # type: ignore[return-value]
|
|
944
942
|
"DELETE",
|
|
945
943
|
__path,
|
|
@@ -1012,8 +1010,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1012
1010
|
This parameter can be used only when the `q` query string parameter is specified.
|
|
1013
1011
|
:param analyzer: The analyzer to use for the query string. This parameter can
|
|
1014
1012
|
be used only when the `q` query string parameter is specified.
|
|
1015
|
-
:param default_operator: The default operator for query string query: `
|
|
1016
|
-
`
|
|
1013
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
1014
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
1017
1015
|
is specified.
|
|
1018
1016
|
:param df: The field to use as a default when no field prefix is given in the
|
|
1019
1017
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -1134,7 +1132,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1134
1132
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1135
1133
|
version: t.Optional[int] = None,
|
|
1136
1134
|
version_type: t.Optional[
|
|
1137
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1135
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1138
1136
|
] = None,
|
|
1139
1137
|
wait_for_active_shards: t.Optional[
|
|
1140
1138
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -1313,7 +1311,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1313
1311
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
1314
1312
|
version: t.Optional[int] = None,
|
|
1315
1313
|
version_type: t.Optional[
|
|
1316
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1314
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1317
1315
|
] = None,
|
|
1318
1316
|
wait_for_active_shards: t.Optional[
|
|
1319
1317
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -1558,8 +1556,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1558
1556
|
used only when the `q` query string parameter is specified.
|
|
1559
1557
|
:param conflicts: What to do if delete by query hits version conflicts: `abort`
|
|
1560
1558
|
or `proceed`.
|
|
1561
|
-
:param default_operator: The default operator for query string query: `
|
|
1562
|
-
`
|
|
1559
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
1560
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
1563
1561
|
is specified.
|
|
1564
1562
|
:param df: The field to use as default where no field prefix is given in the
|
|
1565
1563
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -1853,7 +1851,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1853
1851
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1854
1852
|
version: t.Optional[int] = None,
|
|
1855
1853
|
version_type: t.Optional[
|
|
1856
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1854
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1857
1855
|
] = None,
|
|
1858
1856
|
) -> HeadApiResponse:
|
|
1859
1857
|
"""
|
|
@@ -1982,7 +1980,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1982
1980
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1983
1981
|
version: t.Optional[int] = None,
|
|
1984
1982
|
version_type: t.Optional[
|
|
1985
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
1983
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
1986
1984
|
] = None,
|
|
1987
1985
|
) -> HeadApiResponse:
|
|
1988
1986
|
"""
|
|
@@ -2111,8 +2109,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2111
2109
|
This parameter can be used only when the `q` query string parameter is specified.
|
|
2112
2110
|
:param analyzer: The analyzer to use for the query string. This parameter can
|
|
2113
2111
|
be used only when the `q` query string parameter is specified.
|
|
2114
|
-
:param default_operator: The default operator for query string query: `
|
|
2115
|
-
`
|
|
2112
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
2113
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
2116
2114
|
is specified.
|
|
2117
2115
|
:param df: The field to use as default where no field prefix is given in the
|
|
2118
2116
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -2354,7 +2352,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2354
2352
|
stored_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2355
2353
|
version: t.Optional[int] = None,
|
|
2356
2354
|
version_type: t.Optional[
|
|
2357
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2355
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2358
2356
|
] = None,
|
|
2359
2357
|
) -> ObjectApiResponse[t.Any]:
|
|
2360
2358
|
"""
|
|
@@ -2641,7 +2639,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2641
2639
|
source_includes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
2642
2640
|
version: t.Optional[int] = None,
|
|
2643
2641
|
version_type: t.Optional[
|
|
2644
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2642
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2645
2643
|
] = None,
|
|
2646
2644
|
) -> ObjectApiResponse[t.Any]:
|
|
2647
2645
|
"""
|
|
@@ -2821,7 +2819,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2821
2819
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
2822
2820
|
version: t.Optional[int] = None,
|
|
2823
2821
|
version_type: t.Optional[
|
|
2824
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
2822
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
2825
2823
|
] = None,
|
|
2826
2824
|
wait_for_active_shards: t.Optional[
|
|
2827
2825
|
t.Union[int, t.Union[str, t.Literal["all", "index-setting"]]]
|
|
@@ -3185,11 +3183,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3185
3183
|
__body["_source"] = source
|
|
3186
3184
|
if stored_fields is not None:
|
|
3187
3185
|
__body["stored_fields"] = stored_fields
|
|
3188
|
-
|
|
3189
|
-
__body = None # type: ignore[assignment]
|
|
3190
|
-
__headers = {"accept": "application/json"}
|
|
3191
|
-
if __body is not None:
|
|
3192
|
-
__headers["content-type"] = "application/json"
|
|
3186
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
3193
3187
|
return await self.perform_request( # type: ignore[return-value]
|
|
3194
3188
|
"POST",
|
|
3195
3189
|
__path,
|
|
@@ -3614,7 +3608,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3614
3608
|
term_statistics: t.Optional[bool] = None,
|
|
3615
3609
|
version: t.Optional[int] = None,
|
|
3616
3610
|
version_type: t.Optional[
|
|
3617
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
3611
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
3618
3612
|
] = None,
|
|
3619
3613
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3620
3614
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -4024,7 +4018,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4024
4018
|
)
|
|
4025
4019
|
|
|
4026
4020
|
@_rewrite_parameters(
|
|
4027
|
-
body_fields=("dest", "source", "conflicts", "max_docs", "script"
|
|
4021
|
+
body_fields=("dest", "source", "conflicts", "max_docs", "script"),
|
|
4028
4022
|
)
|
|
4029
4023
|
async def reindex(
|
|
4030
4024
|
self,
|
|
@@ -4042,7 +4036,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4042
4036
|
require_alias: t.Optional[bool] = None,
|
|
4043
4037
|
script: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4044
4038
|
scroll: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4045
|
-
size: t.Optional[int] = None,
|
|
4046
4039
|
slices: t.Optional[t.Union[int, t.Union[str, t.Literal["auto"]]]] = None,
|
|
4047
4040
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
4048
4041
|
wait_for_active_shards: t.Optional[
|
|
@@ -4214,7 +4207,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4214
4207
|
reindexing.
|
|
4215
4208
|
:param scroll: The period of time that a consistent view of the index should
|
|
4216
4209
|
be maintained for scrolled search.
|
|
4217
|
-
:param size:
|
|
4218
4210
|
:param slices: The number of slices this task should be divided into. It defaults
|
|
4219
4211
|
to one slice, which means the task isn't sliced into subtasks. Reindex supports
|
|
4220
4212
|
sliced scroll to parallelize the reindexing process. This parallelization
|
|
@@ -4279,8 +4271,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4279
4271
|
__body["max_docs"] = max_docs
|
|
4280
4272
|
if script is not None:
|
|
4281
4273
|
__body["script"] = script
|
|
4282
|
-
if size is not None:
|
|
4283
|
-
__body["size"] = size
|
|
4284
4274
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
4285
4275
|
return await self.perform_request( # type: ignore[return-value]
|
|
4286
4276
|
"POST",
|
|
@@ -4407,11 +4397,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4407
4397
|
__body["params"] = params
|
|
4408
4398
|
if source is not None:
|
|
4409
4399
|
__body["source"] = source
|
|
4410
|
-
|
|
4411
|
-
__body = None # type: ignore[assignment]
|
|
4412
|
-
__headers = {"accept": "application/json"}
|
|
4413
|
-
if __body is not None:
|
|
4414
|
-
__headers["content-type"] = "application/json"
|
|
4400
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
4415
4401
|
return await self.perform_request( # type: ignore[return-value]
|
|
4416
4402
|
"POST",
|
|
4417
4403
|
__path,
|
|
@@ -4494,11 +4480,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4494
4480
|
__body["context_setup"] = context_setup
|
|
4495
4481
|
if script is not None:
|
|
4496
4482
|
__body["script"] = script
|
|
4497
|
-
|
|
4498
|
-
__body = None # type: ignore[assignment]
|
|
4499
|
-
__headers = {"accept": "application/json"}
|
|
4500
|
-
if __body is not None:
|
|
4501
|
-
__headers["content-type"] = "application/json"
|
|
4483
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
4502
4484
|
return await self.perform_request( # type: ignore[return-value]
|
|
4503
4485
|
"POST",
|
|
4504
4486
|
__path,
|
|
@@ -4774,8 +4756,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4774
4756
|
node and the remote clusters are minimized when running cross-cluster search
|
|
4775
4757
|
(CCS) requests.
|
|
4776
4758
|
:param collapse: Collapses search results the values of the specified field.
|
|
4777
|
-
:param default_operator: The default operator for the query string query: `
|
|
4778
|
-
or `
|
|
4759
|
+
:param default_operator: The default operator for the query string query: `and`
|
|
4760
|
+
or `or`. This parameter can be used only when the `q` query string parameter
|
|
4779
4761
|
is specified.
|
|
4780
4762
|
:param df: The field to use as a default when no field prefix is given in the
|
|
4781
4763
|
query string. This parameter can be used only when the `q` query string parameter
|
|
@@ -5977,11 +5959,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5977
5959
|
__body["string"] = string
|
|
5978
5960
|
if timeout is not None:
|
|
5979
5961
|
__body["timeout"] = timeout
|
|
5980
|
-
|
|
5981
|
-
__body = None # type: ignore[assignment]
|
|
5982
|
-
__headers = {"accept": "application/json"}
|
|
5983
|
-
if __body is not None:
|
|
5984
|
-
__headers["content-type"] = "application/json"
|
|
5962
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
5985
5963
|
return await self.perform_request( # type: ignore[return-value]
|
|
5986
5964
|
"POST",
|
|
5987
5965
|
__path,
|
|
@@ -6031,7 +6009,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6031
6009
|
term_statistics: t.Optional[bool] = None,
|
|
6032
6010
|
version: t.Optional[int] = None,
|
|
6033
6011
|
version_type: t.Optional[
|
|
6034
|
-
t.Union[str, t.Literal["external", "external_gte", "
|
|
6012
|
+
t.Union[str, t.Literal["external", "external_gte", "internal"]]
|
|
6035
6013
|
] = None,
|
|
6036
6014
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
6037
6015
|
) -> ObjectApiResponse[t.Any]:
|
|
@@ -6497,8 +6475,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6497
6475
|
be used only when the `q` query string parameter is specified.
|
|
6498
6476
|
:param conflicts: The preferred behavior when update by query hits version conflicts:
|
|
6499
6477
|
`abort` or `proceed`.
|
|
6500
|
-
:param default_operator: The default operator for query string query: `
|
|
6501
|
-
`
|
|
6478
|
+
:param default_operator: The default operator for query string query: `and` or
|
|
6479
|
+
`or`. This parameter can be used only when the `q` query string parameter
|
|
6502
6480
|
is specified.
|
|
6503
6481
|
:param df: The field to use as default where no field prefix is given in the
|
|
6504
6482
|
query string. This parameter can be used only when the `q` query string parameter
|