elasticsearch 8.17.1__py3-none-any.whl → 8.17.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +1971 -779
- elasticsearch/_async/client/async_search.py +33 -22
- elasticsearch/_async/client/autoscaling.py +27 -21
- elasticsearch/_async/client/cat.py +216 -141
- elasticsearch/_async/client/ccr.py +96 -70
- elasticsearch/_async/client/cluster.py +150 -142
- elasticsearch/_async/client/connector.py +182 -86
- elasticsearch/_async/client/dangling_indices.py +19 -13
- elasticsearch/_async/client/enrich.py +25 -6
- elasticsearch/_async/client/eql.py +22 -9
- elasticsearch/_async/client/esql.py +295 -3
- elasticsearch/_async/client/features.py +25 -25
- elasticsearch/_async/client/fleet.py +15 -9
- elasticsearch/_async/client/graph.py +9 -8
- elasticsearch/_async/client/ilm.py +85 -55
- elasticsearch/_async/client/indices.py +692 -549
- elasticsearch/_async/client/inference.py +32 -28
- elasticsearch/_async/client/ingest.py +61 -22
- elasticsearch/_async/client/license.py +48 -31
- elasticsearch/_async/client/logstash.py +17 -6
- elasticsearch/_async/client/migration.py +23 -14
- elasticsearch/_async/client/ml.py +532 -284
- elasticsearch/_async/client/monitoring.py +5 -2
- elasticsearch/_async/client/nodes.py +43 -27
- elasticsearch/_async/client/query_rules.py +51 -25
- elasticsearch/_async/client/rollup.py +111 -73
- elasticsearch/_async/client/search_application.py +49 -21
- elasticsearch/_async/client/searchable_snapshots.py +21 -8
- elasticsearch/_async/client/security.py +810 -472
- elasticsearch/_async/client/shutdown.py +31 -26
- elasticsearch/_async/client/simulate.py +16 -22
- elasticsearch/_async/client/slm.py +55 -30
- elasticsearch/_async/client/snapshot.py +173 -192
- elasticsearch/_async/client/sql.py +37 -16
- elasticsearch/_async/client/ssl.py +16 -17
- elasticsearch/_async/client/synonyms.py +50 -29
- elasticsearch/_async/client/tasks.py +74 -39
- elasticsearch/_async/client/text_structure.py +61 -52
- elasticsearch/_async/client/transform.py +108 -79
- elasticsearch/_async/client/watcher.py +93 -57
- elasticsearch/_async/client/xpack.py +16 -7
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_sync/client/__init__.py +1971 -779
- elasticsearch/_sync/client/async_search.py +33 -22
- elasticsearch/_sync/client/autoscaling.py +27 -21
- elasticsearch/_sync/client/cat.py +216 -141
- elasticsearch/_sync/client/ccr.py +96 -70
- elasticsearch/_sync/client/cluster.py +150 -142
- elasticsearch/_sync/client/connector.py +182 -86
- elasticsearch/_sync/client/dangling_indices.py +19 -13
- elasticsearch/_sync/client/enrich.py +25 -6
- elasticsearch/_sync/client/eql.py +22 -9
- elasticsearch/_sync/client/esql.py +295 -3
- elasticsearch/_sync/client/features.py +25 -25
- elasticsearch/_sync/client/fleet.py +15 -9
- elasticsearch/_sync/client/graph.py +9 -8
- elasticsearch/_sync/client/ilm.py +85 -55
- elasticsearch/_sync/client/indices.py +692 -549
- elasticsearch/_sync/client/inference.py +32 -28
- elasticsearch/_sync/client/ingest.py +61 -22
- elasticsearch/_sync/client/license.py +48 -31
- elasticsearch/_sync/client/logstash.py +17 -6
- elasticsearch/_sync/client/migration.py +23 -14
- elasticsearch/_sync/client/ml.py +532 -284
- elasticsearch/_sync/client/monitoring.py +5 -2
- elasticsearch/_sync/client/nodes.py +43 -27
- elasticsearch/_sync/client/query_rules.py +51 -25
- elasticsearch/_sync/client/rollup.py +111 -73
- elasticsearch/_sync/client/search_application.py +49 -21
- elasticsearch/_sync/client/searchable_snapshots.py +21 -8
- elasticsearch/_sync/client/security.py +810 -472
- elasticsearch/_sync/client/shutdown.py +31 -26
- elasticsearch/_sync/client/simulate.py +16 -22
- elasticsearch/_sync/client/slm.py +55 -30
- elasticsearch/_sync/client/snapshot.py +173 -192
- elasticsearch/_sync/client/sql.py +37 -16
- elasticsearch/_sync/client/ssl.py +16 -17
- elasticsearch/_sync/client/synonyms.py +50 -29
- elasticsearch/_sync/client/tasks.py +74 -39
- elasticsearch/_sync/client/text_structure.py +61 -52
- elasticsearch/_sync/client/transform.py +108 -79
- elasticsearch/_sync/client/utils.py +1 -1
- elasticsearch/_sync/client/watcher.py +93 -57
- elasticsearch/_sync/client/xpack.py +16 -7
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
- elasticsearch-8.17.2.dist-info/RECORD +119 -0
- elasticsearch-8.17.1.dist-info/RECORD +0 -119
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
|
@@ -42,8 +42,11 @@ class MonitoringClient(NamespacedClient):
|
|
|
42
42
|
pretty: t.Optional[bool] = None,
|
|
43
43
|
) -> ObjectApiResponse[t.Any]:
|
|
44
44
|
"""
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
.. raw:: html
|
|
46
|
+
|
|
47
|
+
<p>Send monitoring data.
|
|
48
|
+
This API is used by the monitoring features to send monitoring data.</p>
|
|
49
|
+
|
|
47
50
|
|
|
48
51
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/monitor-elasticsearch-cluster.html>`_
|
|
49
52
|
|
|
@@ -44,8 +44,11 @@ class NodesClient(NamespacedClient):
|
|
|
44
44
|
pretty: t.Optional[bool] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
.. raw:: html
|
|
48
|
+
|
|
49
|
+
<p>Clear the archived repositories metering.
|
|
50
|
+
Clear the archived repositories metering information in the cluster.</p>
|
|
51
|
+
|
|
49
52
|
|
|
50
53
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-repositories-metering-archive-api.html>`_
|
|
51
54
|
|
|
@@ -94,11 +97,13 @@ class NodesClient(NamespacedClient):
|
|
|
94
97
|
pretty: t.Optional[bool] = None,
|
|
95
98
|
) -> ObjectApiResponse[t.Any]:
|
|
96
99
|
"""
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
.. raw:: html
|
|
101
|
+
|
|
102
|
+
<p>Get cluster repositories metering.
|
|
103
|
+
Get repositories metering information for a cluster.
|
|
104
|
+
This API exposes monotonically non-decreasing counters and it is expected that clients would durably store the information needed to compute aggregations over a period of time.
|
|
105
|
+
Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts.</p>
|
|
106
|
+
|
|
102
107
|
|
|
103
108
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-repositories-metering-api.html>`_
|
|
104
109
|
|
|
@@ -151,9 +156,12 @@ class NodesClient(NamespacedClient):
|
|
|
151
156
|
] = None,
|
|
152
157
|
) -> TextApiResponse:
|
|
153
158
|
"""
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
.. raw:: html
|
|
160
|
+
|
|
161
|
+
<p>Get the hot threads for nodes.
|
|
162
|
+
Get a breakdown of the hot threads on each selected node in the cluster.
|
|
163
|
+
The output is plain text with a breakdown of the top hot threads for each node.</p>
|
|
164
|
+
|
|
157
165
|
|
|
158
166
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-hot-threads.html>`_
|
|
159
167
|
|
|
@@ -228,8 +236,11 @@ class NodesClient(NamespacedClient):
|
|
|
228
236
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
229
237
|
) -> ObjectApiResponse[t.Any]:
|
|
230
238
|
"""
|
|
231
|
-
|
|
232
|
-
|
|
239
|
+
.. raw:: html
|
|
240
|
+
|
|
241
|
+
<p>Get node information.
|
|
242
|
+
By default, the API returns all attributes and core settings for cluster nodes.</p>
|
|
243
|
+
|
|
233
244
|
|
|
234
245
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-info.html>`_
|
|
235
246
|
|
|
@@ -298,18 +309,16 @@ class NodesClient(NamespacedClient):
|
|
|
298
309
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
299
310
|
) -> ObjectApiResponse[t.Any]:
|
|
300
311
|
"""
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
by locally accessing the API and passing the node-specific Elasticsearch keystore
|
|
312
|
-
password.
|
|
312
|
+
.. raw:: html
|
|
313
|
+
|
|
314
|
+
<p>Reload the keystore on nodes in the cluster.</p>
|
|
315
|
+
<p>Secure settings are stored in an on-disk keystore. Certain of these settings are reloadable.
|
|
316
|
+
That is, you can change them on disk and reload them without restarting any nodes in the cluster.
|
|
317
|
+
When you have updated reloadable secure settings in your keystore, you can use this API to reload those settings on each node.</p>
|
|
318
|
+
<p>When the Elasticsearch keystore is password protected and not simply obfuscated, you must provide the password for the keystore when you reload the secure settings.
|
|
319
|
+
Reloading the settings for the whole cluster assumes that the keystores for all nodes are protected with the same password; this method is allowed only when inter-node communications are encrypted.
|
|
320
|
+
Alternatively, you can reload the secure settings on each node by locally accessing the API and passing the node-specific Elasticsearch keystore password.</p>
|
|
321
|
+
|
|
313
322
|
|
|
314
323
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/secure-settings.html#reloadable-secure-settings>`_
|
|
315
324
|
|
|
@@ -380,8 +389,12 @@ class NodesClient(NamespacedClient):
|
|
|
380
389
|
types: t.Optional[t.Sequence[str]] = None,
|
|
381
390
|
) -> ObjectApiResponse[t.Any]:
|
|
382
391
|
"""
|
|
383
|
-
|
|
384
|
-
|
|
392
|
+
.. raw:: html
|
|
393
|
+
|
|
394
|
+
<p>Get node statistics.
|
|
395
|
+
Get statistics for nodes in a cluster.
|
|
396
|
+
By default, all stats are returned. You can limit the returned information by using metrics.</p>
|
|
397
|
+
|
|
385
398
|
|
|
386
399
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-stats.html>`_
|
|
387
400
|
|
|
@@ -498,7 +511,10 @@ class NodesClient(NamespacedClient):
|
|
|
498
511
|
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
499
512
|
) -> ObjectApiResponse[t.Any]:
|
|
500
513
|
"""
|
|
501
|
-
|
|
514
|
+
.. raw:: html
|
|
515
|
+
|
|
516
|
+
<p>Get feature usage information.</p>
|
|
517
|
+
|
|
502
518
|
|
|
503
519
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/cluster-nodes-usage.html>`_
|
|
504
520
|
|
|
@@ -37,9 +37,12 @@ class QueryRulesClient(NamespacedClient):
|
|
|
37
37
|
pretty: t.Optional[bool] = None,
|
|
38
38
|
) -> ObjectApiResponse[t.Any]:
|
|
39
39
|
"""
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
.. raw:: html
|
|
41
|
+
|
|
42
|
+
<p>Delete a query rule.
|
|
43
|
+
Delete a query rule within a query ruleset.
|
|
44
|
+
This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.</p>
|
|
45
|
+
|
|
43
46
|
|
|
44
47
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-rule.html>`_
|
|
45
48
|
|
|
@@ -87,8 +90,12 @@ class QueryRulesClient(NamespacedClient):
|
|
|
87
90
|
pretty: t.Optional[bool] = None,
|
|
88
91
|
) -> ObjectApiResponse[t.Any]:
|
|
89
92
|
"""
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
.. raw:: html
|
|
94
|
+
|
|
95
|
+
<p>Delete a query ruleset.
|
|
96
|
+
Remove a query ruleset and its associated data.
|
|
97
|
+
This is a destructive action that is not recoverable.</p>
|
|
98
|
+
|
|
92
99
|
|
|
93
100
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-query-ruleset.html>`_
|
|
94
101
|
|
|
@@ -129,7 +136,11 @@ class QueryRulesClient(NamespacedClient):
|
|
|
129
136
|
pretty: t.Optional[bool] = None,
|
|
130
137
|
) -> ObjectApiResponse[t.Any]:
|
|
131
138
|
"""
|
|
132
|
-
|
|
139
|
+
.. raw:: html
|
|
140
|
+
|
|
141
|
+
<p>Get a query rule.
|
|
142
|
+
Get details about a query rule within a query ruleset.</p>
|
|
143
|
+
|
|
133
144
|
|
|
134
145
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-query-rule.html>`_
|
|
135
146
|
|
|
@@ -177,7 +188,11 @@ class QueryRulesClient(NamespacedClient):
|
|
|
177
188
|
pretty: t.Optional[bool] = None,
|
|
178
189
|
) -> ObjectApiResponse[t.Any]:
|
|
179
190
|
"""
|
|
180
|
-
|
|
191
|
+
.. raw:: html
|
|
192
|
+
|
|
193
|
+
<p>Get a query ruleset.
|
|
194
|
+
Get details about a query ruleset.</p>
|
|
195
|
+
|
|
181
196
|
|
|
182
197
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-query-ruleset.html>`_
|
|
183
198
|
|
|
@@ -220,7 +235,11 @@ class QueryRulesClient(NamespacedClient):
|
|
|
220
235
|
size: t.Optional[int] = None,
|
|
221
236
|
) -> ObjectApiResponse[t.Any]:
|
|
222
237
|
"""
|
|
223
|
-
|
|
238
|
+
.. raw:: html
|
|
239
|
+
|
|
240
|
+
<p>Get all query rulesets.
|
|
241
|
+
Get summarized information about the query rulesets.</p>
|
|
242
|
+
|
|
224
243
|
|
|
225
244
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/list-query-rulesets.html>`_
|
|
226
245
|
|
|
@@ -273,13 +292,15 @@ class QueryRulesClient(NamespacedClient):
|
|
|
273
292
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
274
293
|
) -> ObjectApiResponse[t.Any]:
|
|
275
294
|
"""
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
295
|
+
.. raw:: html
|
|
296
|
+
|
|
297
|
+
<p>Create or update a query rule.
|
|
298
|
+
Create or update a query rule within a query ruleset.</p>
|
|
299
|
+
<p>IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.
|
|
300
|
+
It is advised to use one or the other in query rulesets, to avoid errors.
|
|
301
|
+
Additionally, pinned queries have a maximum limit of 100 pinned hits.
|
|
302
|
+
If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.</p>
|
|
303
|
+
|
|
283
304
|
|
|
284
305
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-rule.html>`_
|
|
285
306
|
|
|
@@ -357,14 +378,16 @@ class QueryRulesClient(NamespacedClient):
|
|
|
357
378
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
358
379
|
) -> ObjectApiResponse[t.Any]:
|
|
359
380
|
"""
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
381
|
+
.. raw:: html
|
|
382
|
+
|
|
383
|
+
<p>Create or update a query ruleset.
|
|
384
|
+
There is a limit of 100 rules per ruleset.
|
|
385
|
+
This limit can be increased by using the <code>xpack.applications.rules.max_rules_per_ruleset</code> cluster setting.</p>
|
|
386
|
+
<p>IMPORTANT: Due to limitations within pinned queries, you can only select documents using <code>ids</code> or <code>docs</code>, but cannot use both in single rule.
|
|
387
|
+
It is advised to use one or the other in query rulesets, to avoid errors.
|
|
388
|
+
Additionally, pinned queries have a maximum limit of 100 pinned hits.
|
|
389
|
+
If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.</p>
|
|
390
|
+
|
|
368
391
|
|
|
369
392
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-query-ruleset.html>`_
|
|
370
393
|
|
|
@@ -417,8 +440,11 @@ class QueryRulesClient(NamespacedClient):
|
|
|
417
440
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
418
441
|
) -> ObjectApiResponse[t.Any]:
|
|
419
442
|
"""
|
|
420
|
-
|
|
421
|
-
|
|
443
|
+
.. raw:: html
|
|
444
|
+
|
|
445
|
+
<p>Test a query ruleset.
|
|
446
|
+
Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.</p>
|
|
447
|
+
|
|
422
448
|
|
|
423
449
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/test-query-ruleset.html>`_
|
|
424
450
|
|
|
@@ -43,20 +43,29 @@ class RollupClient(NamespacedClient):
|
|
|
43
43
|
pretty: t.Optional[bool] = None,
|
|
44
44
|
) -> ObjectApiResponse[t.Any]:
|
|
45
45
|
"""
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
.. raw:: html
|
|
47
|
+
|
|
48
|
+
<p>Delete a rollup job.</p>
|
|
49
|
+
<p>A job must be stopped before it can be deleted.
|
|
50
|
+
If you attempt to delete a started job, an error occurs.
|
|
51
|
+
Similarly, if you attempt to delete a nonexistent job, an exception occurs.</p>
|
|
52
|
+
<p>IMPORTANT: When you delete a job, you remove only the process that is actively monitoring and rolling up data.
|
|
53
|
+
The API does not delete any previously rolled up data.
|
|
54
|
+
This is by design; a user may wish to roll up a static data set.
|
|
55
|
+
Because the data set is static, after it has been fully rolled up there is no need to keep the indexing rollup job around (as there will be no new data).
|
|
56
|
+
Thus the job can be deleted, leaving behind the rolled up data for analysis.
|
|
57
|
+
If you wish to also remove the rollup data and the rollup index contains the data for only a single job, you can delete the whole rollup index.
|
|
58
|
+
If the rollup index stores data from several jobs, you must issue a delete-by-query that targets the rollup job's identifier in the rollup index. For example:</p>
|
|
59
|
+
<pre><code>POST my_rollup_index/_delete_by_query
|
|
60
|
+
{
|
|
61
|
+
"query": {
|
|
62
|
+
"term": {
|
|
63
|
+
"_rollup.id": "the_rollup_job_id"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</code></pre>
|
|
68
|
+
|
|
60
69
|
|
|
61
70
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-delete-job.html>`_
|
|
62
71
|
|
|
@@ -97,11 +106,14 @@ class RollupClient(NamespacedClient):
|
|
|
97
106
|
pretty: t.Optional[bool] = None,
|
|
98
107
|
) -> ObjectApiResponse[t.Any]:
|
|
99
108
|
"""
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
.. raw:: html
|
|
110
|
+
|
|
111
|
+
<p>Get rollup job information.
|
|
112
|
+
Get the configuration, stats, and status of rollup jobs.</p>
|
|
113
|
+
<p>NOTE: This API returns only active (both <code>STARTED</code> and <code>STOPPED</code>) jobs.
|
|
114
|
+
If a job was created, ran for a while, then was deleted, the API does not return any details about it.
|
|
115
|
+
For details about a historical rollup job, the rollup capabilities API may be more useful.</p>
|
|
116
|
+
|
|
105
117
|
|
|
106
118
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-job.html>`_
|
|
107
119
|
|
|
@@ -146,15 +158,18 @@ class RollupClient(NamespacedClient):
|
|
|
146
158
|
pretty: t.Optional[bool] = None,
|
|
147
159
|
) -> ObjectApiResponse[t.Any]:
|
|
148
160
|
"""
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
.. raw:: html
|
|
162
|
+
|
|
163
|
+
<p>Get the rollup job capabilities.
|
|
164
|
+
Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.</p>
|
|
165
|
+
<p>This API is useful because a rollup job is often configured to rollup only a subset of fields from the source index.
|
|
166
|
+
Furthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.
|
|
167
|
+
This API enables you to inspect an index and determine:</p>
|
|
168
|
+
<ol>
|
|
169
|
+
<li>Does this index have associated rollup data somewhere in the cluster?</li>
|
|
170
|
+
<li>If yes to the first question, what fields were rolled up, what aggregations can be performed, and where does the data live?</li>
|
|
171
|
+
</ol>
|
|
172
|
+
|
|
158
173
|
|
|
159
174
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-rollup-caps.html>`_
|
|
160
175
|
|
|
@@ -199,12 +214,16 @@ class RollupClient(NamespacedClient):
|
|
|
199
214
|
pretty: t.Optional[bool] = None,
|
|
200
215
|
) -> ObjectApiResponse[t.Any]:
|
|
201
216
|
"""
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
217
|
+
.. raw:: html
|
|
218
|
+
|
|
219
|
+
<p>Get the rollup index capabilities.
|
|
220
|
+
Get the rollup capabilities of all jobs inside of a rollup index.
|
|
221
|
+
A single rollup index may store the data for multiple rollup jobs and may have a variety of capabilities depending on those jobs. This API enables you to determine:</p>
|
|
222
|
+
<ul>
|
|
223
|
+
<li>What jobs are stored in an index (or indices specified via a pattern)?</li>
|
|
224
|
+
<li>What target indices were rolled up, what fields were used in those rollups, and what aggregations can be performed on each job?</li>
|
|
225
|
+
</ul>
|
|
226
|
+
|
|
208
227
|
|
|
209
228
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-get-rollup-index-caps.html>`_
|
|
210
229
|
|
|
@@ -267,16 +286,14 @@ class RollupClient(NamespacedClient):
|
|
|
267
286
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
268
287
|
) -> ObjectApiResponse[t.Any]:
|
|
269
288
|
"""
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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.
|
|
289
|
+
.. raw:: html
|
|
290
|
+
|
|
291
|
+
<p>Create a rollup job.</p>
|
|
292
|
+
<p>WARNING: From 8.15.0, calling this API in a cluster with no rollup usage will fail with a message about the deprecation and planned removal of rollup features. A cluster needs to contain either a rollup job or a rollup index in order for this API to be allowed to run.</p>
|
|
293
|
+
<p>The rollup job configuration contains all the details about how the job should run, when it indexes documents, and what future queries will be able to run against the rollup index.</p>
|
|
294
|
+
<p>There are three main sections to the job configuration: the logistical details about the job (for example, the cron schedule), the fields that are used for grouping, and what metrics to collect for each group.</p>
|
|
295
|
+
<p>Jobs are created in a <code>STOPPED</code> state. You can start them with the start rollup jobs API.</p>
|
|
296
|
+
|
|
280
297
|
|
|
281
298
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-put-job.html>`_
|
|
282
299
|
|
|
@@ -393,25 +410,38 @@ class RollupClient(NamespacedClient):
|
|
|
393
410
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
394
411
|
) -> ObjectApiResponse[t.Any]:
|
|
395
412
|
"""
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
413
|
+
.. raw:: html
|
|
414
|
+
|
|
415
|
+
<p>Search rolled-up data.
|
|
416
|
+
The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.
|
|
417
|
+
It rewrites standard Query DSL into a format that matches the rollup documents then takes the response and rewrites it back to what a client would expect given the original query.</p>
|
|
418
|
+
<p>The request body supports a subset of features from the regular search API.
|
|
419
|
+
The following functionality is not available:</p>
|
|
420
|
+
<p><code>size</code>: Because rollups work on pre-aggregated data, no search hits can be returned and so size must be set to zero or omitted entirely.
|
|
421
|
+
<code>highlighter</code>, <code>suggestors</code>, <code>post_filter</code>, <code>profile</code>, <code>explain</code>: These are similarly disallowed.</p>
|
|
422
|
+
<p><strong>Searching both historical rollup and non-rollup data</strong></p>
|
|
423
|
+
<p>The rollup search API has the capability to search across both "live" non-rollup data and the aggregated rollup data.
|
|
424
|
+
This is done by simply adding the live indices to the URI. For example:</p>
|
|
425
|
+
<pre><code>GET sensor-1,sensor_rollup/_rollup_search
|
|
426
|
+
{
|
|
427
|
+
"size": 0,
|
|
428
|
+
"aggregations": {
|
|
429
|
+
"max_temperature": {
|
|
430
|
+
"max": {
|
|
431
|
+
"field": "temperature"
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
</code></pre>
|
|
437
|
+
<p>The rollup search endpoint does two things when the search runs:</p>
|
|
438
|
+
<ul>
|
|
439
|
+
<li>The original request is sent to the non-rollup index unaltered.</li>
|
|
440
|
+
<li>A rewritten version of the original request is sent to the rollup index.</li>
|
|
441
|
+
</ul>
|
|
442
|
+
<p>When the two responses are received, the endpoint rewrites the rollup response and merges the two together.
|
|
443
|
+
During the merging process, if there is any overlap in buckets between the two responses, the buckets from the non-rollup index are used.</p>
|
|
444
|
+
|
|
415
445
|
|
|
416
446
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-search.html>`_
|
|
417
447
|
|
|
@@ -484,8 +514,12 @@ class RollupClient(NamespacedClient):
|
|
|
484
514
|
pretty: t.Optional[bool] = None,
|
|
485
515
|
) -> ObjectApiResponse[t.Any]:
|
|
486
516
|
"""
|
|
487
|
-
|
|
488
|
-
|
|
517
|
+
.. raw:: html
|
|
518
|
+
|
|
519
|
+
<p>Start rollup jobs.
|
|
520
|
+
If you try to start a job that does not exist, an exception occurs.
|
|
521
|
+
If you try to start a job that is already started, nothing happens.</p>
|
|
522
|
+
|
|
489
523
|
|
|
490
524
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-start-job.html>`_
|
|
491
525
|
|
|
@@ -528,14 +562,18 @@ class RollupClient(NamespacedClient):
|
|
|
528
562
|
wait_for_completion: t.Optional[bool] = None,
|
|
529
563
|
) -> ObjectApiResponse[t.Any]:
|
|
530
564
|
"""
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
565
|
+
.. raw:: html
|
|
566
|
+
|
|
567
|
+
<p>Stop rollup jobs.
|
|
568
|
+
If you try to stop a job that does not exist, an exception occurs.
|
|
569
|
+
If you try to stop a job that is already stopped, nothing happens.</p>
|
|
570
|
+
<p>Since only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.
|
|
571
|
+
This is accomplished with the <code>wait_for_completion</code> query parameter, and optionally a timeout. For example:</p>
|
|
572
|
+
<pre><code>POST _rollup/job/sensor/_stop?wait_for_completion=true&timeout=10s
|
|
573
|
+
</code></pre>
|
|
574
|
+
<p>The parameter blocks the API call from returning until either the job has moved to STOPPED or the specified time has elapsed.
|
|
575
|
+
If the specified time elapses without the job moving to STOPPED, a timeout exception occurs.</p>
|
|
576
|
+
|
|
539
577
|
|
|
540
578
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/rollup-stop-job.html>`_
|
|
541
579
|
|