elasticsearch 8.18.1__py3-none-any.whl → 8.19.1__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 +68 -82
- elasticsearch/_async/client/async_search.py +5 -9
- elasticsearch/_async/client/autoscaling.py +4 -4
- elasticsearch/_async/client/cat.py +744 -75
- elasticsearch/_async/client/ccr.py +13 -13
- elasticsearch/_async/client/cluster.py +38 -24
- 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 +13 -5
- elasticsearch/_async/client/esql.py +54 -15
- elasticsearch/_async/client/features.py +2 -2
- elasticsearch/_async/client/fleet.py +13 -13
- elasticsearch/_async/client/graph.py +1 -1
- elasticsearch/_async/client/ilm.py +11 -11
- elasticsearch/_async/client/indices.py +132 -83
- elasticsearch/_async/client/inference.py +519 -112
- elasticsearch/_async/client/ingest.py +9 -16
- elasticsearch/_async/client/license.py +10 -10
- elasticsearch/_async/client/logstash.py +3 -3
- elasticsearch/_async/client/migration.py +3 -3
- elasticsearch/_async/client/ml.py +76 -88
- elasticsearch/_async/client/nodes.py +9 -8
- elasticsearch/_async/client/query_rules.py +8 -8
- elasticsearch/_async/client/rollup.py +8 -8
- elasticsearch/_async/client/search_application.py +10 -10
- elasticsearch/_async/client/searchable_snapshots.py +4 -4
- elasticsearch/_async/client/security.py +72 -80
- 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 +286 -130
- elasticsearch/_async/client/sql.py +7 -7
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +7 -7
- elasticsearch/_async/client/tasks.py +3 -3
- elasticsearch/_async/client/text_structure.py +4 -4
- elasticsearch/_async/client/transform.py +69 -9
- elasticsearch/_async/client/xpack.py +1 -1
- elasticsearch/_sync/client/__init__.py +68 -82
- elasticsearch/_sync/client/async_search.py +5 -9
- elasticsearch/_sync/client/autoscaling.py +4 -4
- elasticsearch/_sync/client/cat.py +744 -75
- elasticsearch/_sync/client/ccr.py +13 -13
- elasticsearch/_sync/client/cluster.py +38 -24
- 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 +13 -5
- elasticsearch/_sync/client/esql.py +54 -15
- elasticsearch/_sync/client/features.py +2 -2
- elasticsearch/_sync/client/fleet.py +13 -13
- elasticsearch/_sync/client/graph.py +1 -1
- elasticsearch/_sync/client/ilm.py +11 -11
- elasticsearch/_sync/client/indices.py +132 -83
- elasticsearch/_sync/client/inference.py +519 -112
- elasticsearch/_sync/client/ingest.py +9 -16
- elasticsearch/_sync/client/license.py +10 -10
- elasticsearch/_sync/client/logstash.py +3 -3
- elasticsearch/_sync/client/migration.py +3 -3
- elasticsearch/_sync/client/ml.py +76 -88
- elasticsearch/_sync/client/nodes.py +9 -8
- elasticsearch/_sync/client/query_rules.py +8 -8
- elasticsearch/_sync/client/rollup.py +8 -8
- elasticsearch/_sync/client/search_application.py +10 -10
- elasticsearch/_sync/client/searchable_snapshots.py +4 -4
- elasticsearch/_sync/client/security.py +72 -80
- 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 +286 -130
- elasticsearch/_sync/client/sql.py +7 -7
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +7 -7
- elasticsearch/_sync/client/tasks.py +3 -3
- elasticsearch/_sync/client/text_structure.py +4 -4
- elasticsearch/_sync/client/transform.py +69 -9
- elasticsearch/_sync/client/xpack.py +1 -1
- elasticsearch/_version.py +1 -1
- elasticsearch/compat.py +5 -0
- elasticsearch/dsl/__init__.py +2 -1
- elasticsearch/dsl/_async/document.py +85 -1
- elasticsearch/dsl/_sync/document.py +85 -1
- elasticsearch/dsl/aggs.py +22 -3
- elasticsearch/dsl/document_base.py +219 -16
- elasticsearch/dsl/field.py +272 -48
- elasticsearch/dsl/query.py +49 -4
- elasticsearch/dsl/response/aggs.py +1 -1
- elasticsearch/dsl/types.py +247 -27
- elasticsearch/dsl/utils.py +2 -2
- elasticsearch/esql/__init__.py +19 -0
- elasticsearch/esql/esql.py +1156 -0
- elasticsearch/esql/functions.py +1750 -0
- elasticsearch/exceptions.py +2 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.1.dist-info}/METADATA +1 -5
- elasticsearch-8.19.1.dist-info/RECORD +164 -0
- elasticsearch-8.18.1.dist-info/RECORD +0 -163
- elasticsearch-8.18.1.dist-info/licenses/LICENSE.txt +0 -175
- elasticsearch-8.18.1.dist-info/licenses/NOTICE.txt +0 -559
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.18.1.dist-info → elasticsearch-8.19.1.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/guide/en/elasticsearch/reference/8.
|
|
46
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/delete-enrich-policy-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
95
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/execute-enrich-policy-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
147
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-enrich-policy-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
205
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/put-enrich-policy-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
266
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/enrich-stats-api.html>`_
|
|
267
267
|
|
|
268
268
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
269
269
|
"""
|
|
@@ -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/guide/en/elasticsearch/reference/8.
|
|
96
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-eql-search-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
150
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-async-eql-status-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
250
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/eql-search-api.html>`_
|
|
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:
|
|
@@ -22,6 +22,9 @@ from elastic_transport import ObjectApiResponse
|
|
|
22
22
|
from ._base import NamespacedClient
|
|
23
23
|
from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
24
24
|
|
|
25
|
+
if t.TYPE_CHECKING:
|
|
26
|
+
from elasticsearch.esql import ESQLBase
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class EsqlClient(NamespacedClient):
|
|
27
30
|
|
|
@@ -31,6 +34,8 @@ class EsqlClient(NamespacedClient):
|
|
|
31
34
|
"columnar",
|
|
32
35
|
"filter",
|
|
33
36
|
"include_ccs_metadata",
|
|
37
|
+
"keep_alive",
|
|
38
|
+
"keep_on_completion",
|
|
34
39
|
"locale",
|
|
35
40
|
"params",
|
|
36
41
|
"profile",
|
|
@@ -42,7 +47,8 @@ class EsqlClient(NamespacedClient):
|
|
|
42
47
|
async def async_query(
|
|
43
48
|
self,
|
|
44
49
|
*,
|
|
45
|
-
query: t.Optional[str] = None,
|
|
50
|
+
query: t.Optional[t.Union[str, "ESQLBase"]] = None,
|
|
51
|
+
allow_partial_results: t.Optional[bool] = None,
|
|
46
52
|
columnar: t.Optional[bool] = None,
|
|
47
53
|
delimiter: t.Optional[str] = None,
|
|
48
54
|
drop_null_columns: t.Optional[bool] = None,
|
|
@@ -83,10 +89,15 @@ class EsqlClient(NamespacedClient):
|
|
|
83
89
|
<p>The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.</p>
|
|
84
90
|
|
|
85
91
|
|
|
86
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
92
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-api.html>`_
|
|
87
93
|
|
|
88
94
|
:param query: The ES|QL query API accepts an ES|QL query string in the query
|
|
89
95
|
parameter, runs it, and returns the results.
|
|
96
|
+
:param allow_partial_results: If `true`, partial results will be returned if
|
|
97
|
+
there are shard failures, but the query can continue to execute on other
|
|
98
|
+
clusters and shards. If `false`, the query will fail if there are any failures.
|
|
99
|
+
To override the default behavior, you can set the `esql.query.allow_partial_results`
|
|
100
|
+
cluster setting to `false`.
|
|
90
101
|
:param columnar: By default, ES|QL returns results as rows. For example, FROM
|
|
91
102
|
returns each individual document as one row. For the JSON, YAML, CBOR and
|
|
92
103
|
smile formats, ES|QL can return the results in a columnar fashion where one
|
|
@@ -99,7 +110,12 @@ class EsqlClient(NamespacedClient):
|
|
|
99
110
|
which has the name of all the columns.
|
|
100
111
|
:param filter: Specify a Query DSL query in the filter parameter to filter the
|
|
101
112
|
set of documents that an ES|QL query runs on.
|
|
102
|
-
:param format: A short version of the Accept header,
|
|
113
|
+
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
|
|
114
|
+
`tsv`, and `txt` formats will return results in a tabular format, excluding
|
|
115
|
+
other metadata fields from the response. For async requests, nothing will
|
|
116
|
+
be returned if the async query doesn't finish within the timeout. The query
|
|
117
|
+
ID and running status are available in the `X-Elasticsearch-Async-Id` and
|
|
118
|
+
`X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
|
|
103
119
|
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
|
|
104
120
|
query, the response will include an extra `_clusters` object with information
|
|
105
121
|
about the clusters that participated in the search along with info such as
|
|
@@ -135,6 +151,8 @@ class EsqlClient(NamespacedClient):
|
|
|
135
151
|
__path = "/_query/async"
|
|
136
152
|
__query: t.Dict[str, t.Any] = {}
|
|
137
153
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
154
|
+
if allow_partial_results is not None:
|
|
155
|
+
__query["allow_partial_results"] = allow_partial_results
|
|
138
156
|
if delimiter is not None:
|
|
139
157
|
__query["delimiter"] = delimiter
|
|
140
158
|
if drop_null_columns is not None:
|
|
@@ -147,21 +165,21 @@ class EsqlClient(NamespacedClient):
|
|
|
147
165
|
__query["format"] = format
|
|
148
166
|
if human is not None:
|
|
149
167
|
__query["human"] = human
|
|
150
|
-
if keep_alive is not None:
|
|
151
|
-
__query["keep_alive"] = keep_alive
|
|
152
|
-
if keep_on_completion is not None:
|
|
153
|
-
__query["keep_on_completion"] = keep_on_completion
|
|
154
168
|
if pretty is not None:
|
|
155
169
|
__query["pretty"] = pretty
|
|
156
170
|
if not __body:
|
|
157
171
|
if query is not None:
|
|
158
|
-
__body["query"] = query
|
|
172
|
+
__body["query"] = str(query)
|
|
159
173
|
if columnar is not None:
|
|
160
174
|
__body["columnar"] = columnar
|
|
161
175
|
if filter is not None:
|
|
162
176
|
__body["filter"] = filter
|
|
163
177
|
if include_ccs_metadata is not None:
|
|
164
178
|
__body["include_ccs_metadata"] = include_ccs_metadata
|
|
179
|
+
if keep_alive is not None:
|
|
180
|
+
__body["keep_alive"] = keep_alive
|
|
181
|
+
if keep_on_completion is not None:
|
|
182
|
+
__body["keep_on_completion"] = keep_on_completion
|
|
165
183
|
if locale is not None:
|
|
166
184
|
__body["locale"] = locale
|
|
167
185
|
if params is not None:
|
|
@@ -206,7 +224,7 @@ class EsqlClient(NamespacedClient):
|
|
|
206
224
|
</ul>
|
|
207
225
|
|
|
208
226
|
|
|
209
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
227
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-delete-api.html>`_
|
|
210
228
|
|
|
211
229
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
212
230
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -244,6 +262,14 @@ class EsqlClient(NamespacedClient):
|
|
|
244
262
|
drop_null_columns: t.Optional[bool] = None,
|
|
245
263
|
error_trace: t.Optional[bool] = None,
|
|
246
264
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
265
|
+
format: t.Optional[
|
|
266
|
+
t.Union[
|
|
267
|
+
str,
|
|
268
|
+
t.Literal[
|
|
269
|
+
"arrow", "cbor", "csv", "json", "smile", "tsv", "txt", "yaml"
|
|
270
|
+
],
|
|
271
|
+
]
|
|
272
|
+
] = None,
|
|
247
273
|
human: t.Optional[bool] = None,
|
|
248
274
|
keep_alive: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
249
275
|
pretty: t.Optional[bool] = None,
|
|
@@ -259,7 +285,7 @@ class EsqlClient(NamespacedClient):
|
|
|
259
285
|
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>
|
|
260
286
|
|
|
261
287
|
|
|
262
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
288
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-get-api.html>`_
|
|
263
289
|
|
|
264
290
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
265
291
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -269,6 +295,7 @@ class EsqlClient(NamespacedClient):
|
|
|
269
295
|
will be removed from the `columns` and `values` portion of the results. If
|
|
270
296
|
`true`, the response will include an extra section under the name `all_columns`
|
|
271
297
|
which has the name of all the columns.
|
|
298
|
+
:param format: A short version of the Accept header, for example `json` or `yaml`.
|
|
272
299
|
:param keep_alive: The period for which the query and its results are stored
|
|
273
300
|
in the cluster. When this period expires, the query and its results are deleted,
|
|
274
301
|
even if the query is still ongoing.
|
|
@@ -289,6 +316,8 @@ class EsqlClient(NamespacedClient):
|
|
|
289
316
|
__query["error_trace"] = error_trace
|
|
290
317
|
if filter_path is not None:
|
|
291
318
|
__query["filter_path"] = filter_path
|
|
319
|
+
if format is not None:
|
|
320
|
+
__query["format"] = format
|
|
292
321
|
if human is not None:
|
|
293
322
|
__query["human"] = human
|
|
294
323
|
if keep_alive is not None:
|
|
@@ -326,7 +355,7 @@ class EsqlClient(NamespacedClient):
|
|
|
326
355
|
If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.</p>
|
|
327
356
|
|
|
328
357
|
|
|
329
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
358
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-async-query-stop-api.html>`_
|
|
330
359
|
|
|
331
360
|
:param id: The unique identifier of the query. A query ID is provided in the
|
|
332
361
|
ES|QL async query API response for a query that does not complete in the
|
|
@@ -378,7 +407,8 @@ class EsqlClient(NamespacedClient):
|
|
|
378
407
|
async def query(
|
|
379
408
|
self,
|
|
380
409
|
*,
|
|
381
|
-
query: t.Optional[str] = None,
|
|
410
|
+
query: t.Optional[t.Union[str, "ESQLBase"]] = None,
|
|
411
|
+
allow_partial_results: t.Optional[bool] = None,
|
|
382
412
|
columnar: t.Optional[bool] = None,
|
|
383
413
|
delimiter: t.Optional[str] = None,
|
|
384
414
|
drop_null_columns: t.Optional[bool] = None,
|
|
@@ -413,10 +443,15 @@ class EsqlClient(NamespacedClient):
|
|
|
413
443
|
Get search results for an ES|QL (Elasticsearch query language) query.</p>
|
|
414
444
|
|
|
415
445
|
|
|
416
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
446
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/esql-rest.html>`_
|
|
417
447
|
|
|
418
448
|
:param query: The ES|QL query API accepts an ES|QL query string in the query
|
|
419
449
|
parameter, runs it, and returns the results.
|
|
450
|
+
:param allow_partial_results: If `true`, partial results will be returned if
|
|
451
|
+
there are shard failures, but the query can continue to execute on other
|
|
452
|
+
clusters and shards. If `false`, the query will fail if there are any failures.
|
|
453
|
+
To override the default behavior, you can set the `esql.query.allow_partial_results`
|
|
454
|
+
cluster setting to `false`.
|
|
420
455
|
:param columnar: By default, ES|QL returns results as rows. For example, FROM
|
|
421
456
|
returns each individual document as one row. For the JSON, YAML, CBOR and
|
|
422
457
|
smile formats, ES|QL can return the results in a columnar fashion where one
|
|
@@ -429,7 +464,9 @@ class EsqlClient(NamespacedClient):
|
|
|
429
464
|
`all_columns` which has the name of all columns.
|
|
430
465
|
:param filter: Specify a Query DSL query in the filter parameter to filter the
|
|
431
466
|
set of documents that an ES|QL query runs on.
|
|
432
|
-
:param format: A short version of the Accept header, e.g. json, yaml.
|
|
467
|
+
:param format: A short version of the Accept header, e.g. json, yaml. `csv`,
|
|
468
|
+
`tsv`, and `txt` formats will return results in a tabular format, excluding
|
|
469
|
+
other metadata fields from the response.
|
|
433
470
|
:param include_ccs_metadata: When set to `true` and performing a cross-cluster
|
|
434
471
|
query, the response will include an extra `_clusters` object with information
|
|
435
472
|
about the clusters that participated in the search along with info such as
|
|
@@ -451,6 +488,8 @@ class EsqlClient(NamespacedClient):
|
|
|
451
488
|
__path = "/_query"
|
|
452
489
|
__query: t.Dict[str, t.Any] = {}
|
|
453
490
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
491
|
+
if allow_partial_results is not None:
|
|
492
|
+
__query["allow_partial_results"] = allow_partial_results
|
|
454
493
|
if delimiter is not None:
|
|
455
494
|
__query["delimiter"] = delimiter
|
|
456
495
|
if drop_null_columns is not None:
|
|
@@ -467,7 +506,7 @@ class EsqlClient(NamespacedClient):
|
|
|
467
506
|
__query["pretty"] = pretty
|
|
468
507
|
if not __body:
|
|
469
508
|
if query is not None:
|
|
470
|
-
__body["query"] = query
|
|
509
|
+
__body["query"] = str(query)
|
|
471
510
|
if columnar is not None:
|
|
472
511
|
__body["columnar"] = columnar
|
|
473
512
|
if filter 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/guide/en/elasticsearch/reference/8.
|
|
51
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-features-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
105
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/reset-features-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
56
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/get-global-checkpoints.html>`_
|
|
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
|
|
@@ -138,12 +138,12 @@ class FleetClient(NamespacedClient):
|
|
|
138
138
|
"""
|
|
139
139
|
.. raw:: html
|
|
140
140
|
|
|
141
|
-
<p>Executes several
|
|
142
|
-
The API follows the same structure as the
|
|
143
|
-
supports the wait_for_checkpoints parameter.</p>
|
|
141
|
+
<p>Executes several fleet searches with a single API request.</p>
|
|
142
|
+
<p>The API follows the same structure as the multi search (<code>_msearch</code>) API.
|
|
143
|
+
However, similar to the fleet search API, it supports the <code>wait_for_checkpoints</code> parameter.</p>
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
146
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/fleet-multi-search.html>`_
|
|
147
147
|
|
|
148
148
|
:param searches:
|
|
149
149
|
:param index: A single target to search. If the target is an index alias, it
|
|
@@ -154,9 +154,9 @@ class FleetClient(NamespacedClient):
|
|
|
154
154
|
example, a request targeting foo*,bar* returns an error if an index starts
|
|
155
155
|
with foo but no index starts with bar.
|
|
156
156
|
:param allow_partial_search_results: If true, returns partial results if there
|
|
157
|
-
are shard request timeouts or
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
are shard request timeouts or shard failures. If false, returns an error
|
|
158
|
+
with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
|
|
159
|
+
which is true by default.
|
|
160
160
|
:param ccs_minimize_roundtrips: If true, network roundtrips between the coordinating
|
|
161
161
|
node and remote clusters are minimized for cross-cluster search requests.
|
|
162
162
|
:param expand_wildcards: Type of index that wildcard expressions can match. If
|
|
@@ -392,7 +392,7 @@ class FleetClient(NamespacedClient):
|
|
|
392
392
|
after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.</p>
|
|
393
393
|
|
|
394
394
|
|
|
395
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
395
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/fleet-search.html>`_
|
|
396
396
|
|
|
397
397
|
:param index: A single target to search. If the target is an index alias, it
|
|
398
398
|
must resolve to a single index.
|
|
@@ -400,9 +400,9 @@ class FleetClient(NamespacedClient):
|
|
|
400
400
|
:param aggs:
|
|
401
401
|
:param allow_no_indices:
|
|
402
402
|
:param allow_partial_search_results: If true, returns partial results if there
|
|
403
|
-
are shard request timeouts or
|
|
404
|
-
|
|
405
|
-
|
|
403
|
+
are shard request timeouts or shard failures. If false, returns an error
|
|
404
|
+
with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results`
|
|
405
|
+
which is true by default.
|
|
406
406
|
:param analyze_wildcard:
|
|
407
407
|
:param analyzer:
|
|
408
408
|
:param batched_reduce_size:
|
|
@@ -430,7 +430,7 @@ class FleetClient(NamespacedClient):
|
|
|
430
430
|
:param max_concurrent_shard_requests:
|
|
431
431
|
:param min_compatible_shard_node:
|
|
432
432
|
:param min_score: Minimum _score for matching documents. Documents with a lower
|
|
433
|
-
_score are not included in
|
|
433
|
+
_score are not included in search results and results collected by aggregations.
|
|
434
434
|
:param pit: Limits the search to a point in time (PIT). If you provide a PIT,
|
|
435
435
|
you cannot specify an <index> in the request path.
|
|
436
436
|
:param post_filter:
|
|
@@ -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/guide/en/elasticsearch/reference/8.
|
|
58
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/graph-explore-api.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
47
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-delete-lifecycle.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
105
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-explain-lifecycle.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
166
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-get-lifecycle.html>`_
|
|
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/guide/en/elasticsearch/reference/8.
|
|
221
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-get-status.html>`_
|
|
222
222
|
"""
|
|
223
223
|
__path_parts: t.Dict[str, str] = {}
|
|
224
224
|
__path = "/_ilm/status"
|
|
@@ -274,7 +274,7 @@ class IlmClient(NamespacedClient):
|
|
|
274
274
|
Use the stop ILM and get ILM status APIs to wait until the reported operation mode is <code>STOPPED</code>.</p>
|
|
275
275
|
|
|
276
276
|
|
|
277
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
277
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-migrate-to-data-tiers.html>`_
|
|
278
278
|
|
|
279
279
|
:param dry_run: If true, simulates the migration from node attributes based allocation
|
|
280
280
|
filters to data tiers, but does not perform the migration. This provides
|
|
@@ -347,7 +347,7 @@ class IlmClient(NamespacedClient):
|
|
|
347
347
|
An index cannot move to a step that is not part of its policy.</p>
|
|
348
348
|
|
|
349
349
|
|
|
350
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
350
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-move-to-step.html>`_
|
|
351
351
|
|
|
352
352
|
:param index: The name of the index whose lifecycle step is to change
|
|
353
353
|
:param current_step: The step that the index is expected to be in.
|
|
@@ -415,7 +415,7 @@ class IlmClient(NamespacedClient):
|
|
|
415
415
|
<p>NOTE: Only the latest version of the policy is stored, you cannot revert to previous versions.</p>
|
|
416
416
|
|
|
417
417
|
|
|
418
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
418
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-put-lifecycle.html>`_
|
|
419
419
|
|
|
420
420
|
:param name: Identifier for the policy.
|
|
421
421
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
@@ -479,7 +479,7 @@ class IlmClient(NamespacedClient):
|
|
|
479
479
|
It also stops managing the indices.</p>
|
|
480
480
|
|
|
481
481
|
|
|
482
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
482
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-remove-policy.html>`_
|
|
483
483
|
|
|
484
484
|
:param index: The name of the index to remove policy on
|
|
485
485
|
"""
|
|
@@ -525,7 +525,7 @@ class IlmClient(NamespacedClient):
|
|
|
525
525
|
Use the explain lifecycle state API to determine whether an index is in the ERROR step.</p>
|
|
526
526
|
|
|
527
527
|
|
|
528
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
528
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-retry-policy.html>`_
|
|
529
529
|
|
|
530
530
|
:param index: The name of the indices (comma-separated) whose failed lifecycle
|
|
531
531
|
step is to be retry
|
|
@@ -573,7 +573,7 @@ class IlmClient(NamespacedClient):
|
|
|
573
573
|
Restarting ILM is necessary only when it has been stopped using the stop ILM API.</p>
|
|
574
574
|
|
|
575
575
|
|
|
576
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
576
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-start.html>`_
|
|
577
577
|
|
|
578
578
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
579
579
|
no response is received before the timeout expires, the request fails and
|
|
@@ -627,7 +627,7 @@ class IlmClient(NamespacedClient):
|
|
|
627
627
|
Use the get ILM status API to check whether ILM is running.</p>
|
|
628
628
|
|
|
629
629
|
|
|
630
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
630
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.19/ilm-stop.html>`_
|
|
631
631
|
|
|
632
632
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
633
633
|
no response is received before the timeout expires, the request fails and
|