elasticsearch 8.16.0__py3-none-any.whl → 8.17.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 +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -42,9 +42,10 @@ class MonitoringClient(NamespacedClient):
|
|
|
42
42
|
pretty: t.Optional[bool] = None,
|
|
43
43
|
) -> ObjectApiResponse[t.Any]:
|
|
44
44
|
"""
|
|
45
|
-
|
|
45
|
+
Send monitoring data. This API is used by the monitoring features to send monitoring
|
|
46
|
+
data.
|
|
46
47
|
|
|
47
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
48
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/monitor-elasticsearch-cluster.html>`_
|
|
48
49
|
|
|
49
50
|
:param interval: Collection interval (e.g., '10s' or '10000ms') of the payload
|
|
50
51
|
:param operations:
|
|
@@ -44,15 +44,15 @@ class NodesClient(NamespacedClient):
|
|
|
44
44
|
pretty: t.Optional[bool] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
48
|
-
in the cluster.
|
|
47
|
+
Clear the archived repositories metering. Clear the archived repositories metering
|
|
48
|
+
information in the cluster.
|
|
49
49
|
|
|
50
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
50
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-repositories-metering-archive-api.html>`_
|
|
51
51
|
|
|
52
52
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
53
|
-
information.
|
|
54
|
-
:param max_archive_version: Specifies the maximum
|
|
55
|
-
|
|
53
|
+
information.
|
|
54
|
+
:param max_archive_version: Specifies the maximum `archive_version` to be cleared
|
|
55
|
+
from the archive.
|
|
56
56
|
"""
|
|
57
57
|
if node_id in SKIP_IN_PATH:
|
|
58
58
|
raise ValueError("Empty value passed for parameter 'node_id'")
|
|
@@ -94,13 +94,13 @@ class NodesClient(NamespacedClient):
|
|
|
94
94
|
pretty: t.Optional[bool] = None,
|
|
95
95
|
) -> ObjectApiResponse[t.Any]:
|
|
96
96
|
"""
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
Get cluster repositories metering. Get repositories metering information for
|
|
98
|
+
a cluster. This API exposes monotonically non-decreasing counters and it is expected
|
|
99
|
+
that clients would durably store the information needed to compute aggregations
|
|
100
|
+
over a period of time. Additionally, the information exposed by this API is volatile,
|
|
101
|
+
meaning that it will not be present after node restarts.
|
|
102
102
|
|
|
103
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
103
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-repositories-metering-api.html>`_
|
|
104
104
|
|
|
105
105
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
106
106
|
information. All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes).
|
|
@@ -151,10 +151,11 @@ class NodesClient(NamespacedClient):
|
|
|
151
151
|
] = None,
|
|
152
152
|
) -> TextApiResponse:
|
|
153
153
|
"""
|
|
154
|
-
|
|
155
|
-
The output is plain text with a breakdown of
|
|
154
|
+
Get the hot threads for nodes. Get a breakdown of the hot threads on each selected
|
|
155
|
+
node in the cluster. The output is plain text with a breakdown of the top hot
|
|
156
|
+
threads for each node.
|
|
156
157
|
|
|
157
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
158
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-hot-threads.html>`_
|
|
158
159
|
|
|
159
160
|
:param node_id: List of node IDs or names used to limit returned information.
|
|
160
161
|
:param ignore_idle_threads: If true, known idle threads (e.g. waiting in a socket
|
|
@@ -227,9 +228,10 @@ class NodesClient(NamespacedClient):
|
|
|
227
228
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
228
229
|
) -> ObjectApiResponse[t.Any]:
|
|
229
230
|
"""
|
|
230
|
-
|
|
231
|
+
Get node information. By default, the API returns all attributes and core settings
|
|
232
|
+
for cluster nodes.
|
|
231
233
|
|
|
232
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
234
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-info.html>`_
|
|
233
235
|
|
|
234
236
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
235
237
|
information.
|
|
@@ -296,9 +298,20 @@ class NodesClient(NamespacedClient):
|
|
|
296
298
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
297
299
|
) -> ObjectApiResponse[t.Any]:
|
|
298
300
|
"""
|
|
299
|
-
|
|
301
|
+
Reload the keystore on nodes in the cluster. Secure settings are stored in an
|
|
302
|
+
on-disk keystore. Certain of these settings are reloadable. That is, you can
|
|
303
|
+
change them on disk and reload them without restarting any nodes in the cluster.
|
|
304
|
+
When you have updated reloadable secure settings in your keystore, you can use
|
|
305
|
+
this API to reload those settings on each node. When the Elasticsearch keystore
|
|
306
|
+
is password protected and not simply obfuscated, you must provide the password
|
|
307
|
+
for the keystore when you reload the secure settings. Reloading the settings
|
|
308
|
+
for the whole cluster assumes that the keystores for all nodes are protected
|
|
309
|
+
with the same password; this method is allowed only when inter-node communications
|
|
310
|
+
are encrypted. Alternatively, you can reload the secure settings on each node
|
|
311
|
+
by locally accessing the API and passing the node-specific Elasticsearch keystore
|
|
312
|
+
password.
|
|
300
313
|
|
|
301
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
314
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/secure-settings.html#reloadable-secure-settings>`_
|
|
302
315
|
|
|
303
316
|
:param node_id: The names of particular nodes in the cluster to target.
|
|
304
317
|
:param secure_settings_password: The password for the Elasticsearch keystore.
|
|
@@ -367,9 +380,10 @@ class NodesClient(NamespacedClient):
|
|
|
367
380
|
types: t.Optional[t.Sequence[str]] = None,
|
|
368
381
|
) -> ObjectApiResponse[t.Any]:
|
|
369
382
|
"""
|
|
370
|
-
|
|
383
|
+
Get node statistics. Get statistics for nodes in a cluster. By default, all stats
|
|
384
|
+
are returned. You can limit the returned information by using metrics.
|
|
371
385
|
|
|
372
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
386
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-stats.html>`_
|
|
373
387
|
|
|
374
388
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
375
389
|
information.
|
|
@@ -484,9 +498,9 @@ class NodesClient(NamespacedClient):
|
|
|
484
498
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
485
499
|
) -> ObjectApiResponse[t.Any]:
|
|
486
500
|
"""
|
|
487
|
-
|
|
501
|
+
Get feature usage information.
|
|
488
502
|
|
|
489
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
503
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-usage.html>`_
|
|
490
504
|
|
|
491
505
|
:param node_id: A comma-separated list of node IDs or names to limit the returned
|
|
492
506
|
information; use `_local` to return information from the node you're connecting
|
|
@@ -37,9 +37,11 @@ class QueryRulesClient(NamespacedClient):
|
|
|
37
37
|
pretty: t.Optional[bool] = None,
|
|
38
38
|
) -> ObjectApiResponse[t.Any]:
|
|
39
39
|
"""
|
|
40
|
-
|
|
40
|
+
Delete a query rule. Delete a query rule within a query ruleset. This is a destructive
|
|
41
|
+
action that is only recoverable by re-adding the same rule with the create or
|
|
42
|
+
update query rule API.
|
|
41
43
|
|
|
42
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
44
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-rule.html>`_
|
|
43
45
|
|
|
44
46
|
:param ruleset_id: The unique identifier of the query ruleset containing the
|
|
45
47
|
rule to delete
|
|
@@ -85,9 +87,10 @@ class QueryRulesClient(NamespacedClient):
|
|
|
85
87
|
pretty: t.Optional[bool] = None,
|
|
86
88
|
) -> ObjectApiResponse[t.Any]:
|
|
87
89
|
"""
|
|
88
|
-
|
|
90
|
+
Delete a query ruleset. Remove a query ruleset and its associated data. This
|
|
91
|
+
is a destructive action that is not recoverable.
|
|
89
92
|
|
|
90
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
93
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-ruleset.html>`_
|
|
91
94
|
|
|
92
95
|
:param ruleset_id: The unique identifier of the query ruleset to delete
|
|
93
96
|
"""
|
|
@@ -126,9 +129,9 @@ class QueryRulesClient(NamespacedClient):
|
|
|
126
129
|
pretty: t.Optional[bool] = None,
|
|
127
130
|
) -> ObjectApiResponse[t.Any]:
|
|
128
131
|
"""
|
|
129
|
-
|
|
132
|
+
Get a query rule. Get details about a query rule within a query ruleset.
|
|
130
133
|
|
|
131
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
134
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-query-rule.html>`_
|
|
132
135
|
|
|
133
136
|
:param ruleset_id: The unique identifier of the query ruleset containing the
|
|
134
137
|
rule to retrieve
|
|
@@ -174,9 +177,9 @@ class QueryRulesClient(NamespacedClient):
|
|
|
174
177
|
pretty: t.Optional[bool] = None,
|
|
175
178
|
) -> ObjectApiResponse[t.Any]:
|
|
176
179
|
"""
|
|
177
|
-
|
|
180
|
+
Get a query ruleset. Get details about a query ruleset.
|
|
178
181
|
|
|
179
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
182
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-query-ruleset.html>`_
|
|
180
183
|
|
|
181
184
|
:param ruleset_id: The unique identifier of the query ruleset
|
|
182
185
|
"""
|
|
@@ -217,12 +220,12 @@ class QueryRulesClient(NamespacedClient):
|
|
|
217
220
|
size: t.Optional[int] = None,
|
|
218
221
|
) -> ObjectApiResponse[t.Any]:
|
|
219
222
|
"""
|
|
220
|
-
|
|
223
|
+
Get all query rulesets. Get summarized information about the query rulesets.
|
|
221
224
|
|
|
222
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
225
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-query-rulesets.html>`_
|
|
223
226
|
|
|
224
|
-
:param from_:
|
|
225
|
-
:param size:
|
|
227
|
+
:param from_: The offset from the first result to fetch.
|
|
228
|
+
:param size: The maximum number of results to retrieve.
|
|
226
229
|
"""
|
|
227
230
|
__path_parts: t.Dict[str, str] = {}
|
|
228
231
|
__path = "/_query_rules"
|
|
@@ -270,17 +273,26 @@ class QueryRulesClient(NamespacedClient):
|
|
|
270
273
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
271
274
|
) -> ObjectApiResponse[t.Any]:
|
|
272
275
|
"""
|
|
273
|
-
|
|
276
|
+
Create or update a query rule. Create or update a query rule within a query ruleset.
|
|
277
|
+
IMPORTANT: Due to limitations within pinned queries, you can only pin documents
|
|
278
|
+
using ids or docs, but cannot use both in single rule. It is advised to use one
|
|
279
|
+
or the other in query rulesets, to avoid errors. Additionally, pinned queries
|
|
280
|
+
have a maximum limit of 100 pinned hits. If multiple matching rules pin more
|
|
281
|
+
than 100 documents, only the first 100 documents are pinned in the order they
|
|
282
|
+
are specified in the ruleset.
|
|
274
283
|
|
|
275
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
284
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-rule.html>`_
|
|
276
285
|
|
|
277
286
|
:param ruleset_id: The unique identifier of the query ruleset containing the
|
|
278
|
-
rule to be created or updated
|
|
287
|
+
rule to be created or updated.
|
|
279
288
|
:param rule_id: The unique identifier of the query rule within the specified
|
|
280
|
-
ruleset to be created or updated
|
|
281
|
-
:param actions:
|
|
282
|
-
|
|
283
|
-
:param
|
|
289
|
+
ruleset to be created or updated.
|
|
290
|
+
:param actions: The actions to take when the rule is matched. The format of this
|
|
291
|
+
action depends on the rule type.
|
|
292
|
+
:param criteria: The criteria that must be met for the rule to be applied. If
|
|
293
|
+
multiple criteria are specified for a rule, all criteria must be met for
|
|
294
|
+
the rule to be applied.
|
|
295
|
+
:param type: The type of rule.
|
|
284
296
|
:param priority:
|
|
285
297
|
"""
|
|
286
298
|
if ruleset_id in SKIP_IN_PATH:
|
|
@@ -345,12 +357,19 @@ class QueryRulesClient(NamespacedClient):
|
|
|
345
357
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
346
358
|
) -> ObjectApiResponse[t.Any]:
|
|
347
359
|
"""
|
|
348
|
-
|
|
360
|
+
Create or update a query ruleset. There is a limit of 100 rules per ruleset.
|
|
361
|
+
This limit can be increased by using the `xpack.applications.rules.max_rules_per_ruleset`
|
|
362
|
+
cluster setting. IMPORTANT: Due to limitations within pinned queries, you can
|
|
363
|
+
only select documents using `ids` or `docs`, but cannot use both in single rule.
|
|
364
|
+
It is advised to use one or the other in query rulesets, to avoid errors. Additionally,
|
|
365
|
+
pinned queries have a maximum limit of 100 pinned hits. If multiple matching
|
|
366
|
+
rules pin more than 100 documents, only the first 100 documents are pinned in
|
|
367
|
+
the order they are specified in the ruleset.
|
|
349
368
|
|
|
350
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
369
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-ruleset.html>`_
|
|
351
370
|
|
|
352
371
|
:param ruleset_id: The unique identifier of the query ruleset to be created or
|
|
353
|
-
updated
|
|
372
|
+
updated.
|
|
354
373
|
:param rules:
|
|
355
374
|
"""
|
|
356
375
|
if ruleset_id in SKIP_IN_PATH:
|
|
@@ -398,13 +417,16 @@ class QueryRulesClient(NamespacedClient):
|
|
|
398
417
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
399
418
|
) -> ObjectApiResponse[t.Any]:
|
|
400
419
|
"""
|
|
401
|
-
|
|
420
|
+
Test a query ruleset. Evaluate match criteria against a query ruleset to identify
|
|
421
|
+
the rules that would match that criteria.
|
|
402
422
|
|
|
403
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
423
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/test-query-ruleset.html>`_
|
|
404
424
|
|
|
405
425
|
:param ruleset_id: The unique identifier of the query ruleset to be created or
|
|
406
426
|
updated
|
|
407
|
-
:param match_criteria:
|
|
427
|
+
:param match_criteria: The match criteria to apply to rules in the given query
|
|
428
|
+
ruleset. Match criteria should match the keys defined in the `criteria.metadata`
|
|
429
|
+
field of the rule.
|
|
408
430
|
"""
|
|
409
431
|
if ruleset_id in SKIP_IN_PATH:
|
|
410
432
|
raise ValueError("Empty value passed for parameter 'ruleset_id'")
|
|
@@ -43,9 +43,22 @@ class RollupClient(NamespacedClient):
|
|
|
43
43
|
pretty: t.Optional[bool] = None,
|
|
44
44
|
) -> ObjectApiResponse[t.Any]:
|
|
45
45
|
"""
|
|
46
|
-
|
|
46
|
+
Delete a rollup job. A job must be stopped before it can be deleted. If you attempt
|
|
47
|
+
to delete a started job, an error occurs. Similarly, if you attempt to delete
|
|
48
|
+
a nonexistent job, an exception occurs. IMPORTANT: When you delete a job, you
|
|
49
|
+
remove only the process that is actively monitoring and rolling up data. The
|
|
50
|
+
API does not delete any previously rolled up data. This is by design; a user
|
|
51
|
+
may wish to roll up a static data set. Because the data set is static, after
|
|
52
|
+
it has been fully rolled up there is no need to keep the indexing rollup job
|
|
53
|
+
around (as there will be no new data). Thus the job can be deleted, leaving behind
|
|
54
|
+
the rolled up data for analysis. If you wish to also remove the rollup data and
|
|
55
|
+
the rollup index contains the data for only a single job, you can delete the
|
|
56
|
+
whole rollup index. If the rollup index stores data from several jobs, you must
|
|
57
|
+
issue a delete-by-query that targets the rollup job's identifier in the rollup
|
|
58
|
+
index. For example: ``` POST my_rollup_index/_delete_by_query { "query": { "term":
|
|
59
|
+
{ "_rollup.id": "the_rollup_job_id" } } } ```
|
|
47
60
|
|
|
48
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
61
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-delete-job.html>`_
|
|
49
62
|
|
|
50
63
|
:param id: Identifier for the job.
|
|
51
64
|
"""
|
|
@@ -84,9 +97,13 @@ class RollupClient(NamespacedClient):
|
|
|
84
97
|
pretty: t.Optional[bool] = None,
|
|
85
98
|
) -> ObjectApiResponse[t.Any]:
|
|
86
99
|
"""
|
|
87
|
-
|
|
100
|
+
Get rollup job information. Get the configuration, stats, and status of rollup
|
|
101
|
+
jobs. NOTE: This API returns only active (both `STARTED` and `STOPPED`) jobs.
|
|
102
|
+
If a job was created, ran for a while, then was deleted, the API does not return
|
|
103
|
+
any details about it. For details about a historical rollup job, the rollup capabilities
|
|
104
|
+
API may be more useful.
|
|
88
105
|
|
|
89
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
106
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-job.html>`_
|
|
90
107
|
|
|
91
108
|
:param id: Identifier for the rollup job. If it is `_all` or omitted, the API
|
|
92
109
|
returns all rollup jobs.
|
|
@@ -129,10 +146,17 @@ class RollupClient(NamespacedClient):
|
|
|
129
146
|
pretty: t.Optional[bool] = None,
|
|
130
147
|
) -> ObjectApiResponse[t.Any]:
|
|
131
148
|
"""
|
|
132
|
-
|
|
133
|
-
index or index pattern.
|
|
149
|
+
Get the rollup job capabilities. Get the capabilities of any rollup jobs that
|
|
150
|
+
have been configured for a specific index or index pattern. This API is useful
|
|
151
|
+
because a rollup job is often configured to rollup only a subset of fields from
|
|
152
|
+
the source index. Furthermore, only certain aggregations can be configured for
|
|
153
|
+
various fields, leading to a limited subset of functionality depending on that
|
|
154
|
+
configuration. This API enables you to inspect an index and determine: 1. Does
|
|
155
|
+
this index have associated rollup data somewhere in the cluster? 2. If yes to
|
|
156
|
+
the first question, what fields were rolled up, what aggregations can be performed,
|
|
157
|
+
and where does the data live?
|
|
134
158
|
|
|
135
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
159
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-rollup-caps.html>`_
|
|
136
160
|
|
|
137
161
|
:param id: Index, indices or index-pattern to return rollup capabilities for.
|
|
138
162
|
`_all` may be used to fetch rollup capabilities from all jobs.
|
|
@@ -175,10 +199,14 @@ class RollupClient(NamespacedClient):
|
|
|
175
199
|
pretty: t.Optional[bool] = None,
|
|
176
200
|
) -> ObjectApiResponse[t.Any]:
|
|
177
201
|
"""
|
|
178
|
-
|
|
179
|
-
|
|
202
|
+
Get the rollup index capabilities. Get the rollup capabilities of all jobs inside
|
|
203
|
+
of a rollup index. A single rollup index may store the data for multiple rollup
|
|
204
|
+
jobs and may have a variety of capabilities depending on those jobs. This API
|
|
205
|
+
enables you to determine: * What jobs are stored in an index (or indices specified
|
|
206
|
+
via a pattern)? * What target indices were rolled up, what fields were used in
|
|
207
|
+
those rollups, and what aggregations can be performed on each job?
|
|
180
208
|
|
|
181
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
209
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-rollup-index-caps.html>`_
|
|
182
210
|
|
|
183
211
|
:param index: Data stream or index to check for rollup capabilities. Wildcard
|
|
184
212
|
(`*`) expressions are supported.
|
|
@@ -239,9 +267,18 @@ class RollupClient(NamespacedClient):
|
|
|
239
267
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
240
268
|
) -> ObjectApiResponse[t.Any]:
|
|
241
269
|
"""
|
|
242
|
-
|
|
270
|
+
Create a rollup job. WARNING: From 8.15.0, calling this API in a cluster with
|
|
271
|
+
no rollup usage will fail with a message about the deprecation and planned removal
|
|
272
|
+
of rollup features. A cluster needs to contain either a rollup job or a rollup
|
|
273
|
+
index in order for this API to be allowed to run. The rollup job configuration
|
|
274
|
+
contains all the details about how the job should run, when it indexes documents,
|
|
275
|
+
and what future queries will be able to run against the rollup index. There are
|
|
276
|
+
three main sections to the job configuration: the logistical details about the
|
|
277
|
+
job (for example, the cron schedule), the fields that are used for grouping,
|
|
278
|
+
and what metrics to collect for each group. Jobs are created in a `STOPPED` state.
|
|
279
|
+
You can start them with the start rollup jobs API.
|
|
243
280
|
|
|
244
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
281
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-put-job.html>`_
|
|
245
282
|
|
|
246
283
|
:param id: Identifier for the rollup job. This can be any alphanumeric string
|
|
247
284
|
and uniquely identifies the data that is associated with the rollup job.
|
|
@@ -356,14 +393,41 @@ class RollupClient(NamespacedClient):
|
|
|
356
393
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
357
394
|
) -> ObjectApiResponse[t.Any]:
|
|
358
395
|
"""
|
|
359
|
-
|
|
396
|
+
Search rolled-up data. The rollup search endpoint is needed because, internally,
|
|
397
|
+
rolled-up documents utilize a different document structure than the original
|
|
398
|
+
data. It rewrites standard Query DSL into a format that matches the rollup documents
|
|
399
|
+
then takes the response and rewrites it back to what a client would expect given
|
|
400
|
+
the original query. The request body supports a subset of features from the regular
|
|
401
|
+
search API. The following functionality is not available: `size`: Because rollups
|
|
402
|
+
work on pre-aggregated data, no search hits can be returned and so size must
|
|
403
|
+
be set to zero or omitted entirely. `highlighter`, `suggestors`, `post_filter`,
|
|
404
|
+
`profile`, `explain`: These are similarly disallowed. **Searching both historical
|
|
405
|
+
rollup and non-rollup data** The rollup search API has the capability to search
|
|
406
|
+
across both "live" non-rollup data and the aggregated rollup data. This is done
|
|
407
|
+
by simply adding the live indices to the URI. For example: ``` GET sensor-1,sensor_rollup/_rollup_search
|
|
408
|
+
{ "size": 0, "aggregations": { "max_temperature": { "max": { "field": "temperature"
|
|
409
|
+
} } } } ``` The rollup search endpoint does two things when the search runs:
|
|
410
|
+
* The original request is sent to the non-rollup index unaltered. * A rewritten
|
|
411
|
+
version of the original request is sent to the rollup index. When the two responses
|
|
412
|
+
are received, the endpoint rewrites the rollup response and merges the two together.
|
|
413
|
+
During the merging process, if there is any overlap in buckets between the two
|
|
414
|
+
responses, the buckets from the non-rollup index are used.
|
|
360
415
|
|
|
361
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
416
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-search.html>`_
|
|
362
417
|
|
|
363
|
-
:param index:
|
|
418
|
+
:param index: A comma-separated list of data streams and indices used to limit
|
|
419
|
+
the request. This parameter has the following rules: * At least one data
|
|
420
|
+
stream, index, or wildcard expression must be specified. This target can
|
|
421
|
+
include a rollup or non-rollup index. For data streams, the stream's backing
|
|
422
|
+
indices can only serve as non-rollup indices. Omitting the parameter or using
|
|
423
|
+
`_all` are not permitted. * Multiple non-rollup indices may be specified.
|
|
424
|
+
* Only one rollup index may be specified. If more than one are supplied,
|
|
425
|
+
an exception occurs. * Wildcard expressions (`*`) may be used. If they match
|
|
426
|
+
more than one rollup index, an exception occurs. However, you can use an
|
|
427
|
+
expression to match multiple non-rollup indices or data streams.
|
|
364
428
|
:param aggregations: Specifies aggregations.
|
|
365
429
|
:param aggs: Specifies aggregations.
|
|
366
|
-
:param query: Specifies a DSL query.
|
|
430
|
+
:param query: Specifies a DSL query that is subject to some limitations.
|
|
367
431
|
:param rest_total_hits_as_int: Indicates whether hits.total should be rendered
|
|
368
432
|
as an integer or an object in the rest search response
|
|
369
433
|
:param size: Must be zero if set, as rollups work on pre-aggregated data.
|
|
@@ -420,9 +484,10 @@ class RollupClient(NamespacedClient):
|
|
|
420
484
|
pretty: t.Optional[bool] = None,
|
|
421
485
|
) -> ObjectApiResponse[t.Any]:
|
|
422
486
|
"""
|
|
423
|
-
|
|
487
|
+
Start rollup jobs. If you try to start a job that does not exist, an exception
|
|
488
|
+
occurs. If you try to start a job that is already started, nothing happens.
|
|
424
489
|
|
|
425
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
490
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-start-job.html>`_
|
|
426
491
|
|
|
427
492
|
:param id: Identifier for the rollup job.
|
|
428
493
|
"""
|
|
@@ -463,14 +528,24 @@ class RollupClient(NamespacedClient):
|
|
|
463
528
|
wait_for_completion: t.Optional[bool] = None,
|
|
464
529
|
) -> ObjectApiResponse[t.Any]:
|
|
465
530
|
"""
|
|
466
|
-
|
|
531
|
+
Stop rollup jobs. If you try to stop a job that does not exist, an exception
|
|
532
|
+
occurs. If you try to stop a job that is already stopped, nothing happens. Since
|
|
533
|
+
only a stopped job can be deleted, it can be useful to block the API until the
|
|
534
|
+
indexer has fully stopped. This is accomplished with the `wait_for_completion`
|
|
535
|
+
query parameter, and optionally a timeout. For example: ``` POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s
|
|
536
|
+
``` The parameter blocks the API call from returning until either the job has
|
|
537
|
+
moved to STOPPED or the specified time has elapsed. If the specified time elapses
|
|
538
|
+
without the job moving to STOPPED, a timeout exception occurs.
|
|
467
539
|
|
|
468
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
540
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-stop-job.html>`_
|
|
469
541
|
|
|
470
542
|
:param id: Identifier for the rollup job.
|
|
471
543
|
:param timeout: If `wait_for_completion` is `true`, the API blocks for (at maximum)
|
|
472
544
|
the specified duration while waiting for the job to stop. If more than `timeout`
|
|
473
|
-
time has passed, the API throws a timeout exception.
|
|
545
|
+
time has passed, the API throws a timeout exception. NOTE: Even if a timeout
|
|
546
|
+
occurs, the stop request is still processing and eventually moves the job
|
|
547
|
+
to STOPPED. The timeout simply means the API call itself timed out while
|
|
548
|
+
waiting for the status change.
|
|
474
549
|
:param wait_for_completion: If set to `true`, causes the API to block until the
|
|
475
550
|
indexer state completely stops. If set to `false`, the API returns immediately
|
|
476
551
|
and the indexer is stopped asynchronously in the background.
|