elasticsearch9 9.2.0__py3-none-any.whl → 9.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch9/_async/client/__init__.py +108 -85
- elasticsearch9/_async/client/async_search.py +7 -6
- elasticsearch9/_async/client/autoscaling.py +15 -4
- elasticsearch9/_async/client/cat.py +203 -10
- elasticsearch9/_async/client/ccr.py +10 -10
- elasticsearch9/_async/client/cluster.py +98 -66
- elasticsearch9/_async/client/connector.py +42 -41
- elasticsearch9/_async/client/dangling_indices.py +8 -12
- elasticsearch9/_async/client/enrich.py +10 -10
- elasticsearch9/_async/client/eql.py +17 -16
- elasticsearch9/_async/client/esql.py +173 -24
- elasticsearch9/_async/client/features.py +6 -6
- elasticsearch9/_async/client/fleet.py +8 -8
- elasticsearch9/_async/client/graph.py +3 -3
- elasticsearch9/_async/client/ilm.py +18 -18
- elasticsearch9/_async/client/indices.py +564 -149
- elasticsearch9/_async/client/inference.py +374 -64
- elasticsearch9/_async/client/ingest.py +9 -9
- elasticsearch9/_async/client/license.py +5 -7
- elasticsearch9/_async/client/logstash.py +4 -4
- elasticsearch9/_async/client/migration.py +6 -6
- elasticsearch9/_async/client/ml.py +132 -88
- elasticsearch9/_async/client/monitoring.py +4 -3
- elasticsearch9/_async/client/nodes.py +182 -20
- elasticsearch9/_async/client/project.py +13 -4
- elasticsearch9/_async/client/query_rules.py +16 -16
- elasticsearch9/_async/client/rollup.py +21 -21
- elasticsearch9/_async/client/search_application.py +19 -19
- elasticsearch9/_async/client/searchable_snapshots.py +10 -10
- elasticsearch9/_async/client/security.py +34 -10
- elasticsearch9/_async/client/shutdown.py +15 -4
- elasticsearch9/_async/client/simulate.py +4 -4
- elasticsearch9/_async/client/slm.py +17 -17
- elasticsearch9/_async/client/snapshot.py +21 -21
- elasticsearch9/_async/client/sql.py +17 -16
- elasticsearch9/_async/client/streams.py +6 -7
- elasticsearch9/_async/client/synonyms.py +10 -10
- elasticsearch9/_async/client/tasks.py +8 -8
- elasticsearch9/_async/client/text_structure.py +16 -12
- elasticsearch9/_async/client/transform.py +51 -12
- elasticsearch9/_async/client/utils.py +4 -2
- elasticsearch9/_async/client/watcher.py +26 -26
- elasticsearch9/_async/client/xpack.py +6 -5
- elasticsearch9/_sync/client/__init__.py +110 -85
- elasticsearch9/_sync/client/async_search.py +7 -6
- elasticsearch9/_sync/client/autoscaling.py +15 -4
- elasticsearch9/_sync/client/cat.py +203 -10
- elasticsearch9/_sync/client/ccr.py +10 -10
- elasticsearch9/_sync/client/cluster.py +98 -66
- elasticsearch9/_sync/client/connector.py +42 -41
- elasticsearch9/_sync/client/dangling_indices.py +8 -12
- elasticsearch9/_sync/client/enrich.py +10 -10
- elasticsearch9/_sync/client/eql.py +17 -16
- elasticsearch9/_sync/client/esql.py +173 -24
- elasticsearch9/_sync/client/features.py +6 -6
- elasticsearch9/_sync/client/fleet.py +8 -8
- elasticsearch9/_sync/client/graph.py +3 -3
- elasticsearch9/_sync/client/ilm.py +18 -18
- elasticsearch9/_sync/client/indices.py +564 -149
- elasticsearch9/_sync/client/inference.py +374 -64
- elasticsearch9/_sync/client/ingest.py +9 -9
- elasticsearch9/_sync/client/license.py +5 -7
- elasticsearch9/_sync/client/logstash.py +4 -4
- elasticsearch9/_sync/client/migration.py +6 -6
- elasticsearch9/_sync/client/ml.py +132 -88
- elasticsearch9/_sync/client/monitoring.py +4 -3
- elasticsearch9/_sync/client/nodes.py +182 -20
- elasticsearch9/_sync/client/project.py +13 -4
- elasticsearch9/_sync/client/project_routing.py +264 -0
- elasticsearch9/_sync/client/query_rules.py +16 -16
- elasticsearch9/_sync/client/rollup.py +21 -21
- elasticsearch9/_sync/client/search_application.py +19 -19
- elasticsearch9/_sync/client/searchable_snapshots.py +10 -10
- elasticsearch9/_sync/client/security.py +34 -10
- elasticsearch9/_sync/client/shutdown.py +15 -4
- elasticsearch9/_sync/client/simulate.py +4 -4
- elasticsearch9/_sync/client/slm.py +17 -17
- elasticsearch9/_sync/client/snapshot.py +21 -21
- elasticsearch9/_sync/client/sql.py +17 -16
- elasticsearch9/_sync/client/streams.py +6 -7
- elasticsearch9/_sync/client/synonyms.py +10 -10
- elasticsearch9/_sync/client/tasks.py +8 -8
- elasticsearch9/_sync/client/text_structure.py +16 -12
- elasticsearch9/_sync/client/transform.py +51 -12
- elasticsearch9/_sync/client/utils.py +16 -2
- elasticsearch9/_sync/client/watcher.py +26 -26
- elasticsearch9/_sync/client/xpack.py +6 -5
- elasticsearch9/_version.py +2 -2
- elasticsearch9/dsl/__init__.py +4 -0
- elasticsearch9/dsl/_async/document.py +4 -5
- elasticsearch9/dsl/_async/index.py +1 -1
- elasticsearch9/dsl/_async/search.py +2 -3
- elasticsearch9/dsl/_sync/document.py +4 -5
- elasticsearch9/dsl/_sync/index.py +1 -1
- elasticsearch9/dsl/_sync/search.py +2 -3
- elasticsearch9/dsl/aggs.py +9 -9
- elasticsearch9/dsl/async_connections.py +1 -2
- elasticsearch9/dsl/connections.py +1 -2
- elasticsearch9/dsl/document_base.py +1 -1
- elasticsearch9/dsl/field.py +90 -6
- elasticsearch9/dsl/pydantic.py +1 -1
- elasticsearch9/dsl/query.py +25 -2
- elasticsearch9/dsl/response/__init__.py +2 -0
- elasticsearch9/dsl/serializer.py +1 -2
- elasticsearch9/dsl/types.py +63 -8
- elasticsearch9/dsl/utils.py +12 -4
- elasticsearch9/esql/esql.py +1 -1
- elasticsearch9/esql/functions.py +926 -252
- elasticsearch9/helpers/__init__.py +2 -0
- elasticsearch9/helpers/actions.py +21 -0
- elasticsearch9/helpers/vectorstore/__init__.py +7 -7
- elasticsearch9/helpers/vectorstore/_async/_utils.py +1 -1
- elasticsearch9/helpers/vectorstore/_async/embedding_service.py +2 -2
- elasticsearch9/helpers/vectorstore/_async/strategies.py +3 -3
- elasticsearch9/helpers/vectorstore/_async/vectorstore.py +8 -5
- elasticsearch9/helpers/vectorstore/_sync/_utils.py +1 -1
- elasticsearch9/helpers/vectorstore/_sync/embedding_service.py +2 -2
- elasticsearch9/helpers/vectorstore/_sync/strategies.py +3 -3
- elasticsearch9/helpers/vectorstore/_sync/vectorstore.py +8 -5
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.3.0.dist-info}/METADATA +2 -1
- elasticsearch9-9.3.0.dist-info/RECORD +169 -0
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.3.0.dist-info}/WHEEL +1 -1
- elasticsearch9-9.2.0.dist-info/RECORD +0 -168
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.3.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.3.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -23,16 +23,16 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class NodesClient(NamespacedClient):
|
|
33
33
|
|
|
34
34
|
@_rewrite_parameters()
|
|
35
|
-
@
|
|
35
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
36
36
|
async def clear_repositories_metering_archive(
|
|
37
37
|
self,
|
|
38
38
|
*,
|
|
@@ -46,8 +46,8 @@ class NodesClient(NamespacedClient):
|
|
|
46
46
|
"""
|
|
47
47
|
.. raw:: html
|
|
48
48
|
|
|
49
|
-
<p>Clear the archived repositories metering
|
|
50
|
-
Clear the archived repositories metering information in the cluster.</p>
|
|
49
|
+
<p>Clear the archived repositories metering.</p>
|
|
50
|
+
<p>Clear the archived repositories metering information in the cluster.</p>
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive>`_
|
|
@@ -86,7 +86,7 @@ class NodesClient(NamespacedClient):
|
|
|
86
86
|
)
|
|
87
87
|
|
|
88
88
|
@_rewrite_parameters()
|
|
89
|
-
@
|
|
89
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
90
90
|
async def get_repositories_metering_info(
|
|
91
91
|
self,
|
|
92
92
|
*,
|
|
@@ -99,8 +99,8 @@ class NodesClient(NamespacedClient):
|
|
|
99
99
|
"""
|
|
100
100
|
.. raw:: html
|
|
101
101
|
|
|
102
|
-
<p>Get cluster repositories metering
|
|
103
|
-
Get repositories metering information for a cluster.
|
|
102
|
+
<p>Get cluster repositories metering.</p>
|
|
103
|
+
<p>Get repositories metering information for a cluster.
|
|
104
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
105
|
Additionally, the information exposed by this API is volatile, meaning that it will not be present after node restarts.</p>
|
|
106
106
|
|
|
@@ -157,8 +157,8 @@ class NodesClient(NamespacedClient):
|
|
|
157
157
|
"""
|
|
158
158
|
.. raw:: html
|
|
159
159
|
|
|
160
|
-
<p>Get the hot threads for nodes
|
|
161
|
-
Get a breakdown of the hot threads on each selected node in the cluster.
|
|
160
|
+
<p>Get the hot threads for nodes.</p>
|
|
161
|
+
<p>Get a breakdown of the hot threads on each selected node in the cluster.
|
|
162
162
|
The output is plain text with a breakdown of the top hot threads for each node.</p>
|
|
163
163
|
|
|
164
164
|
|
|
@@ -169,7 +169,7 @@ class NodesClient(NamespacedClient):
|
|
|
169
169
|
select, or to get a task from an empty queue) are filtered out.
|
|
170
170
|
:param interval: The interval to do the second sampling of threads.
|
|
171
171
|
:param snapshots: Number of samples of thread stacktrace.
|
|
172
|
-
:param sort: The sort order for 'cpu' type
|
|
172
|
+
:param sort: The sort order for 'cpu' type
|
|
173
173
|
:param threads: Specifies the number of hot threads to provide information for.
|
|
174
174
|
:param timeout: Period to wait for a response. If no response is received before
|
|
175
175
|
the timeout expires, the request fails and returns an error.
|
|
@@ -220,7 +220,50 @@ class NodesClient(NamespacedClient):
|
|
|
220
220
|
self,
|
|
221
221
|
*,
|
|
222
222
|
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
223
|
-
metric: t.Optional[
|
|
223
|
+
metric: t.Optional[
|
|
224
|
+
t.Union[
|
|
225
|
+
t.Sequence[
|
|
226
|
+
t.Union[
|
|
227
|
+
str,
|
|
228
|
+
t.Literal[
|
|
229
|
+
"_all",
|
|
230
|
+
"_none",
|
|
231
|
+
"aggregations",
|
|
232
|
+
"http",
|
|
233
|
+
"indices",
|
|
234
|
+
"ingest",
|
|
235
|
+
"jvm",
|
|
236
|
+
"os",
|
|
237
|
+
"plugins",
|
|
238
|
+
"process",
|
|
239
|
+
"remote_cluster_server",
|
|
240
|
+
"settings",
|
|
241
|
+
"thread_pool",
|
|
242
|
+
"transport",
|
|
243
|
+
],
|
|
244
|
+
]
|
|
245
|
+
],
|
|
246
|
+
t.Union[
|
|
247
|
+
str,
|
|
248
|
+
t.Literal[
|
|
249
|
+
"_all",
|
|
250
|
+
"_none",
|
|
251
|
+
"aggregations",
|
|
252
|
+
"http",
|
|
253
|
+
"indices",
|
|
254
|
+
"ingest",
|
|
255
|
+
"jvm",
|
|
256
|
+
"os",
|
|
257
|
+
"plugins",
|
|
258
|
+
"process",
|
|
259
|
+
"remote_cluster_server",
|
|
260
|
+
"settings",
|
|
261
|
+
"thread_pool",
|
|
262
|
+
"transport",
|
|
263
|
+
],
|
|
264
|
+
],
|
|
265
|
+
]
|
|
266
|
+
] = None,
|
|
224
267
|
error_trace: t.Optional[bool] = None,
|
|
225
268
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
226
269
|
flat_settings: t.Optional[bool] = None,
|
|
@@ -357,8 +400,120 @@ class NodesClient(NamespacedClient):
|
|
|
357
400
|
self,
|
|
358
401
|
*,
|
|
359
402
|
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
360
|
-
metric: t.Optional[
|
|
361
|
-
|
|
403
|
+
metric: t.Optional[
|
|
404
|
+
t.Union[
|
|
405
|
+
t.Sequence[
|
|
406
|
+
t.Union[
|
|
407
|
+
str,
|
|
408
|
+
t.Literal[
|
|
409
|
+
"_all",
|
|
410
|
+
"_none",
|
|
411
|
+
"adaptive_selection",
|
|
412
|
+
"allocations",
|
|
413
|
+
"breaker",
|
|
414
|
+
"discovery",
|
|
415
|
+
"fs",
|
|
416
|
+
"http",
|
|
417
|
+
"indexing_pressure",
|
|
418
|
+
"indices",
|
|
419
|
+
"ingest",
|
|
420
|
+
"jvm",
|
|
421
|
+
"os",
|
|
422
|
+
"process",
|
|
423
|
+
"repositories",
|
|
424
|
+
"script",
|
|
425
|
+
"script_cache",
|
|
426
|
+
"thread_pool",
|
|
427
|
+
"transport",
|
|
428
|
+
],
|
|
429
|
+
]
|
|
430
|
+
],
|
|
431
|
+
t.Union[
|
|
432
|
+
str,
|
|
433
|
+
t.Literal[
|
|
434
|
+
"_all",
|
|
435
|
+
"_none",
|
|
436
|
+
"adaptive_selection",
|
|
437
|
+
"allocations",
|
|
438
|
+
"breaker",
|
|
439
|
+
"discovery",
|
|
440
|
+
"fs",
|
|
441
|
+
"http",
|
|
442
|
+
"indexing_pressure",
|
|
443
|
+
"indices",
|
|
444
|
+
"ingest",
|
|
445
|
+
"jvm",
|
|
446
|
+
"os",
|
|
447
|
+
"process",
|
|
448
|
+
"repositories",
|
|
449
|
+
"script",
|
|
450
|
+
"script_cache",
|
|
451
|
+
"thread_pool",
|
|
452
|
+
"transport",
|
|
453
|
+
],
|
|
454
|
+
],
|
|
455
|
+
]
|
|
456
|
+
] = None,
|
|
457
|
+
index_metric: t.Optional[
|
|
458
|
+
t.Union[
|
|
459
|
+
t.Sequence[
|
|
460
|
+
t.Union[
|
|
461
|
+
str,
|
|
462
|
+
t.Literal[
|
|
463
|
+
"_all",
|
|
464
|
+
"bulk",
|
|
465
|
+
"completion",
|
|
466
|
+
"dense_vector",
|
|
467
|
+
"docs",
|
|
468
|
+
"fielddata",
|
|
469
|
+
"flush",
|
|
470
|
+
"get",
|
|
471
|
+
"indexing",
|
|
472
|
+
"mappings",
|
|
473
|
+
"merge",
|
|
474
|
+
"query_cache",
|
|
475
|
+
"recovery",
|
|
476
|
+
"refresh",
|
|
477
|
+
"request_cache",
|
|
478
|
+
"search",
|
|
479
|
+
"segments",
|
|
480
|
+
"shard_stats",
|
|
481
|
+
"sparse_vector",
|
|
482
|
+
"store",
|
|
483
|
+
"translog",
|
|
484
|
+
"warmer",
|
|
485
|
+
],
|
|
486
|
+
]
|
|
487
|
+
],
|
|
488
|
+
t.Union[
|
|
489
|
+
str,
|
|
490
|
+
t.Literal[
|
|
491
|
+
"_all",
|
|
492
|
+
"bulk",
|
|
493
|
+
"completion",
|
|
494
|
+
"dense_vector",
|
|
495
|
+
"docs",
|
|
496
|
+
"fielddata",
|
|
497
|
+
"flush",
|
|
498
|
+
"get",
|
|
499
|
+
"indexing",
|
|
500
|
+
"mappings",
|
|
501
|
+
"merge",
|
|
502
|
+
"query_cache",
|
|
503
|
+
"recovery",
|
|
504
|
+
"refresh",
|
|
505
|
+
"request_cache",
|
|
506
|
+
"search",
|
|
507
|
+
"segments",
|
|
508
|
+
"shard_stats",
|
|
509
|
+
"sparse_vector",
|
|
510
|
+
"store",
|
|
511
|
+
"translog",
|
|
512
|
+
"warmer",
|
|
513
|
+
],
|
|
514
|
+
],
|
|
515
|
+
]
|
|
516
|
+
] = None,
|
|
362
517
|
completion_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
363
518
|
error_trace: t.Optional[bool] = None,
|
|
364
519
|
fielddata_fields: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
@@ -376,8 +531,8 @@ class NodesClient(NamespacedClient):
|
|
|
376
531
|
"""
|
|
377
532
|
.. raw:: html
|
|
378
533
|
|
|
379
|
-
<p>Get node statistics
|
|
380
|
-
Get statistics for nodes in a cluster.
|
|
534
|
+
<p>Get node statistics.</p>
|
|
535
|
+
<p>Get statistics for nodes in a cluster.
|
|
381
536
|
By default, all stats are returned. You can limit the returned information by using metrics.</p>
|
|
382
537
|
|
|
383
538
|
|
|
@@ -385,7 +540,7 @@ class NodesClient(NamespacedClient):
|
|
|
385
540
|
|
|
386
541
|
:param node_id: Comma-separated list of node IDs or names used to limit returned
|
|
387
542
|
information.
|
|
388
|
-
:param metric:
|
|
543
|
+
:param metric: Limits the information returned to the specific metrics.
|
|
389
544
|
:param index_metric: Limit the information returned for indices metric to the
|
|
390
545
|
specific index metrics. It can be used only if indices (or all) metric is
|
|
391
546
|
specified.
|
|
@@ -483,7 +638,14 @@ class NodesClient(NamespacedClient):
|
|
|
483
638
|
self,
|
|
484
639
|
*,
|
|
485
640
|
node_id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
486
|
-
metric: t.Optional[
|
|
641
|
+
metric: t.Optional[
|
|
642
|
+
t.Union[
|
|
643
|
+
t.Sequence[
|
|
644
|
+
t.Union[str, t.Literal["_all", "aggregations", "rest_actions"]]
|
|
645
|
+
],
|
|
646
|
+
t.Union[str, t.Literal["_all", "aggregations", "rest_actions"]],
|
|
647
|
+
]
|
|
648
|
+
] = None,
|
|
487
649
|
error_trace: t.Optional[bool] = None,
|
|
488
650
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
489
651
|
human: t.Optional[bool] = None,
|
|
@@ -499,10 +661,10 @@ class NodesClient(NamespacedClient):
|
|
|
499
661
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage>`_
|
|
500
662
|
|
|
501
663
|
:param node_id: A comma-separated list of node IDs or names to limit the returned
|
|
502
|
-
information
|
|
503
|
-
to, leave empty to get information from all nodes
|
|
664
|
+
information. Use `_local` to return information from the node you're connecting
|
|
665
|
+
to, leave empty to get information from all nodes.
|
|
504
666
|
:param metric: Limits the information returned to the specific metrics. A comma-separated
|
|
505
|
-
list of the following options: `_all`, `rest_actions`.
|
|
667
|
+
list of the following options: `_all`, `rest_actions`, `aggregations`.
|
|
506
668
|
:param timeout: Period to wait for a response. If no response is received before
|
|
507
669
|
the timeout expires, the request fails and returns an error.
|
|
508
670
|
"""
|
|
@@ -22,15 +22,15 @@ from elastic_transport import ObjectApiResponse
|
|
|
22
22
|
from ._base import NamespacedClient
|
|
23
23
|
from .utils import (
|
|
24
24
|
Stability,
|
|
25
|
+
_availability_warning,
|
|
25
26
|
_rewrite_parameters,
|
|
26
|
-
_stability_warning,
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class ProjectClient(NamespacedClient):
|
|
31
31
|
|
|
32
32
|
@_rewrite_parameters()
|
|
33
|
-
@
|
|
33
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
34
34
|
async def tags(
|
|
35
35
|
self,
|
|
36
36
|
*,
|
|
@@ -38,12 +38,19 @@ class ProjectClient(NamespacedClient):
|
|
|
38
38
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
39
39
|
human: t.Optional[bool] = None,
|
|
40
40
|
pretty: t.Optional[bool] = None,
|
|
41
|
+
project_routing: t.Optional[str] = None,
|
|
41
42
|
) -> ObjectApiResponse[t.Any]:
|
|
42
43
|
"""
|
|
43
44
|
.. raw:: html
|
|
44
45
|
|
|
45
|
-
<p>
|
|
46
|
+
<p>Get tags.</p>
|
|
47
|
+
<p>Get the tags that are defined for the project.</p>
|
|
46
48
|
|
|
49
|
+
|
|
50
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch-serverless/operation/operation-project-tags>`_
|
|
51
|
+
|
|
52
|
+
:param project_routing: A Lucene query using project metadata tags used to filter
|
|
53
|
+
which projects are returned in the response, such as _alias:_origin or _alias:*pr*.
|
|
47
54
|
"""
|
|
48
55
|
__path_parts: t.Dict[str, str] = {}
|
|
49
56
|
__path = "/_project/tags"
|
|
@@ -56,9 +63,11 @@ class ProjectClient(NamespacedClient):
|
|
|
56
63
|
__query["human"] = human
|
|
57
64
|
if pretty is not None:
|
|
58
65
|
__query["pretty"] = pretty
|
|
66
|
+
if project_routing is not None:
|
|
67
|
+
__query["project_routing"] = project_routing
|
|
59
68
|
__headers = {"accept": "application/json"}
|
|
60
69
|
return await self.perform_request( # type: ignore[return-value]
|
|
61
|
-
"
|
|
70
|
+
"POST",
|
|
62
71
|
__path,
|
|
63
72
|
params=__query,
|
|
64
73
|
headers=__headers,
|
|
@@ -39,8 +39,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
39
39
|
"""
|
|
40
40
|
.. raw:: html
|
|
41
41
|
|
|
42
|
-
<p>Delete a query rule
|
|
43
|
-
Delete a query rule within a query ruleset.
|
|
42
|
+
<p>Delete a query rule.</p>
|
|
43
|
+
<p>Delete a query rule within a query ruleset.
|
|
44
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
45
|
|
|
46
46
|
|
|
@@ -92,8 +92,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
92
92
|
"""
|
|
93
93
|
.. raw:: html
|
|
94
94
|
|
|
95
|
-
<p>Delete a query ruleset
|
|
96
|
-
Remove a query ruleset and its associated data.
|
|
95
|
+
<p>Delete a query ruleset.</p>
|
|
96
|
+
<p>Remove a query ruleset and its associated data.
|
|
97
97
|
This is a destructive action that is not recoverable.</p>
|
|
98
98
|
|
|
99
99
|
|
|
@@ -138,8 +138,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
138
138
|
"""
|
|
139
139
|
.. raw:: html
|
|
140
140
|
|
|
141
|
-
<p>Get a query rule
|
|
142
|
-
Get details about a query rule within a query ruleset.</p>
|
|
141
|
+
<p>Get a query rule.</p>
|
|
142
|
+
<p>Get details about a query rule within a query ruleset.</p>
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule>`_
|
|
@@ -190,8 +190,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
190
190
|
"""
|
|
191
191
|
.. raw:: html
|
|
192
192
|
|
|
193
|
-
<p>Get a query ruleset
|
|
194
|
-
Get details about a query ruleset.</p>
|
|
193
|
+
<p>Get a query ruleset.</p>
|
|
194
|
+
<p>Get details about a query ruleset.</p>
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset>`_
|
|
@@ -237,8 +237,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
237
237
|
"""
|
|
238
238
|
.. raw:: html
|
|
239
239
|
|
|
240
|
-
<p>Get all query rulesets
|
|
241
|
-
Get summarized information about the query rulesets.</p>
|
|
240
|
+
<p>Get all query rulesets.</p>
|
|
241
|
+
<p>Get summarized information about the query rulesets.</p>
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets>`_
|
|
@@ -294,8 +294,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
294
294
|
"""
|
|
295
295
|
.. raw:: html
|
|
296
296
|
|
|
297
|
-
<p>Create or update a query rule
|
|
298
|
-
Create or update a query rule within a query ruleset.</p>
|
|
297
|
+
<p>Create or update a query rule.</p>
|
|
298
|
+
<p>Create or update a query rule within a query ruleset.</p>
|
|
299
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
300
|
It is advised to use one or the other in query rulesets, to avoid errors.
|
|
301
301
|
Additionally, pinned queries have a maximum limit of 100 pinned hits.
|
|
@@ -380,8 +380,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
380
380
|
"""
|
|
381
381
|
.. raw:: html
|
|
382
382
|
|
|
383
|
-
<p>Create or update a query ruleset
|
|
384
|
-
There is a limit of 100 rules per ruleset.
|
|
383
|
+
<p>Create or update a query ruleset.</p>
|
|
384
|
+
<p>There is a limit of 100 rules per ruleset.
|
|
385
385
|
This limit can be increased by using the <code>xpack.applications.rules.max_rules_per_ruleset</code> cluster setting.</p>
|
|
386
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
387
|
It is advised to use one or the other in query rulesets, to avoid errors.
|
|
@@ -442,8 +442,8 @@ class QueryRulesClient(NamespacedClient):
|
|
|
442
442
|
"""
|
|
443
443
|
.. raw:: html
|
|
444
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>
|
|
445
|
+
<p>Test a query ruleset.</p>
|
|
446
|
+
<p>Evaluate match criteria against a query ruleset to identify the rules that would match that criteria.</p>
|
|
447
447
|
|
|
448
448
|
|
|
449
449
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test>`_
|
|
@@ -23,16 +23,16 @@ from ._base import NamespacedClient
|
|
|
23
23
|
from .utils import (
|
|
24
24
|
SKIP_IN_PATH,
|
|
25
25
|
Stability,
|
|
26
|
+
_availability_warning,
|
|
26
27
|
_quote,
|
|
27
28
|
_rewrite_parameters,
|
|
28
|
-
_stability_warning,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class RollupClient(NamespacedClient):
|
|
33
33
|
|
|
34
34
|
@_rewrite_parameters()
|
|
35
|
-
@
|
|
35
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
36
36
|
async def delete_job(
|
|
37
37
|
self,
|
|
38
38
|
*,
|
|
@@ -95,7 +95,7 @@ class RollupClient(NamespacedClient):
|
|
|
95
95
|
)
|
|
96
96
|
|
|
97
97
|
@_rewrite_parameters()
|
|
98
|
-
@
|
|
98
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
99
99
|
async def get_jobs(
|
|
100
100
|
self,
|
|
101
101
|
*,
|
|
@@ -108,8 +108,8 @@ class RollupClient(NamespacedClient):
|
|
|
108
108
|
"""
|
|
109
109
|
.. raw:: html
|
|
110
110
|
|
|
111
|
-
<p>Get rollup job information
|
|
112
|
-
Get the configuration, stats, and status of rollup jobs.</p>
|
|
111
|
+
<p>Get rollup job information.</p>
|
|
112
|
+
<p>Get the configuration, stats, and status of rollup jobs.</p>
|
|
113
113
|
<p>NOTE: This API returns only active (both <code>STARTED</code> and <code>STOPPED</code>) jobs.
|
|
114
114
|
If a job was created, ran for a while, then was deleted, the API does not return any details about it.
|
|
115
115
|
For details about a historical rollup job, the rollup capabilities API may be more useful.</p>
|
|
@@ -147,7 +147,7 @@ class RollupClient(NamespacedClient):
|
|
|
147
147
|
)
|
|
148
148
|
|
|
149
149
|
@_rewrite_parameters()
|
|
150
|
-
@
|
|
150
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
151
151
|
async def get_rollup_caps(
|
|
152
152
|
self,
|
|
153
153
|
*,
|
|
@@ -160,8 +160,8 @@ class RollupClient(NamespacedClient):
|
|
|
160
160
|
"""
|
|
161
161
|
.. raw:: html
|
|
162
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>
|
|
163
|
+
<p>Get the rollup job capabilities.</p>
|
|
164
|
+
<p>Get the capabilities of any rollup jobs that have been configured for a specific index or index pattern.</p>
|
|
165
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
166
|
Furthermore, only certain aggregations can be configured for various fields, leading to a limited subset of functionality depending on that configuration.
|
|
167
167
|
This API enables you to inspect an index and determine:</p>
|
|
@@ -203,7 +203,7 @@ class RollupClient(NamespacedClient):
|
|
|
203
203
|
)
|
|
204
204
|
|
|
205
205
|
@_rewrite_parameters()
|
|
206
|
-
@
|
|
206
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
207
207
|
async def get_rollup_index_caps(
|
|
208
208
|
self,
|
|
209
209
|
*,
|
|
@@ -216,8 +216,8 @@ class RollupClient(NamespacedClient):
|
|
|
216
216
|
"""
|
|
217
217
|
.. raw:: html
|
|
218
218
|
|
|
219
|
-
<p>Get the rollup index capabilities
|
|
220
|
-
Get the rollup capabilities of all jobs inside of a rollup index.
|
|
219
|
+
<p>Get the rollup index capabilities.</p>
|
|
220
|
+
<p>Get the rollup capabilities of all jobs inside of a rollup index.
|
|
221
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
222
|
<ul>
|
|
223
223
|
<li>What jobs are stored in an index (or indices specified via a pattern)?</li>
|
|
@@ -266,7 +266,7 @@ class RollupClient(NamespacedClient):
|
|
|
266
266
|
),
|
|
267
267
|
ignore_deprecated_options={"headers"},
|
|
268
268
|
)
|
|
269
|
-
@
|
|
269
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
270
270
|
async def put_job(
|
|
271
271
|
self,
|
|
272
272
|
*,
|
|
@@ -392,7 +392,7 @@ class RollupClient(NamespacedClient):
|
|
|
392
392
|
@_rewrite_parameters(
|
|
393
393
|
body_fields=("aggregations", "aggs", "query", "size"),
|
|
394
394
|
)
|
|
395
|
-
@
|
|
395
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
396
396
|
async def rollup_search(
|
|
397
397
|
self,
|
|
398
398
|
*,
|
|
@@ -412,8 +412,8 @@ class RollupClient(NamespacedClient):
|
|
|
412
412
|
"""
|
|
413
413
|
.. raw:: html
|
|
414
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.
|
|
415
|
+
<p>Search rolled-up data.</p>
|
|
416
|
+
<p>The rollup search endpoint is needed because, internally, rolled-up documents utilize a different document structure than the original data.
|
|
417
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
418
|
<p>The request body supports a subset of features from the regular search API.
|
|
419
419
|
The following functionality is not available:</p>
|
|
@@ -482,7 +482,7 @@ class RollupClient(NamespacedClient):
|
|
|
482
482
|
)
|
|
483
483
|
|
|
484
484
|
@_rewrite_parameters()
|
|
485
|
-
@
|
|
485
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
486
486
|
async def start_job(
|
|
487
487
|
self,
|
|
488
488
|
*,
|
|
@@ -495,8 +495,8 @@ class RollupClient(NamespacedClient):
|
|
|
495
495
|
"""
|
|
496
496
|
.. raw:: html
|
|
497
497
|
|
|
498
|
-
<p>Start rollup jobs
|
|
499
|
-
If you try to start a job that does not exist, an exception occurs.
|
|
498
|
+
<p>Start rollup jobs.</p>
|
|
499
|
+
<p>If you try to start a job that does not exist, an exception occurs.
|
|
500
500
|
If you try to start a job that is already started, nothing happens.</p>
|
|
501
501
|
|
|
502
502
|
|
|
@@ -528,7 +528,7 @@ class RollupClient(NamespacedClient):
|
|
|
528
528
|
)
|
|
529
529
|
|
|
530
530
|
@_rewrite_parameters()
|
|
531
|
-
@
|
|
531
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
532
532
|
async def stop_job(
|
|
533
533
|
self,
|
|
534
534
|
*,
|
|
@@ -543,8 +543,8 @@ class RollupClient(NamespacedClient):
|
|
|
543
543
|
"""
|
|
544
544
|
.. raw:: html
|
|
545
545
|
|
|
546
|
-
<p>Stop rollup jobs
|
|
547
|
-
If you try to stop a job that does not exist, an exception occurs.
|
|
546
|
+
<p>Stop rollup jobs.</p>
|
|
547
|
+
<p>If you try to stop a job that does not exist, an exception occurs.
|
|
548
548
|
If you try to stop a job that is already stopped, nothing happens.</p>
|
|
549
549
|
<p>Since only a stopped job can be deleted, it can be useful to block the API until the indexer has fully stopped.
|
|
550
550
|
This is accomplished with the <code>wait_for_completion</code> query parameter, and optionally a timeout. For example:</p>
|