elasticsearch 9.2.0__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.
- elasticsearch/_async/client/__init__.py +108 -85
- elasticsearch/_async/client/async_search.py +7 -6
- elasticsearch/_async/client/autoscaling.py +15 -4
- elasticsearch/_async/client/cat.py +203 -10
- elasticsearch/_async/client/ccr.py +10 -10
- elasticsearch/_async/client/cluster.py +98 -66
- elasticsearch/_async/client/connector.py +42 -41
- elasticsearch/_async/client/dangling_indices.py +8 -12
- elasticsearch/_async/client/enrich.py +10 -10
- elasticsearch/_async/client/eql.py +17 -16
- elasticsearch/_async/client/esql.py +173 -24
- elasticsearch/_async/client/features.py +6 -6
- elasticsearch/_async/client/fleet.py +8 -8
- elasticsearch/_async/client/graph.py +3 -3
- elasticsearch/_async/client/ilm.py +18 -18
- elasticsearch/_async/client/indices.py +564 -149
- elasticsearch/_async/client/inference.py +374 -64
- elasticsearch/_async/client/ingest.py +9 -9
- elasticsearch/_async/client/license.py +5 -7
- elasticsearch/_async/client/logstash.py +4 -4
- elasticsearch/_async/client/migration.py +6 -6
- elasticsearch/_async/client/ml.py +132 -88
- elasticsearch/_async/client/monitoring.py +4 -3
- elasticsearch/_async/client/nodes.py +182 -20
- elasticsearch/_async/client/project.py +13 -4
- elasticsearch/_async/client/query_rules.py +16 -16
- elasticsearch/_async/client/rollup.py +21 -21
- elasticsearch/_async/client/search_application.py +19 -19
- elasticsearch/_async/client/searchable_snapshots.py +10 -10
- elasticsearch/_async/client/security.py +34 -10
- elasticsearch/_async/client/shutdown.py +15 -4
- elasticsearch/_async/client/simulate.py +4 -4
- elasticsearch/_async/client/slm.py +17 -17
- elasticsearch/_async/client/snapshot.py +21 -21
- elasticsearch/_async/client/sql.py +17 -16
- elasticsearch/_async/client/streams.py +6 -7
- elasticsearch/_async/client/synonyms.py +10 -10
- elasticsearch/_async/client/tasks.py +8 -8
- elasticsearch/_async/client/text_structure.py +16 -12
- elasticsearch/_async/client/transform.py +51 -12
- elasticsearch/_async/client/utils.py +4 -2
- elasticsearch/_async/client/watcher.py +26 -26
- elasticsearch/_async/client/xpack.py +6 -5
- elasticsearch/_sync/client/__init__.py +110 -85
- elasticsearch/_sync/client/async_search.py +7 -6
- elasticsearch/_sync/client/autoscaling.py +15 -4
- elasticsearch/_sync/client/cat.py +203 -10
- elasticsearch/_sync/client/ccr.py +10 -10
- elasticsearch/_sync/client/cluster.py +98 -66
- elasticsearch/_sync/client/connector.py +42 -41
- elasticsearch/_sync/client/dangling_indices.py +8 -12
- elasticsearch/_sync/client/enrich.py +10 -10
- elasticsearch/_sync/client/eql.py +17 -16
- elasticsearch/_sync/client/esql.py +173 -24
- elasticsearch/_sync/client/features.py +6 -6
- elasticsearch/_sync/client/fleet.py +8 -8
- elasticsearch/_sync/client/graph.py +3 -3
- elasticsearch/_sync/client/ilm.py +18 -18
- elasticsearch/_sync/client/indices.py +564 -149
- elasticsearch/_sync/client/inference.py +374 -64
- elasticsearch/_sync/client/ingest.py +9 -9
- elasticsearch/_sync/client/license.py +5 -7
- elasticsearch/_sync/client/logstash.py +4 -4
- elasticsearch/_sync/client/migration.py +6 -6
- elasticsearch/_sync/client/ml.py +132 -88
- elasticsearch/_sync/client/monitoring.py +4 -3
- elasticsearch/_sync/client/nodes.py +182 -20
- elasticsearch/_sync/client/project.py +13 -4
- elasticsearch/_sync/client/project_routing.py +264 -0
- elasticsearch/_sync/client/query_rules.py +16 -16
- elasticsearch/_sync/client/rollup.py +21 -21
- elasticsearch/_sync/client/search_application.py +19 -19
- elasticsearch/_sync/client/searchable_snapshots.py +10 -10
- elasticsearch/_sync/client/security.py +34 -10
- elasticsearch/_sync/client/shutdown.py +15 -4
- elasticsearch/_sync/client/simulate.py +4 -4
- elasticsearch/_sync/client/slm.py +17 -17
- elasticsearch/_sync/client/snapshot.py +21 -21
- elasticsearch/_sync/client/sql.py +17 -16
- elasticsearch/_sync/client/streams.py +6 -7
- elasticsearch/_sync/client/synonyms.py +10 -10
- elasticsearch/_sync/client/tasks.py +8 -8
- elasticsearch/_sync/client/text_structure.py +16 -12
- elasticsearch/_sync/client/transform.py +51 -12
- elasticsearch/_sync/client/utils.py +16 -2
- elasticsearch/_sync/client/watcher.py +26 -26
- elasticsearch/_sync/client/xpack.py +6 -5
- elasticsearch/_version.py +2 -2
- elasticsearch/dsl/__init__.py +4 -0
- elasticsearch/dsl/_async/document.py +4 -5
- elasticsearch/dsl/_async/index.py +1 -1
- elasticsearch/dsl/_async/search.py +2 -3
- elasticsearch/dsl/_sync/document.py +4 -5
- elasticsearch/dsl/_sync/index.py +1 -1
- elasticsearch/dsl/_sync/search.py +2 -3
- elasticsearch/dsl/aggs.py +9 -9
- elasticsearch/dsl/async_connections.py +1 -2
- elasticsearch/dsl/connections.py +1 -2
- elasticsearch/dsl/document_base.py +1 -1
- elasticsearch/dsl/field.py +90 -6
- elasticsearch/dsl/pydantic.py +1 -1
- elasticsearch/dsl/query.py +25 -2
- elasticsearch/dsl/response/__init__.py +2 -0
- elasticsearch/dsl/serializer.py +1 -2
- elasticsearch/dsl/types.py +63 -8
- elasticsearch/dsl/utils.py +12 -4
- elasticsearch/esql/esql.py +1 -1
- elasticsearch/esql/functions.py +926 -252
- elasticsearch/helpers/__init__.py +2 -0
- elasticsearch/helpers/actions.py +21 -0
- elasticsearch/helpers/vectorstore/__init__.py +7 -7
- elasticsearch/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +8 -5
- elasticsearch/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +8 -5
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/METADATA +2 -1
- elasticsearch-9.3.0.dist-info/RECORD +169 -0
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/WHEEL +1 -1
- elasticsearch-9.2.0.dist-info/RECORD +0 -168
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.2.0.dist-info → elasticsearch-9.3.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -40,8 +40,8 @@ class SlmClient(NamespacedClient):
|
|
|
40
40
|
"""
|
|
41
41
|
.. raw:: html
|
|
42
42
|
|
|
43
|
-
<p>Delete a policy
|
|
44
|
-
Delete a snapshot lifecycle policy definition.
|
|
43
|
+
<p>Delete a policy.</p>
|
|
44
|
+
<p>Delete a snapshot lifecycle policy definition.
|
|
45
45
|
This operation prevents any future snapshots from being taken but does not cancel in-progress snapshots or remove previously-taken snapshots.</p>
|
|
46
46
|
|
|
47
47
|
|
|
@@ -96,8 +96,8 @@ class SlmClient(NamespacedClient):
|
|
|
96
96
|
"""
|
|
97
97
|
.. raw:: html
|
|
98
98
|
|
|
99
|
-
<p>Run a policy
|
|
100
|
-
Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.
|
|
99
|
+
<p>Run a policy.</p>
|
|
100
|
+
<p>Immediately create a snapshot according to the snapshot lifecycle policy without waiting for the scheduled time.
|
|
101
101
|
The snapshot policy is normally applied according to its schedule, but you might want to manually run a policy before performing an upgrade or other maintenance.</p>
|
|
102
102
|
|
|
103
103
|
|
|
@@ -151,8 +151,8 @@ class SlmClient(NamespacedClient):
|
|
|
151
151
|
"""
|
|
152
152
|
.. raw:: html
|
|
153
153
|
|
|
154
|
-
<p>Run a retention policy
|
|
155
|
-
Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.
|
|
154
|
+
<p>Run a retention policy.</p>
|
|
155
|
+
<p>Manually apply the retention policy to force immediate removal of snapshots that are expired according to the snapshot lifecycle policy retention rules.
|
|
156
156
|
The retention policy is normally applied according to its schedule.</p>
|
|
157
157
|
|
|
158
158
|
|
|
@@ -204,13 +204,13 @@ class SlmClient(NamespacedClient):
|
|
|
204
204
|
"""
|
|
205
205
|
.. raw:: html
|
|
206
206
|
|
|
207
|
-
<p>Get policy information
|
|
208
|
-
Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
|
|
207
|
+
<p>Get policy information.</p>
|
|
208
|
+
<p>Get snapshot lifecycle policy definitions and information about the latest snapshot attempts.</p>
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle>`_
|
|
212
212
|
|
|
213
|
-
:param policy_id:
|
|
213
|
+
:param policy_id: A comma-separated list of snapshot lifecycle policy identifiers.
|
|
214
214
|
:param master_timeout: The period to wait for a connection to the master node.
|
|
215
215
|
If no response is received before the timeout expires, the request fails
|
|
216
216
|
and returns an error.
|
|
@@ -261,8 +261,8 @@ class SlmClient(NamespacedClient):
|
|
|
261
261
|
"""
|
|
262
262
|
.. raw:: html
|
|
263
263
|
|
|
264
|
-
<p>Get snapshot lifecycle management statistics
|
|
265
|
-
Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
|
|
264
|
+
<p>Get snapshot lifecycle management statistics.</p>
|
|
265
|
+
<p>Get global and policy-level statistics about actions taken by snapshot lifecycle management.</p>
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats>`_
|
|
@@ -373,8 +373,8 @@ class SlmClient(NamespacedClient):
|
|
|
373
373
|
"""
|
|
374
374
|
.. raw:: html
|
|
375
375
|
|
|
376
|
-
<p>Create or update a policy
|
|
377
|
-
Create or update a snapshot lifecycle policy.
|
|
376
|
+
<p>Create or update a policy.</p>
|
|
377
|
+
<p>Create or update a snapshot lifecycle policy.
|
|
378
378
|
If the policy already exists, this request increments the policy version.
|
|
379
379
|
Only the latest version of a policy is stored.</p>
|
|
380
380
|
|
|
@@ -456,8 +456,8 @@ class SlmClient(NamespacedClient):
|
|
|
456
456
|
"""
|
|
457
457
|
.. raw:: html
|
|
458
458
|
|
|
459
|
-
<p>Start snapshot lifecycle management
|
|
460
|
-
Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.
|
|
459
|
+
<p>Start snapshot lifecycle management.</p>
|
|
460
|
+
<p>Snapshot lifecycle management (SLM) starts automatically when a cluster is formed.
|
|
461
461
|
Manually starting SLM is necessary only if it has been stopped using the stop SLM API.</p>
|
|
462
462
|
|
|
463
463
|
|
|
@@ -510,8 +510,8 @@ class SlmClient(NamespacedClient):
|
|
|
510
510
|
"""
|
|
511
511
|
.. raw:: html
|
|
512
512
|
|
|
513
|
-
<p>Stop snapshot lifecycle management
|
|
514
|
-
Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
|
|
513
|
+
<p>Stop snapshot lifecycle management.</p>
|
|
514
|
+
<p>Stop all snapshot lifecycle management (SLM) operations and the SLM plugin.
|
|
515
515
|
This API is useful when you are performing maintenance on a cluster and need to prevent SLM from performing any actions on your data streams or indices.
|
|
516
516
|
Stopping SLM does not stop any snapshots that are in progress.
|
|
517
517
|
You can manually trigger snapshots with the run snapshot lifecycle policy API even if SLM is stopped.</p>
|
|
@@ -23,9 +23,9 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
@@ -46,8 +46,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
46
46
|
"""
|
|
47
47
|
.. raw:: html
|
|
48
48
|
|
|
49
|
-
<p>Clean up the snapshot repository
|
|
50
|
-
Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
|
|
49
|
+
<p>Clean up the snapshot repository.</p>
|
|
50
|
+
<p>Trigger the review of the contents of a snapshot repository and delete any stale data not referenced by existing snapshots.</p>
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository>`_
|
|
@@ -110,8 +110,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
110
110
|
"""
|
|
111
111
|
.. raw:: html
|
|
112
112
|
|
|
113
|
-
<p>Clone a snapshot
|
|
114
|
-
Clone part of all of a snapshot into another snapshot in the same repository.</p>
|
|
113
|
+
<p>Clone a snapshot.</p>
|
|
114
|
+
<p>Clone part of all of a snapshot into another snapshot in the same repository.</p>
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone>`_
|
|
@@ -207,8 +207,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
207
207
|
"""
|
|
208
208
|
.. raw:: html
|
|
209
209
|
|
|
210
|
-
<p>Create a snapshot
|
|
211
|
-
Take a snapshot of a cluster or of data streams and indices.</p>
|
|
210
|
+
<p>Create a snapshot.</p>
|
|
211
|
+
<p>Take a snapshot of a cluster or of data streams and indices.</p>
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create>`_
|
|
@@ -330,8 +330,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
330
330
|
"""
|
|
331
331
|
.. raw:: html
|
|
332
332
|
|
|
333
|
-
<p>Create or update a snapshot repository
|
|
334
|
-
IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
|
|
333
|
+
<p>Create or update a snapshot repository.</p>
|
|
334
|
+
<p>IMPORTANT: If you are migrating searchable snapshots, the repository name must be identical in the source and destination clusters.
|
|
335
335
|
To register a snapshot repository, the cluster's global metadata must be writeable.
|
|
336
336
|
Ensure there are no cluster blocks (for example, <code>cluster.blocks.read_only</code> and <code>clsuter.blocks.read_only_allow_delete</code> settings) that prevent write access.</p>
|
|
337
337
|
<p>Several options for this API can be specified using a query parameter or a request body parameter.
|
|
@@ -397,7 +397,7 @@ class SnapshotClient(NamespacedClient):
|
|
|
397
397
|
self,
|
|
398
398
|
*,
|
|
399
399
|
repository: str,
|
|
400
|
-
snapshot: str,
|
|
400
|
+
snapshot: t.Union[str, t.Sequence[str]],
|
|
401
401
|
error_trace: t.Optional[bool] = None,
|
|
402
402
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
403
403
|
human: t.Optional[bool] = None,
|
|
@@ -470,8 +470,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
470
470
|
"""
|
|
471
471
|
.. raw:: html
|
|
472
472
|
|
|
473
|
-
<p>Delete snapshot repositories
|
|
474
|
-
When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
|
|
473
|
+
<p>Delete snapshot repositories.</p>
|
|
474
|
+
<p>When a repository is unregistered, Elasticsearch removes only the reference to the location where the repository is storing the snapshots.
|
|
475
475
|
The snapshots themselves are left untouched and in place.</p>
|
|
476
476
|
|
|
477
477
|
|
|
@@ -955,7 +955,7 @@ class SnapshotClient(NamespacedClient):
|
|
|
955
955
|
)
|
|
956
956
|
|
|
957
957
|
@_rewrite_parameters()
|
|
958
|
-
@
|
|
958
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
959
959
|
def repository_verify_integrity(
|
|
960
960
|
self,
|
|
961
961
|
*,
|
|
@@ -976,8 +976,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
976
976
|
"""
|
|
977
977
|
.. raw:: html
|
|
978
978
|
|
|
979
|
-
<p>Verify the repository integrity
|
|
980
|
-
Verify the integrity of the contents of a snapshot repository.</p>
|
|
979
|
+
<p>Verify the repository integrity.</p>
|
|
980
|
+
<p>Verify the integrity of the contents of a snapshot repository.</p>
|
|
981
981
|
<p>This API enables you to perform a comprehensive check of the contents of a repository, looking for any anomalies in its data or metadata which might prevent you from restoring snapshots from the repository or which might cause future snapshot create or delete operations to fail.</p>
|
|
982
982
|
<p>If you suspect the integrity of the contents of one of your snapshot repositories, cease all write activity to this repository immediately, set its <code>read_only</code> option to <code>true</code>, and use this API to verify its integrity.
|
|
983
983
|
Until you do so:</p>
|
|
@@ -1115,8 +1115,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1115
1115
|
"""
|
|
1116
1116
|
.. raw:: html
|
|
1117
1117
|
|
|
1118
|
-
<p>Restore a snapshot
|
|
1119
|
-
Restore a snapshot of a cluster or data streams and indices.</p>
|
|
1118
|
+
<p>Restore a snapshot.</p>
|
|
1119
|
+
<p>Restore a snapshot of a cluster or data streams and indices.</p>
|
|
1120
1120
|
<p>You can restore a snapshot only to a running cluster with an elected master node.
|
|
1121
1121
|
The snapshot repository must be registered and available to the cluster.
|
|
1122
1122
|
The snapshot and cluster versions must be compatible.</p>
|
|
@@ -1264,8 +1264,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1264
1264
|
"""
|
|
1265
1265
|
.. raw:: html
|
|
1266
1266
|
|
|
1267
|
-
<p>Get the snapshot status
|
|
1268
|
-
Get a detailed description of the current state for each shard participating in the snapshot.</p>
|
|
1267
|
+
<p>Get the snapshot status.</p>
|
|
1268
|
+
<p>Get a detailed description of the current state for each shard participating in the snapshot.</p>
|
|
1269
1269
|
<p>Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots.
|
|
1270
1270
|
If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.</p>
|
|
1271
1271
|
<p>If you omit the <code><snapshot></code> request path parameter, the request retrieves information only for currently running snapshots.
|
|
@@ -1347,8 +1347,8 @@ class SnapshotClient(NamespacedClient):
|
|
|
1347
1347
|
"""
|
|
1348
1348
|
.. raw:: html
|
|
1349
1349
|
|
|
1350
|
-
<p>Verify a snapshot repository
|
|
1351
|
-
Check for common misconfigurations in a snapshot repository.</p>
|
|
1350
|
+
<p>Verify a snapshot repository.</p>
|
|
1351
|
+
<p>Check for common misconfigurations in a snapshot repository.</p>
|
|
1352
1352
|
|
|
1353
1353
|
|
|
1354
1354
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository>`_
|
|
@@ -89,8 +89,8 @@ class SqlClient(NamespacedClient):
|
|
|
89
89
|
"""
|
|
90
90
|
.. raw:: html
|
|
91
91
|
|
|
92
|
-
<p>Delete an async SQL search
|
|
93
|
-
Delete an async SQL search or a stored synchronous SQL search.
|
|
92
|
+
<p>Delete an async SQL search.</p>
|
|
93
|
+
<p>Delete an async SQL search or a stored synchronous SQL search.
|
|
94
94
|
If the search is still running, the API cancels it.</p>
|
|
95
95
|
<p>If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:</p>
|
|
96
96
|
<ul>
|
|
@@ -145,8 +145,8 @@ class SqlClient(NamespacedClient):
|
|
|
145
145
|
"""
|
|
146
146
|
.. raw:: html
|
|
147
147
|
|
|
148
|
-
<p>Get async SQL search results
|
|
149
|
-
Get the current status and available results for an async SQL search or stored synchronous SQL search.</p>
|
|
148
|
+
<p>Get async SQL search results.</p>
|
|
149
|
+
<p>Get the current status and available results for an async SQL search or stored synchronous SQL search.</p>
|
|
150
150
|
<p>If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.</p>
|
|
151
151
|
|
|
152
152
|
|
|
@@ -208,8 +208,8 @@ class SqlClient(NamespacedClient):
|
|
|
208
208
|
"""
|
|
209
209
|
.. raw:: html
|
|
210
210
|
|
|
211
|
-
<p>Get the async SQL search status
|
|
212
|
-
Get the current status of an async SQL search or a stored synchronous SQL search.</p>
|
|
211
|
+
<p>Get the async SQL search status.</p>
|
|
212
|
+
<p>Get the current status of an async SQL search or a stored synchronous SQL search.</p>
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status>`_
|
|
@@ -253,6 +253,7 @@ class SqlClient(NamespacedClient):
|
|
|
253
253
|
"keep_on_completion",
|
|
254
254
|
"page_timeout",
|
|
255
255
|
"params",
|
|
256
|
+
"project_routing",
|
|
256
257
|
"query",
|
|
257
258
|
"request_timeout",
|
|
258
259
|
"runtime_mappings",
|
|
@@ -298,8 +299,8 @@ class SqlClient(NamespacedClient):
|
|
|
298
299
|
"""
|
|
299
300
|
.. raw:: html
|
|
300
301
|
|
|
301
|
-
<p>Get SQL search results
|
|
302
|
-
Run an SQL request.</p>
|
|
302
|
+
<p>Get SQL search results.</p>
|
|
303
|
+
<p>Run an SQL request.</p>
|
|
303
304
|
|
|
304
305
|
|
|
305
306
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query>`_
|
|
@@ -333,10 +334,10 @@ class SqlClient(NamespacedClient):
|
|
|
333
334
|
is no longer available. Subsequent scroll requests prolong the lifetime of
|
|
334
335
|
the scroll cursor by the duration of `page_timeout` in the scroll request.
|
|
335
336
|
:param params: The values for parameters in the query.
|
|
336
|
-
:param project_routing: Specifies a subset of projects to target
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
_alias:
|
|
337
|
+
:param project_routing: Specifies a subset of projects to target using project
|
|
338
|
+
metadata tags in a subset of Lucene query syntax. Allowed Lucene queries:
|
|
339
|
+
the _alias tag and a single value (possibly wildcarded). Examples: _alias:my-project
|
|
340
|
+
_alias:_origin _alias:*pr* Supported in serverless only.
|
|
340
341
|
:param query: The SQL query to run.
|
|
341
342
|
:param request_timeout: The timeout before the request fails.
|
|
342
343
|
:param runtime_mappings: One or more runtime fields for the search request. These
|
|
@@ -362,8 +363,6 @@ class SqlClient(NamespacedClient):
|
|
|
362
363
|
__query["human"] = human
|
|
363
364
|
if pretty is not None:
|
|
364
365
|
__query["pretty"] = pretty
|
|
365
|
-
if project_routing is not None:
|
|
366
|
-
__query["project_routing"] = project_routing
|
|
367
366
|
if not __body:
|
|
368
367
|
if allow_partial_search_results is not None:
|
|
369
368
|
__body["allow_partial_search_results"] = allow_partial_search_results
|
|
@@ -389,6 +388,8 @@ class SqlClient(NamespacedClient):
|
|
|
389
388
|
__body["page_timeout"] = page_timeout
|
|
390
389
|
if params is not None:
|
|
391
390
|
__body["params"] = params
|
|
391
|
+
if project_routing is not None:
|
|
392
|
+
__body["project_routing"] = project_routing
|
|
392
393
|
if query is not None:
|
|
393
394
|
__body["query"] = query
|
|
394
395
|
if request_timeout is not None:
|
|
@@ -429,8 +430,8 @@ class SqlClient(NamespacedClient):
|
|
|
429
430
|
"""
|
|
430
431
|
.. raw:: html
|
|
431
432
|
|
|
432
|
-
<p>Translate SQL into Elasticsearch queries
|
|
433
|
-
Translate an SQL search into a search API request containing Query DSL.
|
|
433
|
+
<p>Translate SQL into Elasticsearch queries.</p>
|
|
434
|
+
<p>Translate an SQL search into a search API request containing Query DSL.
|
|
434
435
|
It accepts the same request body parameters as the SQL search API, excluding <code>cursor</code>.</p>
|
|
435
436
|
|
|
436
437
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
# specific language governing permissions and limitations
|
|
16
16
|
# under the License.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
import typing as t
|
|
20
19
|
|
|
21
20
|
from elastic_transport import ObjectApiResponse, TextApiResponse
|
|
@@ -23,15 +22,15 @@ from elastic_transport import ObjectApiResponse, TextApiResponse
|
|
|
23
22
|
from ._base import NamespacedClient
|
|
24
23
|
from .utils import (
|
|
25
24
|
Stability,
|
|
25
|
+
_availability_warning,
|
|
26
26
|
_rewrite_parameters,
|
|
27
|
-
_stability_warning,
|
|
28
27
|
)
|
|
29
28
|
|
|
30
29
|
|
|
31
30
|
class StreamsClient(NamespacedClient):
|
|
32
31
|
|
|
33
32
|
@_rewrite_parameters()
|
|
34
|
-
@
|
|
33
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
35
34
|
def logs_disable(
|
|
36
35
|
self,
|
|
37
36
|
*,
|
|
@@ -72,7 +71,7 @@ class StreamsClient(NamespacedClient):
|
|
|
72
71
|
__query["pretty"] = pretty
|
|
73
72
|
if timeout is not None:
|
|
74
73
|
__query["timeout"] = timeout
|
|
75
|
-
__headers = {"accept": "application/json
|
|
74
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
76
75
|
return self.perform_request( # type: ignore[return-value]
|
|
77
76
|
"POST",
|
|
78
77
|
__path,
|
|
@@ -83,7 +82,7 @@ class StreamsClient(NamespacedClient):
|
|
|
83
82
|
)
|
|
84
83
|
|
|
85
84
|
@_rewrite_parameters()
|
|
86
|
-
@
|
|
85
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
87
86
|
def logs_enable(
|
|
88
87
|
self,
|
|
89
88
|
*,
|
|
@@ -127,7 +126,7 @@ class StreamsClient(NamespacedClient):
|
|
|
127
126
|
__query["pretty"] = pretty
|
|
128
127
|
if timeout is not None:
|
|
129
128
|
__query["timeout"] = timeout
|
|
130
|
-
__headers = {"accept": "application/json
|
|
129
|
+
__headers = {"accept": "text/plain,application/json"}
|
|
131
130
|
return self.perform_request( # type: ignore[return-value]
|
|
132
131
|
"POST",
|
|
133
132
|
__path,
|
|
@@ -138,7 +137,7 @@ class StreamsClient(NamespacedClient):
|
|
|
138
137
|
)
|
|
139
138
|
|
|
140
139
|
@_rewrite_parameters()
|
|
141
|
-
@
|
|
140
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
142
141
|
def status(
|
|
143
142
|
self,
|
|
144
143
|
*,
|
|
@@ -95,8 +95,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
95
95
|
"""
|
|
96
96
|
.. raw:: html
|
|
97
97
|
|
|
98
|
-
<p>Delete a synonym rule
|
|
99
|
-
Delete a synonym rule from a synonym set.</p>
|
|
98
|
+
<p>Delete a synonym rule.</p>
|
|
99
|
+
<p>Delete a synonym rule from a synonym set.</p>
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule>`_
|
|
@@ -204,8 +204,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
204
204
|
"""
|
|
205
205
|
.. raw:: html
|
|
206
206
|
|
|
207
|
-
<p>Get a synonym rule
|
|
208
|
-
Get a synonym rule from a synonym set.</p>
|
|
207
|
+
<p>Get a synonym rule.</p>
|
|
208
|
+
<p>Get a synonym rule from a synonym set.</p>
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule>`_
|
|
@@ -257,8 +257,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
257
257
|
"""
|
|
258
258
|
.. raw:: html
|
|
259
259
|
|
|
260
|
-
<p>Get all synonym sets
|
|
261
|
-
Get a summary of all defined synonym sets.</p>
|
|
260
|
+
<p>Get all synonym sets.</p>
|
|
261
|
+
<p>Get a summary of all defined synonym sets.</p>
|
|
262
262
|
|
|
263
263
|
|
|
264
264
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym>`_
|
|
@@ -311,8 +311,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
311
311
|
"""
|
|
312
312
|
.. raw:: html
|
|
313
313
|
|
|
314
|
-
<p>Create or update a synonym set
|
|
315
|
-
Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
|
|
314
|
+
<p>Create or update a synonym set.</p>
|
|
315
|
+
<p>Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
|
|
316
316
|
If you need to manage more synonym rules, you can create multiple synonym sets.</p>
|
|
317
317
|
<p>When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.
|
|
318
318
|
This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.</p>
|
|
@@ -378,8 +378,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
378
378
|
"""
|
|
379
379
|
.. raw:: html
|
|
380
380
|
|
|
381
|
-
<p>Create or update a synonym rule
|
|
382
|
-
Create or update a synonym rule in a synonym set.</p>
|
|
381
|
+
<p>Create or update a synonym rule.</p>
|
|
382
|
+
<p>Create or update a synonym rule in a synonym set.</p>
|
|
383
383
|
<p>If any of the synonym rules included is invalid, the API returns an error.</p>
|
|
384
384
|
<p>When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.</p>
|
|
385
385
|
|
|
@@ -23,16 +23,16 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class TasksClient(NamespacedClient):
|
|
33
33
|
|
|
34
34
|
@_rewrite_parameters()
|
|
35
|
-
@
|
|
35
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
36
36
|
def cancel(
|
|
37
37
|
self,
|
|
38
38
|
*,
|
|
@@ -106,7 +106,7 @@ class TasksClient(NamespacedClient):
|
|
|
106
106
|
)
|
|
107
107
|
|
|
108
108
|
@_rewrite_parameters()
|
|
109
|
-
@
|
|
109
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
110
110
|
def get(
|
|
111
111
|
self,
|
|
112
112
|
*,
|
|
@@ -121,8 +121,8 @@ class TasksClient(NamespacedClient):
|
|
|
121
121
|
"""
|
|
122
122
|
.. raw:: html
|
|
123
123
|
|
|
124
|
-
<p>Get task information
|
|
125
|
-
Get information about a task currently running in the cluster.</p>
|
|
124
|
+
<p>Get task information.</p>
|
|
125
|
+
<p>Get information about a task currently running in the cluster.</p>
|
|
126
126
|
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
127
127
|
The API may change in ways that are not backwards compatible.</p>
|
|
128
128
|
<p>If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.</p>
|
|
@@ -164,7 +164,7 @@ class TasksClient(NamespacedClient):
|
|
|
164
164
|
)
|
|
165
165
|
|
|
166
166
|
@_rewrite_parameters()
|
|
167
|
-
@
|
|
167
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
168
168
|
def list(
|
|
169
169
|
self,
|
|
170
170
|
*,
|
|
@@ -185,8 +185,8 @@ class TasksClient(NamespacedClient):
|
|
|
185
185
|
"""
|
|
186
186
|
.. raw:: html
|
|
187
187
|
|
|
188
|
-
<p>Get all tasks
|
|
189
|
-
Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
188
|
+
<p>Get all tasks.</p>
|
|
189
|
+
<p>Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
190
190
|
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
191
191
|
The API may change in ways that are not backwards compatible.</p>
|
|
192
192
|
<p><strong>Identifying running tasks</strong></p>
|
|
@@ -31,7 +31,7 @@ class TextStructureClient(NamespacedClient):
|
|
|
31
31
|
*,
|
|
32
32
|
field: str,
|
|
33
33
|
index: str,
|
|
34
|
-
column_names: t.Optional[str] = None,
|
|
34
|
+
column_names: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
35
|
delimiter: t.Optional[str] = None,
|
|
36
36
|
documents_to_sample: t.Optional[int] = None,
|
|
37
37
|
ecs_compatibility: t.Optional[t.Union[str, t.Literal["disabled", "v1"]]] = None,
|
|
@@ -55,8 +55,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
55
55
|
"""
|
|
56
56
|
.. raw:: html
|
|
57
57
|
|
|
58
|
-
<p>Find the structure of a text field
|
|
59
|
-
Find the structure of a text field in an Elasticsearch index.</p>
|
|
58
|
+
<p>Find the structure of a text field.</p>
|
|
59
|
+
<p>Find the structure of a text field in an Elasticsearch index.</p>
|
|
60
60
|
<p>This API provides a starting point for extracting further information from log messages already ingested into Elasticsearch.
|
|
61
61
|
For example, if you have ingested data into a very simple index that has just <code>@timestamp</code> and message fields, you can use this API to see what common structure exists in the message field.</p>
|
|
62
62
|
<p>The response from the API contains:</p>
|
|
@@ -217,7 +217,7 @@ class TextStructureClient(NamespacedClient):
|
|
|
217
217
|
self,
|
|
218
218
|
*,
|
|
219
219
|
messages: t.Optional[t.Sequence[str]] = None,
|
|
220
|
-
column_names: t.Optional[str] = None,
|
|
220
|
+
column_names: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
221
221
|
delimiter: t.Optional[str] = None,
|
|
222
222
|
ecs_compatibility: t.Optional[t.Union[str, t.Literal["disabled", "v1"]]] = None,
|
|
223
223
|
error_trace: t.Optional[bool] = None,
|
|
@@ -241,8 +241,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
241
241
|
"""
|
|
242
242
|
.. raw:: html
|
|
243
243
|
|
|
244
|
-
<p>Find the structure of text messages
|
|
245
|
-
Find the structure of a list of text messages.
|
|
244
|
+
<p>Find the structure of text messages.</p>
|
|
245
|
+
<p>Find the structure of a list of text messages.
|
|
246
246
|
The messages must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
247
247
|
<p>This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.
|
|
248
248
|
Use this API rather than the find text structure API if your input text has already been split up into separate messages by some other process.</p>
|
|
@@ -398,11 +398,15 @@ class TextStructureClient(NamespacedClient):
|
|
|
398
398
|
text_files: t.Optional[t.Sequence[t.Any]] = None,
|
|
399
399
|
body: t.Optional[t.Sequence[t.Any]] = None,
|
|
400
400
|
charset: t.Optional[str] = None,
|
|
401
|
-
column_names: t.Optional[str] = None,
|
|
401
|
+
column_names: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
402
402
|
delimiter: t.Optional[str] = None,
|
|
403
403
|
ecs_compatibility: t.Optional[str] = None,
|
|
404
404
|
explain: t.Optional[bool] = None,
|
|
405
|
-
format: t.Optional[
|
|
405
|
+
format: t.Optional[
|
|
406
|
+
t.Union[
|
|
407
|
+
str, t.Literal["delimited", "ndjson", "semi_structured_text", "xml"]
|
|
408
|
+
]
|
|
409
|
+
] = None,
|
|
406
410
|
grok_pattern: t.Optional[str] = None,
|
|
407
411
|
has_header_row: t.Optional[bool] = None,
|
|
408
412
|
line_merge_size_limit: t.Optional[int] = None,
|
|
@@ -416,8 +420,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
416
420
|
"""
|
|
417
421
|
.. raw:: html
|
|
418
422
|
|
|
419
|
-
<p>Find the structure of a text file
|
|
420
|
-
The text file must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
423
|
+
<p>Find the structure of a text file.</p>
|
|
424
|
+
<p>The text file must contain data that is suitable to be ingested into Elasticsearch.</p>
|
|
421
425
|
<p>This API provides a starting point for ingesting data into Elasticsearch in a format that is suitable for subsequent use with other Elastic Stack functionality.
|
|
422
426
|
Unlike other Elasticsearch endpoints, the data that is posted to this endpoint does not need to be UTF-8 encoded and in JSON format.
|
|
423
427
|
It must, however, be text; binary text formats are not currently supported.
|
|
@@ -615,8 +619,8 @@ class TextStructureClient(NamespacedClient):
|
|
|
615
619
|
"""
|
|
616
620
|
.. raw:: html
|
|
617
621
|
|
|
618
|
-
<p>Test a Grok pattern
|
|
619
|
-
Test a Grok pattern on one or more lines of text.
|
|
622
|
+
<p>Test a Grok pattern.</p>
|
|
623
|
+
<p>Test a Grok pattern on one or more lines of text.
|
|
620
624
|
The API indicates whether the lines match the pattern together with the offsets and lengths of the matched substrings.</p>
|
|
621
625
|
|
|
622
626
|
|