elasticsearch 8.17.1__py3-none-any.whl → 8.18.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/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +2146 -859
- elasticsearch/_async/client/_base.py +0 -1
- elasticsearch/_async/client/async_search.py +44 -29
- elasticsearch/_async/client/autoscaling.py +32 -26
- elasticsearch/_async/client/cat.py +244 -169
- elasticsearch/_async/client/ccr.py +268 -128
- elasticsearch/_async/client/cluster.py +191 -164
- elasticsearch/_async/client/connector.py +212 -116
- elasticsearch/_async/client/dangling_indices.py +22 -16
- elasticsearch/_async/client/enrich.py +51 -11
- elasticsearch/_async/client/eql.py +54 -13
- elasticsearch/_async/client/esql.py +352 -4
- elasticsearch/_async/client/features.py +37 -27
- elasticsearch/_async/client/fleet.py +22 -10
- elasticsearch/_async/client/graph.py +10 -9
- elasticsearch/_async/client/ilm.py +108 -77
- elasticsearch/_async/client/indices.py +1112 -677
- elasticsearch/_async/client/inference.py +1875 -133
- elasticsearch/_async/client/ingest.py +83 -50
- elasticsearch/_async/client/license.py +90 -38
- elasticsearch/_async/client/logstash.py +20 -9
- elasticsearch/_async/client/migration.py +26 -17
- elasticsearch/_async/client/ml.py +642 -365
- elasticsearch/_async/client/monitoring.py +6 -3
- elasticsearch/_async/client/nodes.py +51 -53
- elasticsearch/_async/client/query_rules.py +59 -33
- elasticsearch/_async/client/rollup.py +124 -86
- elasticsearch/_async/client/search_application.py +60 -32
- elasticsearch/_async/client/searchable_snapshots.py +25 -12
- elasticsearch/_async/client/security.py +896 -558
- elasticsearch/_async/client/shutdown.py +34 -36
- elasticsearch/_async/client/simulate.py +22 -28
- elasticsearch/_async/client/slm.py +65 -40
- elasticsearch/_async/client/snapshot.py +190 -213
- elasticsearch/_async/client/sql.py +43 -22
- elasticsearch/_async/client/ssl.py +17 -18
- elasticsearch/_async/client/synonyms.py +58 -37
- elasticsearch/_async/client/tasks.py +77 -48
- elasticsearch/_async/client/text_structure.py +65 -56
- elasticsearch/_async/client/transform.py +124 -93
- elasticsearch/_async/client/watcher.py +116 -72
- elasticsearch/_async/client/xpack.py +18 -9
- elasticsearch/_async/helpers.py +1 -2
- elasticsearch/_sync/client/__init__.py +2146 -859
- elasticsearch/_sync/client/_base.py +0 -1
- elasticsearch/_sync/client/async_search.py +44 -29
- elasticsearch/_sync/client/autoscaling.py +32 -26
- elasticsearch/_sync/client/cat.py +244 -169
- elasticsearch/_sync/client/ccr.py +268 -128
- elasticsearch/_sync/client/cluster.py +191 -164
- elasticsearch/_sync/client/connector.py +212 -116
- elasticsearch/_sync/client/dangling_indices.py +22 -16
- elasticsearch/_sync/client/enrich.py +51 -11
- elasticsearch/_sync/client/eql.py +54 -13
- elasticsearch/_sync/client/esql.py +352 -4
- elasticsearch/_sync/client/features.py +37 -27
- elasticsearch/_sync/client/fleet.py +22 -10
- elasticsearch/_sync/client/graph.py +10 -9
- elasticsearch/_sync/client/ilm.py +108 -77
- elasticsearch/_sync/client/indices.py +1112 -677
- elasticsearch/_sync/client/inference.py +1875 -133
- elasticsearch/_sync/client/ingest.py +83 -50
- elasticsearch/_sync/client/license.py +90 -38
- elasticsearch/_sync/client/logstash.py +20 -9
- elasticsearch/_sync/client/migration.py +26 -17
- elasticsearch/_sync/client/ml.py +642 -365
- elasticsearch/_sync/client/monitoring.py +6 -3
- elasticsearch/_sync/client/nodes.py +51 -53
- elasticsearch/_sync/client/query_rules.py +59 -33
- elasticsearch/_sync/client/rollup.py +124 -86
- elasticsearch/_sync/client/search_application.py +60 -32
- elasticsearch/_sync/client/searchable_snapshots.py +25 -12
- elasticsearch/_sync/client/security.py +896 -558
- elasticsearch/_sync/client/shutdown.py +34 -36
- elasticsearch/_sync/client/simulate.py +22 -28
- elasticsearch/_sync/client/slm.py +65 -40
- elasticsearch/_sync/client/snapshot.py +190 -213
- elasticsearch/_sync/client/sql.py +43 -22
- elasticsearch/_sync/client/ssl.py +17 -18
- elasticsearch/_sync/client/synonyms.py +58 -37
- elasticsearch/_sync/client/tasks.py +77 -48
- elasticsearch/_sync/client/text_structure.py +65 -56
- elasticsearch/_sync/client/transform.py +124 -93
- elasticsearch/_sync/client/utils.py +1 -4
- elasticsearch/_sync/client/watcher.py +116 -72
- elasticsearch/_sync/client/xpack.py +18 -9
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/dsl/__init__.py +203 -0
- elasticsearch/dsl/_async/__init__.py +16 -0
- elasticsearch/dsl/_async/document.py +522 -0
- elasticsearch/dsl/_async/faceted_search.py +50 -0
- elasticsearch/dsl/_async/index.py +639 -0
- elasticsearch/dsl/_async/mapping.py +49 -0
- elasticsearch/dsl/_async/search.py +233 -0
- elasticsearch/dsl/_async/update_by_query.py +47 -0
- elasticsearch/dsl/_sync/__init__.py +16 -0
- elasticsearch/dsl/_sync/document.py +514 -0
- elasticsearch/dsl/_sync/faceted_search.py +50 -0
- elasticsearch/dsl/_sync/index.py +597 -0
- elasticsearch/dsl/_sync/mapping.py +49 -0
- elasticsearch/dsl/_sync/search.py +226 -0
- elasticsearch/dsl/_sync/update_by_query.py +45 -0
- elasticsearch/dsl/aggs.py +3730 -0
- elasticsearch/dsl/analysis.py +341 -0
- elasticsearch/dsl/async_connections.py +37 -0
- elasticsearch/dsl/connections.py +142 -0
- elasticsearch/dsl/document.py +20 -0
- elasticsearch/dsl/document_base.py +444 -0
- elasticsearch/dsl/exceptions.py +32 -0
- elasticsearch/dsl/faceted_search.py +28 -0
- elasticsearch/dsl/faceted_search_base.py +489 -0
- elasticsearch/dsl/field.py +4254 -0
- elasticsearch/dsl/function.py +180 -0
- elasticsearch/dsl/index.py +23 -0
- elasticsearch/dsl/index_base.py +178 -0
- elasticsearch/dsl/mapping.py +19 -0
- elasticsearch/dsl/mapping_base.py +219 -0
- elasticsearch/dsl/query.py +2816 -0
- elasticsearch/dsl/response/__init__.py +388 -0
- elasticsearch/dsl/response/aggs.py +100 -0
- elasticsearch/dsl/response/hit.py +53 -0
- elasticsearch/dsl/search.py +20 -0
- elasticsearch/dsl/search_base.py +1040 -0
- elasticsearch/dsl/serializer.py +34 -0
- elasticsearch/dsl/types.py +6471 -0
- elasticsearch/dsl/update_by_query.py +19 -0
- elasticsearch/dsl/update_by_query_base.py +149 -0
- elasticsearch/dsl/utils.py +687 -0
- elasticsearch/dsl/wrappers.py +119 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/METADATA +12 -2
- elasticsearch-8.18.0.dist-info/RECORD +161 -0
- elasticsearch-8.17.1.dist-info/RECORD +0 -119
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.18.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -298,7 +298,6 @@ class BaseClient:
|
|
|
298
298
|
def mimetype_header_to_compat(header: str) -> None:
|
|
299
299
|
# Converts all parts of a Accept/Content-Type headers
|
|
300
300
|
# from application/X -> application/vnd.elasticsearch+X
|
|
301
|
-
nonlocal request_headers
|
|
302
301
|
mimetype = request_headers.get(header, None)
|
|
303
302
|
if mimetype:
|
|
304
303
|
request_headers[header] = _COMPAT_MIMETYPE_RE.sub(
|
|
@@ -36,13 +36,15 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
40
|
-
Otherwise, the saved search results are deleted. If the Elasticsearch security
|
|
41
|
-
features are enabled, the deletion of a specific async search is restricted to:
|
|
42
|
-
the authenticated user that submitted the original search request; users that
|
|
43
|
-
have the `cancel_task` cluster privilege.
|
|
39
|
+
.. raw:: html
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
<p>Delete an async search.</p>
|
|
42
|
+
<p>If the asynchronous search is still running, it is cancelled.
|
|
43
|
+
Otherwise, the saved search results are deleted.
|
|
44
|
+
If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the <code>cancel_task</code> cluster privilege.</p>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
|
|
46
48
|
|
|
47
49
|
:param id: A unique identifier for the async search.
|
|
48
50
|
"""
|
|
@@ -85,16 +87,18 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
85
87
|
] = None,
|
|
86
88
|
) -> ObjectApiResponse[t.Any]:
|
|
87
89
|
"""
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
.. raw:: html
|
|
91
|
+
|
|
92
|
+
<p>Get async search results.</p>
|
|
93
|
+
<p>Retrieve the results of a previously submitted asynchronous search request.
|
|
94
|
+
If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.</p>
|
|
95
|
+
|
|
92
96
|
|
|
93
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
97
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
|
|
94
98
|
|
|
95
99
|
:param id: A unique identifier for the async search.
|
|
96
|
-
:param keep_alive:
|
|
97
|
-
the cluster. When not specified, the `keep_alive` set with the corresponding
|
|
100
|
+
:param keep_alive: The length of time that the async search should be available
|
|
101
|
+
in the cluster. When not specified, the `keep_alive` set with the corresponding
|
|
98
102
|
submit async request will be used. Otherwise, it is possible to override
|
|
99
103
|
the value and extend the validity of the request. When this period expires,
|
|
100
104
|
the search, if still running, is cancelled. If the search is completed, its
|
|
@@ -149,15 +153,21 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
149
153
|
pretty: t.Optional[bool] = None,
|
|
150
154
|
) -> ObjectApiResponse[t.Any]:
|
|
151
155
|
"""
|
|
152
|
-
|
|
153
|
-
request given its identifier, without retrieving search results. If the Elasticsearch
|
|
154
|
-
security features are enabled, use of this API is restricted to the `monitoring_user`
|
|
155
|
-
role.
|
|
156
|
+
.. raw:: html
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
<p>Get the async search status.</p>
|
|
159
|
+
<p>Get the status of a previously submitted async search request given its identifier, without retrieving search results.
|
|
160
|
+
If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:</p>
|
|
161
|
+
<ul>
|
|
162
|
+
<li>The user or API key that submitted the original async search request.</li>
|
|
163
|
+
<li>Users that have the <code>monitor</code> cluster privilege or greater privileges.</li>
|
|
164
|
+
</ul>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
|
|
158
168
|
|
|
159
169
|
:param id: A unique identifier for the async search.
|
|
160
|
-
:param keep_alive:
|
|
170
|
+
:param keep_alive: The length of time that the async search needs to be available.
|
|
161
171
|
Ongoing async searches and any saved search results are deleted after this
|
|
162
172
|
period.
|
|
163
173
|
"""
|
|
@@ -264,6 +274,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
264
274
|
ignore_throttled: t.Optional[bool] = None,
|
|
265
275
|
ignore_unavailable: t.Optional[bool] = None,
|
|
266
276
|
indices_boost: t.Optional[t.Sequence[t.Mapping[str, float]]] = None,
|
|
277
|
+
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
267
278
|
keep_on_completion: t.Optional[bool] = None,
|
|
268
279
|
knn: t.Optional[
|
|
269
280
|
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
@@ -326,17 +337,16 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
326
337
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
327
338
|
) -> ObjectApiResponse[t.Any]:
|
|
328
339
|
"""
|
|
329
|
-
|
|
330
|
-
shards get sorted based on minimum and maximum value that they hold for that
|
|
331
|
-
field. Partial results become available following the sort criteria that was
|
|
332
|
-
requested. Warning: Asynchronous search does not support scroll or search requests
|
|
333
|
-
that include only the suggest section. By default, Elasticsearch does not allow
|
|
334
|
-
you to store an async search response larger than 10Mb and an attempt to do this
|
|
335
|
-
results in an error. The maximum allowed size for a stored async search response
|
|
336
|
-
can be set by changing the `search.max_async_search_response_size` cluster level
|
|
337
|
-
setting.
|
|
340
|
+
.. raw:: html
|
|
338
341
|
|
|
339
|
-
|
|
342
|
+
<p>Run an async search.</p>
|
|
343
|
+
<p>When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.</p>
|
|
344
|
+
<p>Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.</p>
|
|
345
|
+
<p>By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
|
|
346
|
+
The maximum allowed size for a stored async search response can be set by changing the <code>search.max_async_search_response_size</code> cluster level setting.</p>
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html>`_
|
|
340
350
|
|
|
341
351
|
:param index: A comma-separated list of index names to search; use `_all` or
|
|
342
352
|
empty string to perform the operation on all indices
|
|
@@ -379,6 +389,9 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
379
389
|
:param ignore_unavailable: Whether specified concrete indices should be ignored
|
|
380
390
|
when unavailable (missing or closed)
|
|
381
391
|
:param indices_boost: Boosts the _score of documents from specified indices.
|
|
392
|
+
:param keep_alive: Specifies how long the async search needs to be available.
|
|
393
|
+
Ongoing async searches and any saved search results are deleted after this
|
|
394
|
+
period.
|
|
382
395
|
:param keep_on_completion: If `true`, results are stored for later retrieval
|
|
383
396
|
when the search completes within the `wait_for_completion_timeout`.
|
|
384
397
|
:param knn: Defines the approximate kNN search to run.
|
|
@@ -505,6 +518,8 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
505
518
|
__query["ignore_throttled"] = ignore_throttled
|
|
506
519
|
if ignore_unavailable is not None:
|
|
507
520
|
__query["ignore_unavailable"] = ignore_unavailable
|
|
521
|
+
if keep_alive is not None:
|
|
522
|
+
__query["keep_alive"] = keep_alive
|
|
508
523
|
if keep_on_completion is not None:
|
|
509
524
|
__query["keep_on_completion"] = keep_on_completion
|
|
510
525
|
if lenient is not None:
|
|
@@ -38,11 +38,13 @@ class AutoscalingClient(NamespacedClient):
|
|
|
38
38
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
39
39
|
) -> ObjectApiResponse[t.Any]:
|
|
40
40
|
"""
|
|
41
|
-
|
|
42
|
-
by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
43
|
-
Direct use is not supported.
|
|
41
|
+
.. raw:: html
|
|
44
42
|
|
|
45
|
-
|
|
43
|
+
<p>Delete an autoscaling policy.</p>
|
|
44
|
+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-delete-autoscaling-policy.html>`_
|
|
46
48
|
|
|
47
49
|
:param name: the name of the autoscaling policy
|
|
48
50
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -89,20 +91,20 @@ class AutoscalingClient(NamespacedClient):
|
|
|
89
91
|
pretty: t.Optional[bool] = None,
|
|
90
92
|
) -> ObjectApiResponse[t.Any]:
|
|
91
93
|
"""
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
94
|
+
.. raw:: html
|
|
95
|
+
|
|
96
|
+
<p>Get the autoscaling capacity.</p>
|
|
97
|
+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
98
|
+
<p>This API gets the current autoscaling capacity based on the configured autoscaling policy.
|
|
99
|
+
It will return information to size the cluster appropriately to the current workload.</p>
|
|
100
|
+
<p>The <code>required_capacity</code> is calculated as the maximum of the <code>required_capacity</code> result of all individual deciders that are enabled for the policy.</p>
|
|
101
|
+
<p>The operator should verify that the <code>current_nodes</code> match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information.</p>
|
|
102
|
+
<p>The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required.
|
|
103
|
+
This information is provided for diagnosis only.
|
|
104
|
+
Do not use this information to make autoscaling decisions.</p>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html>`_
|
|
106
108
|
|
|
107
109
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
108
110
|
no response is received before the timeout expires, the request fails and
|
|
@@ -143,11 +145,13 @@ class AutoscalingClient(NamespacedClient):
|
|
|
143
145
|
pretty: t.Optional[bool] = None,
|
|
144
146
|
) -> ObjectApiResponse[t.Any]:
|
|
145
147
|
"""
|
|
146
|
-
|
|
147
|
-
Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes.
|
|
148
|
-
Direct use is not supported.
|
|
148
|
+
.. raw:: html
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
<p>Get an autoscaling policy.</p>
|
|
151
|
+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html>`_
|
|
151
155
|
|
|
152
156
|
:param name: the name of the autoscaling policy
|
|
153
157
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -196,11 +200,13 @@ class AutoscalingClient(NamespacedClient):
|
|
|
196
200
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
197
201
|
) -> ObjectApiResponse[t.Any]:
|
|
198
202
|
"""
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
.. raw:: html
|
|
204
|
+
|
|
205
|
+
<p>Create or update an autoscaling policy.</p>
|
|
206
|
+
<p>NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.</p>
|
|
207
|
+
|
|
202
208
|
|
|
203
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
209
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-put-autoscaling-policy.html>`_
|
|
204
210
|
|
|
205
211
|
:param name: the name of the autoscaling policy
|
|
206
212
|
:param policy:
|