elasticsearch9 9.2.0__py3-none-any.whl → 9.2.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.
- elasticsearch9/_async/client/__init__.py +64 -45
- elasticsearch9/_async/client/async_search.py +3 -3
- elasticsearch9/_async/client/autoscaling.py +15 -4
- elasticsearch9/_async/client/cat.py +40 -2
- elasticsearch9/_async/client/ccr.py +10 -10
- elasticsearch9/_async/client/cluster.py +32 -32
- 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 +10 -10
- elasticsearch9/_async/client/esql.py +16 -16
- elasticsearch9/_async/client/features.py +6 -6
- elasticsearch9/_async/client/fleet.py +7 -7
- elasticsearch9/_async/client/graph.py +2 -2
- elasticsearch9/_async/client/ilm.py +18 -18
- elasticsearch9/_async/client/indices.py +131 -135
- elasticsearch9/_async/client/inference.py +76 -56
- 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 +125 -85
- elasticsearch9/_async/client/monitoring.py +4 -3
- elasticsearch9/_async/client/nodes.py +15 -15
- elasticsearch9/_async/client/project.py +4 -3
- 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 +8 -7
- 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 +20 -20
- elasticsearch9/_async/client/sql.py +10 -10
- elasticsearch9/_async/client/streams.py +6 -6
- elasticsearch9/_async/client/synonyms.py +10 -10
- elasticsearch9/_async/client/tasks.py +8 -8
- elasticsearch9/_async/client/text_structure.py +13 -9
- 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 +66 -45
- elasticsearch9/_sync/client/async_search.py +3 -3
- elasticsearch9/_sync/client/autoscaling.py +15 -4
- elasticsearch9/_sync/client/cat.py +40 -2
- elasticsearch9/_sync/client/ccr.py +10 -10
- elasticsearch9/_sync/client/cluster.py +32 -32
- 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 +10 -10
- elasticsearch9/_sync/client/esql.py +16 -16
- elasticsearch9/_sync/client/features.py +6 -6
- elasticsearch9/_sync/client/fleet.py +7 -7
- elasticsearch9/_sync/client/graph.py +2 -2
- elasticsearch9/_sync/client/ilm.py +18 -18
- elasticsearch9/_sync/client/indices.py +131 -135
- elasticsearch9/_sync/client/inference.py +76 -56
- 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 +125 -85
- elasticsearch9/_sync/client/monitoring.py +4 -3
- elasticsearch9/_sync/client/nodes.py +15 -15
- elasticsearch9/_sync/client/project.py +4 -3
- 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 +8 -7
- 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 +20 -20
- elasticsearch9/_sync/client/sql.py +10 -10
- elasticsearch9/_sync/client/streams.py +6 -6
- elasticsearch9/_sync/client/synonyms.py +10 -10
- elasticsearch9/_sync/client/tasks.py +8 -8
- elasticsearch9/_sync/client/text_structure.py +13 -9
- 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/_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 +3 -3
- elasticsearch9/dsl/async_connections.py +1 -2
- elasticsearch9/dsl/connections.py +1 -2
- elasticsearch9/dsl/document_base.py +1 -1
- elasticsearch9/dsl/field.py +1 -1
- elasticsearch9/dsl/pydantic.py +1 -1
- elasticsearch9/dsl/query.py +23 -0
- elasticsearch9/dsl/serializer.py +1 -2
- elasticsearch9/dsl/types.py +2 -6
- elasticsearch9/dsl/utils.py +1 -2
- elasticsearch9/esql/esql.py +1 -1
- elasticsearch9/esql/functions.py +2 -2
- 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 +5 -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 +5 -5
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.2.1.dist-info}/METADATA +1 -1
- elasticsearch9-9.2.1.dist-info/RECORD +168 -0
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.2.1.dist-info}/WHEEL +1 -1
- elasticsearch9-9.2.0.dist-info/RECORD +0 -168
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.2.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch9-9.2.0.dist-info → elasticsearch9-9.2.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -85,9 +85,9 @@ from .utils import (
|
|
|
85
85
|
CLIENT_META_SERVICE,
|
|
86
86
|
SKIP_IN_PATH,
|
|
87
87
|
Stability,
|
|
88
|
+
_availability_warning,
|
|
88
89
|
_quote,
|
|
89
90
|
_rewrite_parameters,
|
|
90
|
-
_stability_warning,
|
|
91
91
|
client_node_configs,
|
|
92
92
|
is_requests_http_auth,
|
|
93
93
|
is_requests_node_class,
|
|
@@ -504,6 +504,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
504
504
|
"""
|
|
505
505
|
__path = "/"
|
|
506
506
|
__query: t.Dict[str, t.Any] = {}
|
|
507
|
+
__path_parts: t.Dict[str, str] = {}
|
|
507
508
|
if error_trace is not None:
|
|
508
509
|
__query["error_trace"] = error_trace
|
|
509
510
|
if filter_path is not None:
|
|
@@ -515,7 +516,12 @@ class AsyncElasticsearch(BaseClient):
|
|
|
515
516
|
__headers = {"accept": "application/json"}
|
|
516
517
|
try:
|
|
517
518
|
await self.perform_request(
|
|
518
|
-
"HEAD",
|
|
519
|
+
"HEAD",
|
|
520
|
+
__path,
|
|
521
|
+
params=__query,
|
|
522
|
+
headers=__headers,
|
|
523
|
+
endpoint_id="ping",
|
|
524
|
+
path_parts=__path_parts,
|
|
519
525
|
)
|
|
520
526
|
return True
|
|
521
527
|
except (ApiError, TransportError):
|
|
@@ -561,8 +567,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
561
567
|
"""
|
|
562
568
|
.. raw:: html
|
|
563
569
|
|
|
564
|
-
<p>Bulk index or delete documents
|
|
565
|
-
Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
|
|
570
|
+
<p>Bulk index or delete documents.</p>
|
|
571
|
+
<p>Perform multiple <code>index</code>, <code>create</code>, <code>delete</code>, and <code>update</code> actions in a single request.
|
|
566
572
|
This reduces overhead and can greatly increase indexing speed.</p>
|
|
567
573
|
<p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:</p>
|
|
568
574
|
<ul>
|
|
@@ -610,6 +616,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
610
616
|
<li>Perl: Check out <code>Search::Elasticsearch::Client::5_0::Bulk</code> and <code>Search::Elasticsearch::Client::5_0::Scroll</code></li>
|
|
611
617
|
<li>Python: Check out <code>elasticsearch.helpers.*</code></li>
|
|
612
618
|
<li>JavaScript: Check out <code>client.helpers.*</code></li>
|
|
619
|
+
<li>Java: Check out <code>co.elastic.clients.elasticsearch._helpers.bulk.BulkIngester</code></li>
|
|
613
620
|
<li>.NET: Check out <code>BulkAllObservable</code></li>
|
|
614
621
|
<li>PHP: Check out bulk indexing.</li>
|
|
615
622
|
<li>Ruby: Check out <code>Elasticsearch::Helpers::BulkHelper</code></li>
|
|
@@ -767,8 +774,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
767
774
|
"""
|
|
768
775
|
.. raw:: html
|
|
769
776
|
|
|
770
|
-
<p>Clear a scrolling search
|
|
771
|
-
Clear the search context and results for a scrolling search.</p>
|
|
777
|
+
<p>Clear a scrolling search.</p>
|
|
778
|
+
<p>Clear the search context and results for a scrolling search.</p>
|
|
772
779
|
|
|
773
780
|
|
|
774
781
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll>`_
|
|
@@ -821,8 +828,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
821
828
|
"""
|
|
822
829
|
.. raw:: html
|
|
823
830
|
|
|
824
|
-
<p>Close a point in time
|
|
825
|
-
A point in time must be opened explicitly before being used in search requests.
|
|
831
|
+
<p>Close a point in time.</p>
|
|
832
|
+
<p>A point in time must be opened explicitly before being used in search requests.
|
|
826
833
|
The <code>keep_alive</code> parameter tells Elasticsearch how long it should persist.
|
|
827
834
|
A point in time is automatically closed when the <code>keep_alive</code> period has elapsed.
|
|
828
835
|
However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.</p>
|
|
@@ -899,8 +906,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
899
906
|
"""
|
|
900
907
|
.. raw:: html
|
|
901
908
|
|
|
902
|
-
<p>Count search results
|
|
903
|
-
Get the number of documents matching a query.</p>
|
|
909
|
+
<p>Count search results.</p>
|
|
910
|
+
<p>Get the number of documents matching a query.</p>
|
|
904
911
|
<p>The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body.
|
|
905
912
|
The query is optional. When no query is provided, the API uses <code>match_all</code> to count all the documents.</p>
|
|
906
913
|
<p>The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices.</p>
|
|
@@ -1642,11 +1649,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1642
1649
|
self,
|
|
1643
1650
|
*,
|
|
1644
1651
|
task_id: str,
|
|
1652
|
+
requests_per_second: float,
|
|
1645
1653
|
error_trace: t.Optional[bool] = None,
|
|
1646
1654
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
1647
1655
|
human: t.Optional[bool] = None,
|
|
1648
1656
|
pretty: t.Optional[bool] = None,
|
|
1649
|
-
requests_per_second: t.Optional[float] = None,
|
|
1650
1657
|
) -> ObjectApiResponse[t.Any]:
|
|
1651
1658
|
"""
|
|
1652
1659
|
.. raw:: html
|
|
@@ -1664,9 +1671,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1664
1671
|
"""
|
|
1665
1672
|
if task_id in SKIP_IN_PATH:
|
|
1666
1673
|
raise ValueError("Empty value passed for parameter 'task_id'")
|
|
1674
|
+
if requests_per_second is None:
|
|
1675
|
+
raise ValueError("Empty value passed for parameter 'requests_per_second'")
|
|
1667
1676
|
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
|
|
1668
1677
|
__path = f'/_delete_by_query/{__path_parts["task_id"]}/_rethrottle'
|
|
1669
1678
|
__query: t.Dict[str, t.Any] = {}
|
|
1679
|
+
if requests_per_second is not None:
|
|
1680
|
+
__query["requests_per_second"] = requests_per_second
|
|
1670
1681
|
if error_trace is not None:
|
|
1671
1682
|
__query["error_trace"] = error_trace
|
|
1672
1683
|
if filter_path is not None:
|
|
@@ -1675,8 +1686,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1675
1686
|
__query["human"] = human
|
|
1676
1687
|
if pretty is not None:
|
|
1677
1688
|
__query["pretty"] = pretty
|
|
1678
|
-
if requests_per_second is not None:
|
|
1679
|
-
__query["requests_per_second"] = requests_per_second
|
|
1680
1689
|
__headers = {"accept": "application/json"}
|
|
1681
1690
|
return await self.perform_request( # type: ignore[return-value]
|
|
1682
1691
|
"POST",
|
|
@@ -1702,8 +1711,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
1702
1711
|
"""
|
|
1703
1712
|
.. raw:: html
|
|
1704
1713
|
|
|
1705
|
-
<p>Delete a script or search template
|
|
1706
|
-
Deletes a stored script or search template.</p>
|
|
1714
|
+
<p>Delete a script or search template.</p>
|
|
1715
|
+
<p>Deletes a stored script or search template.</p>
|
|
1707
1716
|
|
|
1708
1717
|
|
|
1709
1718
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script>`_
|
|
@@ -2014,8 +2023,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2014
2023
|
"""
|
|
2015
2024
|
.. raw:: html
|
|
2016
2025
|
|
|
2017
|
-
<p>Explain a document match result
|
|
2018
|
-
Get information about why a specific document matches, or doesn't match, a query.
|
|
2026
|
+
<p>Explain a document match result.</p>
|
|
2027
|
+
<p>Get information about why a specific document matches, or doesn't match, a query.
|
|
2019
2028
|
It computes a score explanation for a query and a specific document.</p>
|
|
2020
2029
|
|
|
2021
2030
|
|
|
@@ -2431,8 +2440,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2431
2440
|
"""
|
|
2432
2441
|
.. raw:: html
|
|
2433
2442
|
|
|
2434
|
-
<p>Get a script or search template
|
|
2435
|
-
Retrieves a stored script or search template.</p>
|
|
2443
|
+
<p>Get a script or search template.</p>
|
|
2444
|
+
<p>Retrieves a stored script or search template.</p>
|
|
2436
2445
|
|
|
2437
2446
|
|
|
2438
2447
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script>`_
|
|
@@ -2668,8 +2677,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2668
2677
|
"""
|
|
2669
2678
|
.. raw:: html
|
|
2670
2679
|
|
|
2671
|
-
<p>Get the cluster health
|
|
2672
|
-
Get a report with the health status of an Elasticsearch cluster.
|
|
2680
|
+
<p>Get the cluster health.</p>
|
|
2681
|
+
<p>Get a report with the health status of an Elasticsearch cluster.
|
|
2673
2682
|
The report contains a list of indicators that compose Elasticsearch functionality.</p>
|
|
2674
2683
|
<p>Each indicator has a health status of: green, unknown, yellow or red.
|
|
2675
2684
|
The indicator will provide an explanation and metadata describing the reason for its current health status.</p>
|
|
@@ -2840,13 +2849,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2840
2849
|
"id": "elkbee"
|
|
2841
2850
|
}
|
|
2842
2851
|
}
|
|
2843
|
-
|
|
2844
|
-
In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
|
|
2845
|
-
If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).
|
|
2846
|
-
|
|
2847
|
-
A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
|
|
2848
|
-
Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.
|
|
2849
2852
|
</code></pre>
|
|
2853
|
+
<p>In this example, the operation will succeed since the supplied version of 2 is higher than the current document version of 1.
|
|
2854
|
+
If the document was already updated and its version was set to 2 or higher, the indexing command will fail and result in a conflict (409 HTTP status code).</p>
|
|
2855
|
+
<p>A nice side effect is that there is no need to maintain strict ordering of async indexing operations run as a result of changes to a source database, as long as version numbers from the source database are used.
|
|
2856
|
+
Even the simple case of updating the Elasticsearch index using data from a database is simplified if external versioning is used, as only the latest version will be used if the index operations arrive out of order.</p>
|
|
2850
2857
|
|
|
2851
2858
|
|
|
2852
2859
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create>`_
|
|
@@ -2981,8 +2988,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
2981
2988
|
"""
|
|
2982
2989
|
.. raw:: html
|
|
2983
2990
|
|
|
2984
|
-
<p>Get cluster info
|
|
2985
|
-
Get basic build, version, and cluster information.
|
|
2991
|
+
<p>Get cluster info.</p>
|
|
2992
|
+
<p>Get basic build, version, and cluster information.
|
|
2986
2993
|
::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.</p>
|
|
2987
2994
|
|
|
2988
2995
|
|
|
@@ -3698,8 +3705,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
3698
3705
|
"""
|
|
3699
3706
|
.. raw:: html
|
|
3700
3707
|
|
|
3701
|
-
<p>Create or update a script or search template
|
|
3702
|
-
Creates or updates a stored script or search template.</p>
|
|
3708
|
+
<p>Create or update a script or search template.</p>
|
|
3709
|
+
<p>Creates or updates a stored script or search template.</p>
|
|
3703
3710
|
|
|
3704
3711
|
|
|
3705
3712
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script>`_
|
|
@@ -4029,11 +4036,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4029
4036
|
self,
|
|
4030
4037
|
*,
|
|
4031
4038
|
task_id: str,
|
|
4039
|
+
requests_per_second: float,
|
|
4032
4040
|
error_trace: t.Optional[bool] = None,
|
|
4033
4041
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
4034
4042
|
human: t.Optional[bool] = None,
|
|
4035
4043
|
pretty: t.Optional[bool] = None,
|
|
4036
|
-
requests_per_second: t.Optional[float] = None,
|
|
4037
4044
|
) -> ObjectApiResponse[t.Any]:
|
|
4038
4045
|
"""
|
|
4039
4046
|
.. raw:: html
|
|
@@ -4057,9 +4064,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4057
4064
|
"""
|
|
4058
4065
|
if task_id in SKIP_IN_PATH:
|
|
4059
4066
|
raise ValueError("Empty value passed for parameter 'task_id'")
|
|
4067
|
+
if requests_per_second is None:
|
|
4068
|
+
raise ValueError("Empty value passed for parameter 'requests_per_second'")
|
|
4060
4069
|
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
|
|
4061
4070
|
__path = f'/_reindex/{__path_parts["task_id"]}/_rethrottle'
|
|
4062
4071
|
__query: t.Dict[str, t.Any] = {}
|
|
4072
|
+
if requests_per_second is not None:
|
|
4073
|
+
__query["requests_per_second"] = requests_per_second
|
|
4063
4074
|
if error_trace is not None:
|
|
4064
4075
|
__query["error_trace"] = error_trace
|
|
4065
4076
|
if filter_path is not None:
|
|
@@ -4068,8 +4079,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4068
4079
|
__query["human"] = human
|
|
4069
4080
|
if pretty is not None:
|
|
4070
4081
|
__query["pretty"] = pretty
|
|
4071
|
-
if requests_per_second is not None:
|
|
4072
|
-
__query["requests_per_second"] = requests_per_second
|
|
4073
4082
|
__headers = {"accept": "application/json"}
|
|
4074
4083
|
return await self.perform_request( # type: ignore[return-value]
|
|
4075
4084
|
"POST",
|
|
@@ -4153,7 +4162,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4153
4162
|
@_rewrite_parameters(
|
|
4154
4163
|
body_fields=("context", "context_setup", "script"),
|
|
4155
4164
|
)
|
|
4156
|
-
@
|
|
4165
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
4157
4166
|
async def scripts_painless_execute(
|
|
4158
4167
|
self,
|
|
4159
4168
|
*,
|
|
@@ -5187,11 +5196,19 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5187
5196
|
|
|
5188
5197
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt>`_
|
|
5189
5198
|
|
|
5190
|
-
:param index:
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
:param
|
|
5199
|
+
:param index: A list of indices, data streams, or aliases to search. It supports
|
|
5200
|
+
wildcards (`*`). To search all data streams and indices, omit this parameter
|
|
5201
|
+
or use `*` or `_all`. To search a remote cluster, use the `<cluster>:<target>`
|
|
5202
|
+
syntax.
|
|
5203
|
+
:param field: A field that contains the geospatial data to return. It must be
|
|
5204
|
+
a `geo_point` or `geo_shape` field. The field must have doc values enabled.
|
|
5205
|
+
It cannot be a nested field. NOTE: Vector tiles do not natively support geometry
|
|
5206
|
+
collections. For `geometrycollection` values in a `geo_shape` field, the
|
|
5207
|
+
API returns a hits layer feature for each element of the collection. This
|
|
5208
|
+
behavior may change in a future release.
|
|
5209
|
+
:param zoom: The zoom level of the vector tile to search. It accepts `0` to `29`.
|
|
5210
|
+
:param x: The X coordinate for the vector tile to search.
|
|
5211
|
+
:param y: The Y coordinate for the vector tile to search.
|
|
5195
5212
|
:param aggs: Sub-aggregations for the geotile_grid. It supports the following
|
|
5196
5213
|
aggregation types: - `avg` - `boxplot` - `cardinality` - `extended stats`
|
|
5197
5214
|
- `max` - `median absolute deviation` - `min` - `percentile` - `percentile-rank`
|
|
@@ -6114,8 +6131,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6114
6131
|
"""
|
|
6115
6132
|
.. raw:: html
|
|
6116
6133
|
|
|
6117
|
-
<p>Update documents
|
|
6118
|
-
Updates documents that match the specified query.
|
|
6134
|
+
<p>Update documents.</p>
|
|
6135
|
+
<p>Updates documents that match the specified query.
|
|
6119
6136
|
If no query is specified, performs an update on every document in the data stream or index without modifying the source, which is useful for picking up mapping changes.</p>
|
|
6120
6137
|
<p>If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:</p>
|
|
6121
6138
|
<ul>
|
|
@@ -6394,11 +6411,11 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6394
6411
|
self,
|
|
6395
6412
|
*,
|
|
6396
6413
|
task_id: str,
|
|
6414
|
+
requests_per_second: float,
|
|
6397
6415
|
error_trace: t.Optional[bool] = None,
|
|
6398
6416
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
6399
6417
|
human: t.Optional[bool] = None,
|
|
6400
6418
|
pretty: t.Optional[bool] = None,
|
|
6401
|
-
requests_per_second: t.Optional[float] = None,
|
|
6402
6419
|
) -> ObjectApiResponse[t.Any]:
|
|
6403
6420
|
"""
|
|
6404
6421
|
.. raw:: html
|
|
@@ -6416,9 +6433,13 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6416
6433
|
"""
|
|
6417
6434
|
if task_id in SKIP_IN_PATH:
|
|
6418
6435
|
raise ValueError("Empty value passed for parameter 'task_id'")
|
|
6436
|
+
if requests_per_second is None:
|
|
6437
|
+
raise ValueError("Empty value passed for parameter 'requests_per_second'")
|
|
6419
6438
|
__path_parts: t.Dict[str, str] = {"task_id": _quote(task_id)}
|
|
6420
6439
|
__path = f'/_update_by_query/{__path_parts["task_id"]}/_rethrottle'
|
|
6421
6440
|
__query: t.Dict[str, t.Any] = {}
|
|
6441
|
+
if requests_per_second is not None:
|
|
6442
|
+
__query["requests_per_second"] = requests_per_second
|
|
6422
6443
|
if error_trace is not None:
|
|
6423
6444
|
__query["error_trace"] = error_trace
|
|
6424
6445
|
if filter_path is not None:
|
|
@@ -6427,8 +6448,6 @@ class AsyncElasticsearch(BaseClient):
|
|
|
6427
6448
|
__query["human"] = human
|
|
6428
6449
|
if pretty is not None:
|
|
6429
6450
|
__query["pretty"] = pretty
|
|
6430
|
-
if requests_per_second is not None:
|
|
6431
|
-
__query["requests_per_second"] = requests_per_second
|
|
6432
6451
|
__headers = {"accept": "application/json"}
|
|
6433
6452
|
return await self.perform_request( # type: ignore[return-value]
|
|
6434
6453
|
"POST",
|
|
@@ -358,7 +358,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
358
358
|
:param allow_partial_search_results: Indicate if an error should be returned
|
|
359
359
|
if there is a partial search failure or timeout
|
|
360
360
|
:param analyze_wildcard: Specify whether wildcard and prefix queries should be
|
|
361
|
-
analyzed
|
|
361
|
+
analyzed
|
|
362
362
|
:param analyzer: The analyzer to use for the query string
|
|
363
363
|
:param batched_reduce_size: Affects how often partial results become available,
|
|
364
364
|
which happens whenever shard results are reduced. A partial reduction is
|
|
@@ -374,7 +374,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
374
374
|
values for field names matching these patterns in the hits.fields property
|
|
375
375
|
of the response.
|
|
376
376
|
:param expand_wildcards: Whether to expand wildcard expression to concrete indices
|
|
377
|
-
that are open, closed or both
|
|
377
|
+
that are open, closed or both
|
|
378
378
|
:param explain: If true, returns detailed information about score computation
|
|
379
379
|
as part of a hit.
|
|
380
380
|
:param ext: Configuration of search extensions defined by Elasticsearch plugins.
|
|
@@ -407,7 +407,7 @@ class AsyncSearchClient(NamespacedClient):
|
|
|
407
407
|
you cannot specify an <index> in the request path.
|
|
408
408
|
:param post_filter:
|
|
409
409
|
:param preference: Specify the node or shard the operation should be performed
|
|
410
|
-
on
|
|
410
|
+
on
|
|
411
411
|
:param profile:
|
|
412
412
|
:param project_routing: Specifies a subset of projects to target for the search
|
|
413
413
|
using project metadata tags in a subset of Lucene query syntax. Allowed Lucene
|
|
@@ -20,12 +20,20 @@ import typing as t
|
|
|
20
20
|
from elastic_transport import ObjectApiResponse
|
|
21
21
|
|
|
22
22
|
from ._base import NamespacedClient
|
|
23
|
-
from .utils import
|
|
23
|
+
from .utils import (
|
|
24
|
+
SKIP_IN_PATH,
|
|
25
|
+
Stability,
|
|
26
|
+
Visibility,
|
|
27
|
+
_availability_warning,
|
|
28
|
+
_quote,
|
|
29
|
+
_rewrite_parameters,
|
|
30
|
+
)
|
|
24
31
|
|
|
25
32
|
|
|
26
33
|
class AutoscalingClient(NamespacedClient):
|
|
27
34
|
|
|
28
35
|
@_rewrite_parameters()
|
|
36
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
29
37
|
async def delete_autoscaling_policy(
|
|
30
38
|
self,
|
|
31
39
|
*,
|
|
@@ -46,7 +54,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
46
54
|
|
|
47
55
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy>`_
|
|
48
56
|
|
|
49
|
-
:param name:
|
|
57
|
+
:param name: Name of the autoscaling policy
|
|
50
58
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
51
59
|
no response is received before the timeout expires, the request fails and
|
|
52
60
|
returns an error.
|
|
@@ -81,6 +89,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
81
89
|
)
|
|
82
90
|
|
|
83
91
|
@_rewrite_parameters()
|
|
92
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
84
93
|
async def get_autoscaling_capacity(
|
|
85
94
|
self,
|
|
86
95
|
*,
|
|
@@ -134,6 +143,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
134
143
|
)
|
|
135
144
|
|
|
136
145
|
@_rewrite_parameters()
|
|
146
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
137
147
|
async def get_autoscaling_policy(
|
|
138
148
|
self,
|
|
139
149
|
*,
|
|
@@ -153,7 +163,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
153
163
|
|
|
154
164
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity>`_
|
|
155
165
|
|
|
156
|
-
:param name:
|
|
166
|
+
:param name: Name of the autoscaling policy
|
|
157
167
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
158
168
|
no response is received before the timeout expires, the request fails and
|
|
159
169
|
returns an error.
|
|
@@ -186,6 +196,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
186
196
|
@_rewrite_parameters(
|
|
187
197
|
body_name="policy",
|
|
188
198
|
)
|
|
199
|
+
@_availability_warning(Stability.STABLE, Visibility.PRIVATE)
|
|
189
200
|
async def put_autoscaling_policy(
|
|
190
201
|
self,
|
|
191
202
|
*,
|
|
@@ -208,7 +219,7 @@ class AutoscalingClient(NamespacedClient):
|
|
|
208
219
|
|
|
209
220
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy>`_
|
|
210
221
|
|
|
211
|
-
:param name:
|
|
222
|
+
:param name: Name of the autoscaling policy
|
|
212
223
|
:param policy:
|
|
213
224
|
:param master_timeout: Period to wait for a connection to the master node. If
|
|
214
225
|
no response is received before the timeout expires, the request fails and
|
|
@@ -23,9 +23,9 @@ 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
|
|
|
@@ -3308,10 +3308,20 @@ class CatClient(NamespacedClient):
|
|
|
3308
3308
|
self,
|
|
3309
3309
|
*,
|
|
3310
3310
|
index: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3311
|
+
allow_closed: t.Optional[bool] = None,
|
|
3312
|
+
allow_no_indices: t.Optional[bool] = None,
|
|
3311
3313
|
bytes: t.Optional[
|
|
3312
3314
|
t.Union[str, t.Literal["b", "gb", "kb", "mb", "pb", "tb"]]
|
|
3313
3315
|
] = None,
|
|
3314
3316
|
error_trace: t.Optional[bool] = None,
|
|
3317
|
+
expand_wildcards: t.Optional[
|
|
3318
|
+
t.Union[
|
|
3319
|
+
t.Sequence[
|
|
3320
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]]
|
|
3321
|
+
],
|
|
3322
|
+
t.Union[str, t.Literal["all", "closed", "hidden", "none", "open"]],
|
|
3323
|
+
]
|
|
3324
|
+
] = None,
|
|
3315
3325
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3316
3326
|
format: t.Optional[str] = None,
|
|
3317
3327
|
h: t.Optional[
|
|
@@ -3362,6 +3372,8 @@ class CatClient(NamespacedClient):
|
|
|
3362
3372
|
] = None,
|
|
3363
3373
|
help: t.Optional[bool] = None,
|
|
3364
3374
|
human: t.Optional[bool] = None,
|
|
3375
|
+
ignore_throttled: t.Optional[bool] = None,
|
|
3376
|
+
ignore_unavailable: t.Optional[bool] = None,
|
|
3365
3377
|
local: t.Optional[bool] = None,
|
|
3366
3378
|
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
3367
3379
|
pretty: t.Optional[bool] = None,
|
|
@@ -3385,6 +3397,14 @@ class CatClient(NamespacedClient):
|
|
|
3385
3397
|
:param index: A comma-separated list of data streams, indices, and aliases used
|
|
3386
3398
|
to limit the request. Supports wildcards (`*`). To target all data streams
|
|
3387
3399
|
and indices, omit this parameter or use `*` or `_all`.
|
|
3400
|
+
:param allow_closed: If true, allow closed indices to be returned in the response
|
|
3401
|
+
otherwise if false, keep the legacy behaviour of throwing an exception if
|
|
3402
|
+
index pattern matches closed indices
|
|
3403
|
+
:param allow_no_indices: If false, the request returns an error if any wildcard
|
|
3404
|
+
expression, index alias, or _all value targets only missing or closed indices.
|
|
3405
|
+
This behavior applies even if the request targets other open indices. For
|
|
3406
|
+
example, a request targeting foo*,bar* returns an error if an index starts
|
|
3407
|
+
with foo but no index starts with bar.
|
|
3388
3408
|
:param bytes: Sets the units for columns that contain a byte-size value. Note
|
|
3389
3409
|
that byte-size value units work in terms of powers of 1024. For instance
|
|
3390
3410
|
`1kb` means 1024 bytes, not 1000 bytes. If omitted, byte-size values are
|
|
@@ -3393,12 +3413,20 @@ class CatClient(NamespacedClient):
|
|
|
3393
3413
|
least `1.0`. If given, byte-size values are rendered as an integer with no
|
|
3394
3414
|
suffix, representing the value of the column in the chosen unit. Values that
|
|
3395
3415
|
are not an exact multiple of the chosen unit are rounded down.
|
|
3416
|
+
:param expand_wildcards: Type of index that wildcard expressions can match. If
|
|
3417
|
+
the request can target data streams, this argument determines whether wildcard
|
|
3418
|
+
expressions match hidden data streams. Supports comma-separated values, such
|
|
3419
|
+
as open,hidden.
|
|
3396
3420
|
:param format: Specifies the format to return the columnar data in, can be set
|
|
3397
3421
|
to `text`, `json`, `cbor`, `yaml`, or `smile`.
|
|
3398
3422
|
:param h: A comma-separated list of columns names to display. It supports simple
|
|
3399
3423
|
wildcards.
|
|
3400
3424
|
:param help: When set to `true` will output available columns. This option can't
|
|
3401
3425
|
be combined with any other query string option.
|
|
3426
|
+
:param ignore_throttled: If true, concrete, expanded or aliased indices are ignored
|
|
3427
|
+
when frozen.
|
|
3428
|
+
:param ignore_unavailable: If true, missing or closed indices are not included
|
|
3429
|
+
in the response.
|
|
3402
3430
|
:param local: If `true`, the request computes the list of selected nodes from
|
|
3403
3431
|
the local cluster state. If `false` the list of selected nodes are computed
|
|
3404
3432
|
from the cluster state of the master node. In both cases the coordinating
|
|
@@ -3423,10 +3451,16 @@ class CatClient(NamespacedClient):
|
|
|
3423
3451
|
__path_parts = {}
|
|
3424
3452
|
__path = "/_cat/segments"
|
|
3425
3453
|
__query: t.Dict[str, t.Any] = {}
|
|
3454
|
+
if allow_closed is not None:
|
|
3455
|
+
__query["allow_closed"] = allow_closed
|
|
3456
|
+
if allow_no_indices is not None:
|
|
3457
|
+
__query["allow_no_indices"] = allow_no_indices
|
|
3426
3458
|
if bytes is not None:
|
|
3427
3459
|
__query["bytes"] = bytes
|
|
3428
3460
|
if error_trace is not None:
|
|
3429
3461
|
__query["error_trace"] = error_trace
|
|
3462
|
+
if expand_wildcards is not None:
|
|
3463
|
+
__query["expand_wildcards"] = expand_wildcards
|
|
3430
3464
|
if filter_path is not None:
|
|
3431
3465
|
__query["filter_path"] = filter_path
|
|
3432
3466
|
if format is not None:
|
|
@@ -3437,6 +3471,10 @@ class CatClient(NamespacedClient):
|
|
|
3437
3471
|
__query["help"] = help
|
|
3438
3472
|
if human is not None:
|
|
3439
3473
|
__query["human"] = human
|
|
3474
|
+
if ignore_throttled is not None:
|
|
3475
|
+
__query["ignore_throttled"] = ignore_throttled
|
|
3476
|
+
if ignore_unavailable is not None:
|
|
3477
|
+
__query["ignore_unavailable"] = ignore_unavailable
|
|
3440
3478
|
if local is not None:
|
|
3441
3479
|
__query["local"] = local
|
|
3442
3480
|
if master_timeout is not None:
|
|
@@ -3868,7 +3906,7 @@ class CatClient(NamespacedClient):
|
|
|
3868
3906
|
)
|
|
3869
3907
|
|
|
3870
3908
|
@_rewrite_parameters()
|
|
3871
|
-
@
|
|
3909
|
+
@_availability_warning(Stability.EXPERIMENTAL)
|
|
3872
3910
|
async def tasks(
|
|
3873
3911
|
self,
|
|
3874
3912
|
*,
|
|
@@ -125,8 +125,8 @@ class CcrClient(NamespacedClient):
|
|
|
125
125
|
"""
|
|
126
126
|
.. raw:: html
|
|
127
127
|
|
|
128
|
-
<p>Create a follower
|
|
129
|
-
Create a cross-cluster replication follower index that follows a specific leader index.
|
|
128
|
+
<p>Create a follower.</p>
|
|
129
|
+
<p>Create a cross-cluster replication follower index that follows a specific leader index.
|
|
130
130
|
When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.</p>
|
|
131
131
|
|
|
132
132
|
|
|
@@ -368,8 +368,8 @@ class CcrClient(NamespacedClient):
|
|
|
368
368
|
"""
|
|
369
369
|
.. raw:: html
|
|
370
370
|
|
|
371
|
-
<p>Forget a follower
|
|
372
|
-
Remove the cross-cluster replication follower retention leases from the leader.</p>
|
|
371
|
+
<p>Forget a follower.</p>
|
|
372
|
+
<p>Remove the cross-cluster replication follower retention leases from the leader.</p>
|
|
373
373
|
<p>A following index takes out retention leases on its leader index.
|
|
374
374
|
These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication.
|
|
375
375
|
When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed.
|
|
@@ -382,7 +382,7 @@ class CcrClient(NamespacedClient):
|
|
|
382
382
|
|
|
383
383
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower>`_
|
|
384
384
|
|
|
385
|
-
:param index:
|
|
385
|
+
:param index: Name of the leader index for which specified follower retention
|
|
386
386
|
leases should be removed
|
|
387
387
|
:param follower_cluster:
|
|
388
388
|
:param follower_index:
|
|
@@ -640,8 +640,8 @@ class CcrClient(NamespacedClient):
|
|
|
640
640
|
"""
|
|
641
641
|
.. raw:: html
|
|
642
642
|
|
|
643
|
-
<p>Create or update auto-follow patterns
|
|
644
|
-
Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.
|
|
643
|
+
<p>Create or update auto-follow patterns.</p>
|
|
644
|
+
<p>Create a collection of cross-cluster replication auto-follow patterns for a remote cluster.
|
|
645
645
|
Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices.
|
|
646
646
|
Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern.</p>
|
|
647
647
|
<p>This API can also be used to update auto-follow patterns.
|
|
@@ -853,8 +853,8 @@ class CcrClient(NamespacedClient):
|
|
|
853
853
|
"""
|
|
854
854
|
.. raw:: html
|
|
855
855
|
|
|
856
|
-
<p>Resume a follower
|
|
857
|
-
Resume a cross-cluster replication follower index that was paused.
|
|
856
|
+
<p>Resume a follower.</p>
|
|
857
|
+
<p>Resume a cross-cluster replication follower index that was paused.
|
|
858
858
|
The follower index could have been paused with the pause follower API.
|
|
859
859
|
Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks.
|
|
860
860
|
When this API returns, the follower index will resume fetching operations from the leader index.</p>
|
|
@@ -862,7 +862,7 @@ class CcrClient(NamespacedClient):
|
|
|
862
862
|
|
|
863
863
|
`<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow>`_
|
|
864
864
|
|
|
865
|
-
:param index:
|
|
865
|
+
:param index: Name of the follow index to resume following
|
|
866
866
|
:param master_timeout: Period to wait for a connection to the master node.
|
|
867
867
|
:param max_outstanding_read_requests:
|
|
868
868
|
:param max_outstanding_write_requests:
|