elasticsearch 9.0.1__py3-none-any.whl → 9.1.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 +3 -3
- elasticsearch/_async/client/__init__.py +93 -249
- elasticsearch/_async/client/async_search.py +4 -4
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +620 -58
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +32 -22
- elasticsearch/_async/client/connector.py +30 -30
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +5 -5
- elasticsearch/_async/client/eql.py +14 -6
- elasticsearch/_async/client/esql.py +125 -9
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +3 -3
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +11 -11
- elasticsearch/_async/client/indices.py +605 -117
- elasticsearch/_async/client/inference.py +523 -116
- elasticsearch/_async/client/ingest.py +9 -16
- elasticsearch/_async/client/license.py +11 -11
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +75 -87
- elasticsearch/_async/client/monitoring.py +1 -1
- elasticsearch/_async/client/nodes.py +7 -7
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +9 -30
- elasticsearch/_async/client/search_application.py +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +79 -81
- elasticsearch/_async/client/shutdown.py +3 -3
- elasticsearch/_async/client/simulate.py +1 -1
- elasticsearch/_async/client/slm.py +9 -9
- elasticsearch/_async/client/snapshot.py +64 -21
- elasticsearch/_async/client/sql.py +6 -6
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +26 -7
- elasticsearch/_async/client/tasks.py +4 -4
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +11 -11
- elasticsearch/_async/client/watcher.py +17 -15
- elasticsearch/_async/client/xpack.py +2 -2
- elasticsearch/_otel.py +8 -8
- elasticsearch/_sync/client/__init__.py +93 -249
- elasticsearch/_sync/client/async_search.py +4 -4
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +620 -58
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +32 -22
- elasticsearch/_sync/client/connector.py +30 -30
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +5 -5
- elasticsearch/_sync/client/eql.py +14 -6
- elasticsearch/_sync/client/esql.py +125 -9
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +3 -3
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +11 -11
- elasticsearch/_sync/client/indices.py +605 -117
- elasticsearch/_sync/client/inference.py +523 -116
- elasticsearch/_sync/client/ingest.py +9 -16
- elasticsearch/_sync/client/license.py +11 -11
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +75 -87
- elasticsearch/_sync/client/monitoring.py +1 -1
- elasticsearch/_sync/client/nodes.py +7 -7
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +9 -30
- elasticsearch/_sync/client/search_application.py +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +79 -81
- elasticsearch/_sync/client/shutdown.py +3 -3
- elasticsearch/_sync/client/simulate.py +1 -1
- elasticsearch/_sync/client/slm.py +9 -9
- elasticsearch/_sync/client/snapshot.py +64 -21
- elasticsearch/_sync/client/sql.py +6 -6
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +26 -7
- elasticsearch/_sync/client/tasks.py +4 -4
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +11 -11
- elasticsearch/_sync/client/watcher.py +17 -15
- elasticsearch/_sync/client/xpack.py +2 -2
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/_async/document.py +1 -1
- elasticsearch/dsl/_sync/document.py +1 -1
- elasticsearch/dsl/aggs.py +20 -0
- elasticsearch/dsl/document_base.py +177 -17
- elasticsearch/dsl/field.py +241 -38
- elasticsearch/dsl/query.py +50 -5
- elasticsearch/dsl/response/__init__.py +1 -1
- elasticsearch/dsl/types.py +245 -21
- elasticsearch/dsl/utils.py +1 -1
- elasticsearch/esql/__init__.py +18 -0
- elasticsearch/esql/esql.py +1105 -0
- elasticsearch/esql/esql1.py1 +307 -0
- elasticsearch/esql/functions.py +1738 -0
- {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/METADATA +3 -6
- elasticsearch-9.1.0.dist-info/RECORD +164 -0
- elasticsearch-9.0.1.dist-info/RECORD +0 -162
- elasticsearch-9.0.1.dist-info/licenses/LICENSE.txt +0 -175
- elasticsearch-9.0.1.dist-info/licenses/NOTICE.txt +0 -559
- {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/WHEEL +0 -0
- {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-9.0.1.dist-info → elasticsearch-9.1.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -43,7 +43,7 @@ class EnrichClient(NamespacedClient):
|
|
|
43
43
|
Deletes an existing enrich policy and its enrich index.</p>
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
46
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy>`_
|
|
47
47
|
|
|
48
48
|
:param name: Enrich policy to delete.
|
|
49
49
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
@@ -92,7 +92,7 @@ class EnrichClient(NamespacedClient):
|
|
|
92
92
|
Create the enrich index for an existing enrich policy.</p>
|
|
93
93
|
|
|
94
94
|
|
|
95
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
95
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy>`_
|
|
96
96
|
|
|
97
97
|
:param name: Enrich policy to execute.
|
|
98
98
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
@@ -144,7 +144,7 @@ class EnrichClient(NamespacedClient):
|
|
|
144
144
|
Returns information about an enrich policy.</p>
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
147
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy>`_
|
|
148
148
|
|
|
149
149
|
:param name: Comma-separated list of enrich policy names used to limit the request.
|
|
150
150
|
To return information for all enrich policies, omit this parameter.
|
|
@@ -202,7 +202,7 @@ class EnrichClient(NamespacedClient):
|
|
|
202
202
|
Creates an enrich policy.</p>
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
205
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy>`_
|
|
206
206
|
|
|
207
207
|
:param name: Name of the enrich policy to create or update.
|
|
208
208
|
:param geo_match: Matches enrich data to incoming documents based on a `geo_shape`
|
|
@@ -263,7 +263,7 @@ class EnrichClient(NamespacedClient):
|
|
|
263
263
|
Returns enrich coordinator statistics and information about enrich policies that are currently executing.</p>
|
|
264
264
|
|
|
265
265
|
|
|
266
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
266
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats>`_
|
|
267
267
|
|
|
268
268
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
269
269
|
"""
|
|
@@ -43,7 +43,7 @@ class EqlClient(NamespacedClient):
|
|
|
43
43
|
The API also deletes results for the search.</p>
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
46
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-delete>`_
|
|
47
47
|
|
|
48
48
|
:param id: Identifier for the search to delete. A search ID is provided in the
|
|
49
49
|
EQL search API's response for an async search. A search ID is also provided
|
|
@@ -93,7 +93,7 @@ class EqlClient(NamespacedClient):
|
|
|
93
93
|
Get the current status and available results for an async EQL search or a stored synchronous EQL search.</p>
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
96
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get>`_
|
|
97
97
|
|
|
98
98
|
:param id: Identifier for the search.
|
|
99
99
|
:param keep_alive: Period for which the search and its results are stored on
|
|
@@ -147,7 +147,7 @@ class EqlClient(NamespacedClient):
|
|
|
147
147
|
Get the current status for an async EQL search or a stored synchronous EQL search without returning results.</p>
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
150
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-get-status>`_
|
|
151
151
|
|
|
152
152
|
:param id: Identifier for the search.
|
|
153
153
|
"""
|
|
@@ -204,6 +204,7 @@ class EqlClient(NamespacedClient):
|
|
|
204
204
|
allow_partial_search_results: t.Optional[bool] = None,
|
|
205
205
|
allow_partial_sequence_results: t.Optional[bool] = None,
|
|
206
206
|
case_sensitive: t.Optional[bool] = None,
|
|
207
|
+
ccs_minimize_roundtrips: t.Optional[bool] = None,
|
|
207
208
|
error_trace: t.Optional[bool] = None,
|
|
208
209
|
event_category_field: t.Optional[str] = None,
|
|
209
210
|
expand_wildcards: t.Optional[
|
|
@@ -246,11 +247,13 @@ class EqlClient(NamespacedClient):
|
|
|
246
247
|
EQL assumes each document in a data stream or index corresponds to an event.</p>
|
|
247
248
|
|
|
248
249
|
|
|
249
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
250
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-eql-search>`_
|
|
250
251
|
|
|
251
252
|
:param index: The name of the index to scope the operation
|
|
252
253
|
:param query: EQL query you wish to run.
|
|
253
|
-
:param allow_no_indices:
|
|
254
|
+
:param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
|
|
255
|
+
into no concrete indices. (This includes `_all` string or when no indices
|
|
256
|
+
have been specified)
|
|
254
257
|
:param allow_partial_search_results: Allow query execution also in case of shard
|
|
255
258
|
failures. If true, the query will keep running and will return results based
|
|
256
259
|
on the available shards. For sequences, the behavior can be further refined
|
|
@@ -261,9 +264,12 @@ class EqlClient(NamespacedClient):
|
|
|
261
264
|
If false, the sequence query will return successfully, but will always have
|
|
262
265
|
empty results.
|
|
263
266
|
:param case_sensitive:
|
|
267
|
+
:param ccs_minimize_roundtrips: Indicates whether network round-trips should
|
|
268
|
+
be minimized as part of cross-cluster search requests execution
|
|
264
269
|
:param event_category_field: Field containing the event classification, such
|
|
265
270
|
as process, file, or network.
|
|
266
|
-
:param expand_wildcards:
|
|
271
|
+
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
|
|
272
|
+
that are open, closed or both.
|
|
267
273
|
:param fetch_size: Maximum number of events to search at a time for sequence
|
|
268
274
|
queries.
|
|
269
275
|
:param fields: Array of wildcard (*) patterns. The response returns values for
|
|
@@ -298,6 +304,8 @@ class EqlClient(NamespacedClient):
|
|
|
298
304
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
299
305
|
if allow_no_indices is not None:
|
|
300
306
|
__query["allow_no_indices"] = allow_no_indices
|
|
307
|
+
if ccs_minimize_roundtrips is not None:
|
|
308
|
+
__query["ccs_minimize_roundtrips"] = ccs_minimize_roundtrips
|
|
301
309
|
if error_trace is not None:
|
|
302
310
|
__query["error_trace"] = error_trace
|
|
303
311
|
if expand_wildcards is not None:
|
|
@@ -20,7 +20,13 @@ import typing as t
|
|
|
20
20
|
from elastic_transport import ObjectApiResponse
|
|
21
21
|
|
|
22
22
|
from ._base import NamespacedClient
|
|
23
|
-
from .utils import
|
|
23
|
+
from .utils import (
|
|
24
|
+
SKIP_IN_PATH,
|
|
25
|
+
Stability,
|
|
26
|
+
_quote,
|
|
27
|
+
_rewrite_parameters,
|
|
28
|
+
_stability_warning,
|
|
29
|
+
)
|
|
24
30
|
|
|
25
31
|
|
|
26
32
|
class EsqlClient(NamespacedClient):
|
|
@@ -31,6 +37,8 @@ class EsqlClient(NamespacedClient):
|
|
|
31
37
|
"columnar",
|
|
32
38
|
"filter",
|
|
33
39
|
"include_ccs_metadata",
|
|
40
|
+
"keep_alive",
|
|
41
|
+
"keep_on_completion",
|
|
34
42
|
"locale",
|
|
35
43
|
"params",
|
|
36
44
|
"profile",
|
|
@@ -43,6 +51,7 @@ class EsqlClient(NamespacedClient):
|
|
|
43
51
|
self,
|
|
44
52
|
*,
|
|
45
53
|
query: t.Optional[str] = None,
|
|
54
|
+
allow_partial_results: t.Optional[bool] = None,
|
|
46
55
|
columnar: t.Optional[bool] = None,
|
|
47
56
|
delimiter: t.Optional[str] = None,
|
|
48
57
|
drop_null_columns: t.Optional[bool] = None,
|
|
@@ -81,10 +90,15 @@ class EsqlClient(NamespacedClient):
|
|
|
81
90
|
<p>The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.</p>
|
|
82
91
|
|
|
83
92
|
|
|
84
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
93
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query>`_
|
|
85
94
|
|
|
86
95
|
:param query: The ES|QL query API accepts an ES|QL query string in the query
|
|
87
96
|
parameter, runs it, and returns the results.
|
|
97
|
+
:param allow_partial_results: If `true`, partial results will be returned if
|
|
98
|
+
there are shard failures, but the query can continue to execute on other
|
|
99
|
+
clusters and shards. If `false`, the query will fail if there are any failures.
|
|
100
|
+
To override the default behavior, you can set the `esql.query.allow_partial_results`
|
|
101
|
+
cluster setting to `false`.
|
|
88
102
|
:param columnar: By default, ES|QL returns results as rows. For example, FROM
|
|
89
103
|
returns each individual document as one row. For the JSON, YAML, CBOR and
|
|
90
104
|
smile formats, ES|QL can return the results in a columnar fashion where one
|
|
@@ -133,6 +147,8 @@ class EsqlClient(NamespacedClient):
|
|
|
133
147
|
__path = "/_query/async"
|
|
134
148
|
__query: t.Dict[str, t.Any] = {}
|
|
135
149
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
150
|
+
if allow_partial_results is not None:
|
|
151
|
+
__query["allow_partial_results"] = allow_partial_results
|
|
136
152
|
if delimiter is not None:
|
|
137
153
|
__query["delimiter"] = delimiter
|
|
138
154
|
if drop_null_columns is not None:
|
|
@@ -145,10 +161,6 @@ class EsqlClient(NamespacedClient):
|
|
|
145
161
|
__query["format"] = format
|
|
146
162
|
if human is not None:
|
|
147
163
|
__query["human"] = human
|
|
148
|
-
if keep_alive is not None:
|
|
149
|
-
__query["keep_alive"] = keep_alive
|
|
150
|
-
if keep_on_completion is not None:
|
|
151
|
-
__query["keep_on_completion"] = keep_on_completion
|
|
152
164
|
if pretty is not None:
|
|
153
165
|
__query["pretty"] = pretty
|
|
154
166
|
if not __body:
|
|
@@ -160,6 +172,10 @@ class EsqlClient(NamespacedClient):
|
|
|
160
172
|
__body["filter"] = filter
|
|
161
173
|
if include_ccs_metadata is not None:
|
|
162
174
|
__body["include_ccs_metadata"] = include_ccs_metadata
|
|
175
|
+
if keep_alive is not None:
|
|
176
|
+
__body["keep_alive"] = keep_alive
|
|
177
|
+
if keep_on_completion is not None:
|
|
178
|
+
__body["keep_on_completion"] = keep_on_completion
|
|
163
179
|
if locale is not None:
|
|
164
180
|
__body["locale"] = locale
|
|
165
181
|
if params is not None:
|
|
@@ -204,7 +220,7 @@ class EsqlClient(NamespacedClient):
|
|
|
204
220
|
</ul>
|
|
205
221
|
|
|
206
222
|
|
|
207
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
223
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete>`_
|
|
208
224
|
|
|
209
225
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
210
226
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -242,6 +258,14 @@ class EsqlClient(NamespacedClient):
|
|
|
242
258
|
drop_null_columns: t.Optional[bool] = None,
|
|
243
259
|
error_trace: t.Optional[bool] = None,
|
|
244
260
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
261
|
+
format: t.Optional[
|
|
262
|
+
t.Union[
|
|
263
|
+
str,
|
|
264
|
+
t.Literal[
|
|
265
|
+
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
|
|
266
|
+
],
|
|
267
|
+
]
|
|
268
|
+
] = None,
|
|
245
269
|
human: t.Optional[bool] = None,
|
|
246
270
|
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
247
271
|
pretty: t.Optional[bool] = None,
|
|
@@ -257,7 +281,7 @@ class EsqlClient(NamespacedClient):
|
|
|
257
281
|
If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.</p>
|
|
258
282
|
|
|
259
283
|
|
|
260
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
284
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get>`_
|
|
261
285
|
|
|
262
286
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
263
287
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -267,6 +291,7 @@ class EsqlClient(NamespacedClient):
|
|
|
267
291
|
will be removed from the `columns` and `values` portion of the results. If
|
|
268
292
|
`true`, the response will include an extra section under the name `all_columns`
|
|
269
293
|
which has the name of all the columns.
|
|
294
|
+
:param format: A short version of the Accept header, for example `json` or `yaml`.
|
|
270
295
|
:param keep_alive: The period for which the query and its results are stored
|
|
271
296
|
in the cluster. When this period expires, the query and its results are deleted,
|
|
272
297
|
even if the query is still ongoing.
|
|
@@ -287,6 +312,8 @@ class EsqlClient(NamespacedClient):
|
|
|
287
312
|
__query["error_trace"] = error_trace
|
|
288
313
|
if filter_path is not None:
|
|
289
314
|
__query["filter_path"] = filter_path
|
|
315
|
+
if format is not None:
|
|
316
|
+
__query["format"] = format
|
|
290
317
|
if human is not None:
|
|
291
318
|
__query["human"] = human
|
|
292
319
|
if keep_alive is not None:
|
|
@@ -324,7 +351,7 @@ class EsqlClient(NamespacedClient):
|
|
|
324
351
|
If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.</p>
|
|
325
352
|
|
|
326
353
|
|
|
327
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
354
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop>`_
|
|
328
355
|
|
|
329
356
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
330
357
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -360,6 +387,87 @@ class EsqlClient(NamespacedClient):
|
|
|
360
387
|
path_parts=__path_parts,
|
|
361
388
|
)
|
|
362
389
|
|
|
390
|
+
@_rewrite_parameters()
|
|
391
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
392
|
+
async def get_query(
|
|
393
|
+
self,
|
|
394
|
+
*,
|
|
395
|
+
id: str,
|
|
396
|
+
error_trace: t.Optional[bool] = None,
|
|
397
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
398
|
+
human: t.Optional[bool] = None,
|
|
399
|
+
pretty: t.Optional[bool] = None,
|
|
400
|
+
) -> ObjectApiResponse[t.Any]:
|
|
401
|
+
"""
|
|
402
|
+
.. raw:: html
|
|
403
|
+
|
|
404
|
+
<p>Get a specific running ES|QL query information.
|
|
405
|
+
Returns an object extended information about a running ES|QL query.</p>
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
:param id: The query ID
|
|
409
|
+
"""
|
|
410
|
+
if id in SKIP_IN_PATH:
|
|
411
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
412
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
413
|
+
__path = f'/_query/queries/{__path_parts["id"]}'
|
|
414
|
+
__query: t.Dict[str, t.Any] = {}
|
|
415
|
+
if error_trace is not None:
|
|
416
|
+
__query["error_trace"] = error_trace
|
|
417
|
+
if filter_path is not None:
|
|
418
|
+
__query["filter_path"] = filter_path
|
|
419
|
+
if human is not None:
|
|
420
|
+
__query["human"] = human
|
|
421
|
+
if pretty is not None:
|
|
422
|
+
__query["pretty"] = pretty
|
|
423
|
+
__headers = {"accept": "application/json"}
|
|
424
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
425
|
+
"GET",
|
|
426
|
+
__path,
|
|
427
|
+
params=__query,
|
|
428
|
+
headers=__headers,
|
|
429
|
+
endpoint_id="esql.get_query",
|
|
430
|
+
path_parts=__path_parts,
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
@_rewrite_parameters()
|
|
434
|
+
@_stability_warning(Stability.EXPERIMENTAL)
|
|
435
|
+
async def list_queries(
|
|
436
|
+
self,
|
|
437
|
+
*,
|
|
438
|
+
error_trace: t.Optional[bool] = None,
|
|
439
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
440
|
+
human: t.Optional[bool] = None,
|
|
441
|
+
pretty: t.Optional[bool] = None,
|
|
442
|
+
) -> ObjectApiResponse[t.Any]:
|
|
443
|
+
"""
|
|
444
|
+
.. raw:: html
|
|
445
|
+
|
|
446
|
+
<p>Get running ES|QL queries information.
|
|
447
|
+
Returns an object containing IDs and other information about the running ES|QL queries.</p>
|
|
448
|
+
|
|
449
|
+
"""
|
|
450
|
+
__path_parts: t.Dict[str, str] = {}
|
|
451
|
+
__path = "/_query/queries"
|
|
452
|
+
__query: t.Dict[str, t.Any] = {}
|
|
453
|
+
if error_trace is not None:
|
|
454
|
+
__query["error_trace"] = error_trace
|
|
455
|
+
if filter_path is not None:
|
|
456
|
+
__query["filter_path"] = filter_path
|
|
457
|
+
if human is not None:
|
|
458
|
+
__query["human"] = human
|
|
459
|
+
if pretty is not None:
|
|
460
|
+
__query["pretty"] = pretty
|
|
461
|
+
__headers = {"accept": "application/json"}
|
|
462
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
463
|
+
"GET",
|
|
464
|
+
__path,
|
|
465
|
+
params=__query,
|
|
466
|
+
headers=__headers,
|
|
467
|
+
endpoint_id="esql.list_queries",
|
|
468
|
+
path_parts=__path_parts,
|
|
469
|
+
)
|
|
470
|
+
|
|
363
471
|
@_rewrite_parameters(
|
|
364
472
|
body_fields=(
|
|
365
473
|
"query",
|
|
@@ -377,6 +485,7 @@ class EsqlClient(NamespacedClient):
|
|
|
377
485
|
self,
|
|
378
486
|
*,
|
|
379
487
|
query: t.Optional[str] = None,
|
|
488
|
+
allow_partial_results: t.Optional[bool] = None,
|
|
380
489
|
columnar: t.Optional[bool] = None,
|
|
381
490
|
delimiter: t.Optional[str] = None,
|
|
382
491
|
drop_null_columns: t.Optional[bool] = None,
|
|
@@ -413,6 +522,11 @@ class EsqlClient(NamespacedClient):
|
|
|
413
522
|
|
|
414
523
|
:param query: The ES|QL query API accepts an ES|QL query string in the query
|
|
415
524
|
parameter, runs it, and returns the results.
|
|
525
|
+
:param allow_partial_results: If `true`, partial results will be returned if
|
|
526
|
+
there are shard failures, but the query can continue to execute on other
|
|
527
|
+
clusters and shards. If `false`, the query will fail if there are any failures.
|
|
528
|
+
To override the default behavior, you can set the `esql.query.allow_partial_results`
|
|
529
|
+
cluster setting to `false`.
|
|
416
530
|
:param columnar: By default, ES|QL returns results as rows. For example, FROM
|
|
417
531
|
returns each individual document as one row. For the JSON, YAML, CBOR and
|
|
418
532
|
smile formats, ES|QL can return the results in a columnar fashion where one
|
|
@@ -447,6 +561,8 @@ class EsqlClient(NamespacedClient):
|
|
|
447
561
|
__path = "/_query"
|
|
448
562
|
__query: t.Dict[str, t.Any] = {}
|
|
449
563
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
564
|
+
if allow_partial_results is not None:
|
|
565
|
+
__query["allow_partial_results"] = allow_partial_results
|
|
450
566
|
if delimiter is not None:
|
|
451
567
|
__query["delimiter"] = delimiter
|
|
452
568
|
if drop_null_columns is not None:
|
|
@@ -48,7 +48,7 @@ class FeaturesClient(NamespacedClient):
|
|
|
48
48
|
In order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.</p>
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
51
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-get-features>`_
|
|
52
52
|
|
|
53
53
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
54
54
|
"""
|
|
@@ -102,7 +102,7 @@ class FeaturesClient(NamespacedClient):
|
|
|
102
102
|
<p>IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.</p>
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
105
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-features-reset-features>`_
|
|
106
106
|
|
|
107
107
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
108
108
|
"""
|
|
@@ -53,7 +53,7 @@ class FleetClient(NamespacedClient):
|
|
|
53
53
|
This API is designed for internal use by the Fleet server project.</p>
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
56
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-fleet>`_
|
|
57
57
|
|
|
58
58
|
:param index: A single index or index alias that resolves to a single index.
|
|
59
59
|
:param checkpoints: A comma separated list of previous global checkpoints. When
|
|
@@ -144,7 +144,7 @@ class FleetClient(NamespacedClient):
|
|
|
144
144
|
However, similar to the Fleet search API, it supports the <code>wait_for_checkpoints</code> parameter.</p>
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
147
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch>`_
|
|
148
148
|
|
|
149
149
|
:param searches:
|
|
150
150
|
:param index: A single target to search. If the target is an index alias, it
|
|
@@ -393,7 +393,7 @@ class FleetClient(NamespacedClient):
|
|
|
393
393
|
after the provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
|
|
394
394
|
|
|
395
395
|
|
|
396
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
396
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search>`_
|
|
397
397
|
|
|
398
398
|
:param index: A single target to search. If the target is an index alias, it
|
|
399
399
|
must resolve to a single index.
|
|
@@ -55,7 +55,7 @@ class GraphClient(NamespacedClient):
|
|
|
55
55
|
You can exclude vertices that have already been returned.</p>
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
58
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-graph>`_
|
|
59
59
|
|
|
60
60
|
:param index: Name of the index.
|
|
61
61
|
:param connections: Specifies or more fields from which you want to extract terms
|
|
@@ -44,7 +44,7 @@ class IlmClient(NamespacedClient):
|
|
|
44
44
|
You cannot delete policies that are currently in use. If the policy is being used to manage any indices, the request fails and returns an error.</p>
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
47
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle>`_
|
|
48
48
|
|
|
49
49
|
:param name: Identifier for the policy.
|
|
50
50
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -102,7 +102,7 @@ class IlmClient(NamespacedClient):
|
|
|
102
102
|
<p>The response indicates when the index entered each lifecycle state, provides the definition of the running phase, and information about any failures.</p>
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
105
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle>`_
|
|
106
106
|
|
|
107
107
|
:param index: Comma-separated list of data streams, indices, and aliases to target.
|
|
108
108
|
Supports wildcards (`*`). To target all data streams and indices, use `*`
|
|
@@ -163,7 +163,7 @@ class IlmClient(NamespacedClient):
|
|
|
163
163
|
<p>Get lifecycle policies.</p>
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
166
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle>`_
|
|
167
167
|
|
|
168
168
|
:param name: Identifier for the policy.
|
|
169
169
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -218,7 +218,7 @@ class IlmClient(NamespacedClient):
|
|
|
218
218
|
<p>Get the current index lifecycle management status.</p>
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
221
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status>`_
|
|
222
222
|
"""
|
|
223
223
|
__path_parts: t.Dict[str, str] = {}
|
|
224
224
|
__path = "/_ilm/status"
|
|
@@ -275,7 +275,7 @@ class IlmClient(NamespacedClient):
|
|
|
275
275
|
Use the stop ILM and get ILM status APIs to wait until the reported operation mode is <code>STOPPED</code>.</p>
|
|
276
276
|
|
|
277
277
|
|
|
278
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
278
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers>`_
|
|
279
279
|
|
|
280
280
|
:param dry_run: If true, simulates the migration from node attributes based allocation
|
|
281
281
|
filters to data tiers, but does not perform the migration. This provides
|
|
@@ -354,7 +354,7 @@ class IlmClient(NamespacedClient):
|
|
|
354
354
|
An index cannot move to a step that is not part of its policy.</p>
|
|
355
355
|
|
|
356
356
|
|
|
357
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
357
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step>`_
|
|
358
358
|
|
|
359
359
|
:param index: The name of the index whose lifecycle step is to change
|
|
360
360
|
:param current_step: The step that the index is expected to be in.
|
|
@@ -422,7 +422,7 @@ class IlmClient(NamespacedClient):
|
|
|
422
422
|
<p>NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.</p>
|
|
423
423
|
|
|
424
424
|
|
|
425
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
425
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle>`_
|
|
426
426
|
|
|
427
427
|
:param name: Identifier for the policy.
|
|
428
428
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -486,7 +486,7 @@ class IlmClient(NamespacedClient):
|
|
|
486
486
|
It also stops managing the indices.</p>
|
|
487
487
|
|
|
488
488
|
|
|
489
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
489
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy>`_
|
|
490
490
|
|
|
491
491
|
:param index: The name of the index to remove policy on
|
|
492
492
|
"""
|
|
@@ -532,7 +532,7 @@ class IlmClient(NamespacedClient):
|
|
|
532
532
|
Use the explain lifecycle state API to determine whether an index is in the ERROR step.</p>
|
|
533
533
|
|
|
534
534
|
|
|
535
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
535
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-retry>`_
|
|
536
536
|
|
|
537
537
|
:param index: The name of the indices (comma-separated) whose failed lifecycle
|
|
538
538
|
step is to be retry
|
|
@@ -580,7 +580,7 @@ class IlmClient(NamespacedClient):
|
|
|
580
580
|
Restarting ILM is necessary only when it has been stopped using the stop ILM API.</p>
|
|
581
581
|
|
|
582
582
|
|
|
583
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
583
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start>`_
|
|
584
584
|
|
|
585
585
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
586
586
|
no response is received before the timeout expires, the request fails and
|
|
@@ -634,7 +634,7 @@ class IlmClient(NamespacedClient):
|
|
|
634
634
|
Use the get ILM status API to check whether ILM is running.</p>
|
|
635
635
|
|
|
636
636
|
|
|
637
|
-
`<https://www.elastic.co/docs/api/doc/elasticsearch/
|
|
637
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop>`_
|
|
638
638
|
|
|
639
639
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
640
640
|
no response is received before the timeout expires, the request fails and
|