elasticsearch 8.17.1__py3-none-any.whl → 9.0.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.
- elasticsearch/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +2125 -1053
- elasticsearch/_async/client/_base.py +1 -2
- elasticsearch/_async/client/async_search.py +46 -35
- elasticsearch/_async/client/autoscaling.py +32 -26
- elasticsearch/_async/client/cat.py +244 -176
- elasticsearch/_async/client/ccr.py +268 -128
- elasticsearch/_async/client/cluster.py +191 -164
- elasticsearch/_async/client/connector.py +226 -116
- elasticsearch/_async/client/dangling_indices.py +22 -16
- elasticsearch/_async/client/enrich.py +51 -11
- elasticsearch/_async/client/eql.py +54 -13
- elasticsearch/_async/client/esql.py +351 -7
- elasticsearch/_async/client/features.py +37 -27
- elasticsearch/_async/client/fleet.py +32 -22
- elasticsearch/_async/client/graph.py +10 -9
- elasticsearch/_async/client/ilm.py +115 -77
- elasticsearch/_async/client/indices.py +1119 -772
- elasticsearch/_async/client/inference.py +1933 -84
- elasticsearch/_async/client/ingest.py +83 -50
- elasticsearch/_async/client/license.py +90 -38
- elasticsearch/_async/client/logstash.py +20 -9
- elasticsearch/_async/client/migration.py +26 -17
- elasticsearch/_async/client/ml.py +646 -374
- elasticsearch/_async/client/monitoring.py +6 -3
- elasticsearch/_async/client/nodes.py +52 -54
- elasticsearch/_async/client/query_rules.py +59 -33
- elasticsearch/_async/client/rollup.py +124 -86
- elasticsearch/_async/client/search_application.py +60 -32
- elasticsearch/_async/client/searchable_snapshots.py +25 -12
- elasticsearch/_async/client/security.py +903 -562
- elasticsearch/_async/client/shutdown.py +34 -36
- elasticsearch/_async/client/simulate.py +22 -28
- elasticsearch/_async/client/slm.py +65 -40
- elasticsearch/_async/client/snapshot.py +454 -327
- elasticsearch/_async/client/sql.py +43 -22
- elasticsearch/_async/client/ssl.py +17 -18
- elasticsearch/_async/client/synonyms.py +58 -37
- elasticsearch/_async/client/tasks.py +77 -48
- elasticsearch/_async/client/text_structure.py +65 -56
- elasticsearch/_async/client/transform.py +124 -93
- elasticsearch/_async/client/watcher.py +117 -73
- elasticsearch/_async/client/xpack.py +18 -9
- elasticsearch/_async/helpers.py +1 -2
- elasticsearch/_sync/client/__init__.py +2125 -1053
- elasticsearch/_sync/client/_base.py +1 -2
- elasticsearch/_sync/client/async_search.py +46 -35
- elasticsearch/_sync/client/autoscaling.py +32 -26
- elasticsearch/_sync/client/cat.py +244 -176
- elasticsearch/_sync/client/ccr.py +268 -128
- elasticsearch/_sync/client/cluster.py +191 -164
- elasticsearch/_sync/client/connector.py +226 -116
- elasticsearch/_sync/client/dangling_indices.py +22 -16
- elasticsearch/_sync/client/enrich.py +51 -11
- elasticsearch/_sync/client/eql.py +54 -13
- elasticsearch/_sync/client/esql.py +351 -7
- elasticsearch/_sync/client/features.py +37 -27
- elasticsearch/_sync/client/fleet.py +32 -22
- elasticsearch/_sync/client/graph.py +10 -9
- elasticsearch/_sync/client/ilm.py +115 -77
- elasticsearch/_sync/client/indices.py +1119 -772
- elasticsearch/_sync/client/inference.py +1933 -84
- elasticsearch/_sync/client/ingest.py +83 -50
- elasticsearch/_sync/client/license.py +90 -38
- elasticsearch/_sync/client/logstash.py +20 -9
- elasticsearch/_sync/client/migration.py +26 -17
- elasticsearch/_sync/client/ml.py +646 -374
- elasticsearch/_sync/client/monitoring.py +6 -3
- elasticsearch/_sync/client/nodes.py +52 -54
- elasticsearch/_sync/client/query_rules.py +59 -33
- elasticsearch/_sync/client/rollup.py +124 -86
- elasticsearch/_sync/client/search_application.py +60 -32
- elasticsearch/_sync/client/searchable_snapshots.py +25 -12
- elasticsearch/_sync/client/security.py +903 -562
- elasticsearch/_sync/client/shutdown.py +34 -36
- elasticsearch/_sync/client/simulate.py +22 -28
- elasticsearch/_sync/client/slm.py +65 -40
- elasticsearch/_sync/client/snapshot.py +454 -327
- elasticsearch/_sync/client/sql.py +43 -22
- elasticsearch/_sync/client/ssl.py +17 -18
- elasticsearch/_sync/client/synonyms.py +58 -37
- elasticsearch/_sync/client/tasks.py +77 -48
- elasticsearch/_sync/client/text_structure.py +65 -56
- elasticsearch/_sync/client/transform.py +124 -93
- elasticsearch/_sync/client/utils.py +1 -41
- elasticsearch/_sync/client/watcher.py +117 -73
- elasticsearch/_sync/client/xpack.py +18 -9
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/dsl/__init__.py +203 -0
- elasticsearch/dsl/_async/__init__.py +16 -0
- elasticsearch/dsl/_async/document.py +522 -0
- elasticsearch/dsl/_async/faceted_search.py +50 -0
- elasticsearch/dsl/_async/index.py +639 -0
- elasticsearch/dsl/_async/mapping.py +49 -0
- elasticsearch/dsl/_async/search.py +237 -0
- elasticsearch/dsl/_async/update_by_query.py +47 -0
- elasticsearch/dsl/_sync/__init__.py +16 -0
- elasticsearch/dsl/_sync/document.py +514 -0
- elasticsearch/dsl/_sync/faceted_search.py +50 -0
- elasticsearch/dsl/_sync/index.py +597 -0
- elasticsearch/dsl/_sync/mapping.py +49 -0
- elasticsearch/dsl/_sync/search.py +230 -0
- elasticsearch/dsl/_sync/update_by_query.py +45 -0
- elasticsearch/dsl/aggs.py +3734 -0
- elasticsearch/dsl/analysis.py +341 -0
- elasticsearch/dsl/async_connections.py +37 -0
- elasticsearch/dsl/connections.py +142 -0
- elasticsearch/dsl/document.py +20 -0
- elasticsearch/dsl/document_base.py +444 -0
- elasticsearch/dsl/exceptions.py +32 -0
- elasticsearch/dsl/faceted_search.py +28 -0
- elasticsearch/dsl/faceted_search_base.py +489 -0
- elasticsearch/dsl/field.py +4392 -0
- elasticsearch/dsl/function.py +180 -0
- elasticsearch/dsl/index.py +23 -0
- elasticsearch/dsl/index_base.py +178 -0
- elasticsearch/dsl/mapping.py +19 -0
- elasticsearch/dsl/mapping_base.py +219 -0
- elasticsearch/dsl/query.py +2822 -0
- elasticsearch/dsl/response/__init__.py +388 -0
- elasticsearch/dsl/response/aggs.py +100 -0
- elasticsearch/dsl/response/hit.py +53 -0
- elasticsearch/dsl/search.py +20 -0
- elasticsearch/dsl/search_base.py +1053 -0
- elasticsearch/dsl/serializer.py +34 -0
- elasticsearch/dsl/types.py +6453 -0
- elasticsearch/dsl/update_by_query.py +19 -0
- elasticsearch/dsl/update_by_query_base.py +149 -0
- elasticsearch/dsl/utils.py +687 -0
- elasticsearch/dsl/wrappers.py +144 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_async/strategies.py +12 -12
- elasticsearch/helpers/vectorstore/_sync/strategies.py +12 -12
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/METADATA +12 -15
- elasticsearch-9.0.0.dist-info/RECORD +160 -0
- elasticsearch/transport.py +0 -57
- elasticsearch-8.17.1.dist-info/RECORD +0 -119
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-9.0.0.dist-info}/licenses/NOTICE +0 -0
|
@@ -39,9 +39,12 @@ class SqlClient(NamespacedClient):
|
|
|
39
39
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
40
40
|
) -> ObjectApiResponse[t.Any]:
|
|
41
41
|
"""
|
|
42
|
-
|
|
42
|
+
.. raw:: html
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
<p>Clear an SQL search cursor.</p>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-clear-cursor>`_
|
|
45
48
|
|
|
46
49
|
:param cursor: Cursor to clear.
|
|
47
50
|
"""
|
|
@@ -84,13 +87,19 @@ class SqlClient(NamespacedClient):
|
|
|
84
87
|
pretty: t.Optional[bool] = None,
|
|
85
88
|
) -> ObjectApiResponse[t.Any]:
|
|
86
89
|
"""
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
.. raw:: html
|
|
91
|
+
|
|
92
|
+
<p>Delete an async SQL search.
|
|
93
|
+
Delete an async SQL search or a stored synchronous SQL search.
|
|
94
|
+
If the search is still running, the API cancels it.</p>
|
|
95
|
+
<p>If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:</p>
|
|
96
|
+
<ul>
|
|
97
|
+
<li>Users with the <code>cancel_task</code> cluster privilege.</li>
|
|
98
|
+
<li>The user who first submitted the search.</li>
|
|
99
|
+
</ul>
|
|
92
100
|
|
|
93
|
-
|
|
101
|
+
|
|
102
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-delete-async>`_
|
|
94
103
|
|
|
95
104
|
:param id: The identifier for the search.
|
|
96
105
|
"""
|
|
@@ -134,12 +143,14 @@ class SqlClient(NamespacedClient):
|
|
|
134
143
|
] = None,
|
|
135
144
|
) -> ObjectApiResponse[t.Any]:
|
|
136
145
|
"""
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
146
|
+
.. raw:: html
|
|
147
|
+
|
|
148
|
+
<p>Get async SQL search results.
|
|
149
|
+
Get the current status and available results for an async SQL search or stored synchronous SQL search.</p>
|
|
150
|
+
<p>If the Elasticsearch security features are enabled, only the user who first submitted the SQL search can retrieve the search using this API.</p>
|
|
151
|
+
|
|
141
152
|
|
|
142
|
-
`<https://www.elastic.co/
|
|
153
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-get-async>`_
|
|
143
154
|
|
|
144
155
|
:param id: The identifier for the search.
|
|
145
156
|
:param delimiter: The separator for CSV results. The API supports this parameter
|
|
@@ -195,10 +206,13 @@ class SqlClient(NamespacedClient):
|
|
|
195
206
|
pretty: t.Optional[bool] = None,
|
|
196
207
|
) -> ObjectApiResponse[t.Any]:
|
|
197
208
|
"""
|
|
198
|
-
|
|
199
|
-
or a stored synchronous SQL search.
|
|
209
|
+
.. raw:: html
|
|
200
210
|
|
|
201
|
-
|
|
211
|
+
<p>Get the async SQL search status.
|
|
212
|
+
Get the current status of an async SQL search or a stored synchronous SQL search.</p>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-get-async-status>`_
|
|
202
216
|
|
|
203
217
|
:param id: The identifier for the search.
|
|
204
218
|
"""
|
|
@@ -281,9 +295,13 @@ class SqlClient(NamespacedClient):
|
|
|
281
295
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
282
296
|
) -> ObjectApiResponse[t.Any]:
|
|
283
297
|
"""
|
|
284
|
-
|
|
298
|
+
.. raw:: html
|
|
299
|
+
|
|
300
|
+
<p>Get SQL search results.
|
|
301
|
+
Run an SQL request.</p>
|
|
285
302
|
|
|
286
|
-
|
|
303
|
+
|
|
304
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-query>`_
|
|
287
305
|
|
|
288
306
|
:param allow_partial_search_results: If `true`, the response has partial results
|
|
289
307
|
when there are shard request timeouts or shard failures. If `false`, the
|
|
@@ -402,11 +420,14 @@ class SqlClient(NamespacedClient):
|
|
|
402
420
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
403
421
|
) -> ObjectApiResponse[t.Any]:
|
|
404
422
|
"""
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
423
|
+
.. raw:: html
|
|
424
|
+
|
|
425
|
+
<p>Translate SQL into Elasticsearch queries.
|
|
426
|
+
Translate an SQL search into a search API request containing Query DSL.
|
|
427
|
+
It accepts the same request body parameters as the SQL search API, excluding <code>cursor</code>.</p>
|
|
428
|
+
|
|
408
429
|
|
|
409
|
-
`<https://www.elastic.co/
|
|
430
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-sql-translate>`_
|
|
410
431
|
|
|
411
432
|
:param query: The SQL query to run.
|
|
412
433
|
:param fetch_size: The maximum number of rows (or entries) to return in one response.
|
|
@@ -35,25 +35,24 @@ class SslClient(NamespacedClient):
|
|
|
35
35
|
pretty: t.Optional[bool] = None,
|
|
36
36
|
) -> ObjectApiResponse[t.Any]:
|
|
37
37
|
"""
|
|
38
|
-
|
|
39
|
-
to encrypt communications in the cluster. The API returns a list that includes
|
|
40
|
-
certificates from all TLS contexts including: - Settings for transport and HTTP
|
|
41
|
-
interfaces - TLS settings that are used within authentication realms - TLS settings
|
|
42
|
-
for remote monitoring exporters The list includes certificates that are used
|
|
43
|
-
for configuring trust, such as those configured in the `xpack.security.transport.ssl.truststore`
|
|
44
|
-
and `xpack.security.transport.ssl.certificate_authorities` settings. It also
|
|
45
|
-
includes certificates that are used for configuring server identity, such as
|
|
46
|
-
`xpack.security.http.ssl.keystore` and `xpack.security.http.ssl.certificate settings`.
|
|
47
|
-
The list does not include certificates that are sourced from the default SSL
|
|
48
|
-
context of the Java Runtime Environment (JRE), even if those certificates are
|
|
49
|
-
in use within Elasticsearch. NOTE: When a PKCS#11 token is configured as the
|
|
50
|
-
truststore of the JRE, the API returns all the certificates that are included
|
|
51
|
-
in the PKCS#11 token irrespective of whether these are used in the Elasticsearch
|
|
52
|
-
TLS configuration. If Elasticsearch is configured to use a keystore or truststore,
|
|
53
|
-
the API output includes all certificates in that store, even though some of the
|
|
54
|
-
certificates might not be in active use within the cluster.
|
|
38
|
+
.. raw:: html
|
|
55
39
|
|
|
56
|
-
|
|
40
|
+
<p>Get SSL certificates.</p>
|
|
41
|
+
<p>Get information about the X.509 certificates that are used to encrypt communications in the cluster.
|
|
42
|
+
The API returns a list that includes certificates from all TLS contexts including:</p>
|
|
43
|
+
<ul>
|
|
44
|
+
<li>Settings for transport and HTTP interfaces</li>
|
|
45
|
+
<li>TLS settings that are used within authentication realms</li>
|
|
46
|
+
<li>TLS settings for remote monitoring exporters</li>
|
|
47
|
+
</ul>
|
|
48
|
+
<p>The list includes certificates that are used for configuring trust, such as those configured in the <code>xpack.security.transport.ssl.truststore</code> and <code>xpack.security.transport.ssl.certificate_authorities</code> settings.
|
|
49
|
+
It also includes certificates that are used for configuring server identity, such as <code>xpack.security.http.ssl.keystore</code> and <code>xpack.security.http.ssl.certificate settings</code>.</p>
|
|
50
|
+
<p>The list does not include certificates that are sourced from the default SSL context of the Java Runtime Environment (JRE), even if those certificates are in use within Elasticsearch.</p>
|
|
51
|
+
<p>NOTE: When a PKCS#11 token is configured as the truststore of the JRE, the API returns all the certificates that are included in the PKCS#11 token irrespective of whether these are used in the Elasticsearch TLS configuration.</p>
|
|
52
|
+
<p>If Elasticsearch is configured to use a keystore or truststore, the API output includes all certificates in that store, even though some of the certificates might not be in active use within the cluster.</p>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-ssl-certificates>`_
|
|
57
56
|
"""
|
|
58
57
|
__path_parts: t.Dict[str, str] = {}
|
|
59
58
|
__path = "/_ssl/certificates"
|
|
@@ -36,23 +36,24 @@ class SynonymsClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
.. raw:: html
|
|
40
|
+
|
|
41
|
+
<p>Delete a synonym set.</p>
|
|
42
|
+
<p>You can only delete a synonyms set that is not in use by any index analyzer.</p>
|
|
43
|
+
<p>Synonyms sets can be used in synonym graph token filters and synonym token filters.
|
|
44
|
+
These synonym filters can be used as part of search analyzers.</p>
|
|
45
|
+
<p>Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).
|
|
46
|
+
Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.</p>
|
|
47
|
+
<p>If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.
|
|
48
|
+
To prevent that, synonyms sets that are used in analyzers can't be deleted.
|
|
49
|
+
A delete request in this case will return a 400 response code.</p>
|
|
50
|
+
<p>To remove a synonyms set, you must first remove all indices that contain analyzers using it.
|
|
51
|
+
You can migrate an index by creating a new index that does not contain the token filter with the synonyms set, and use the reindex API in order to copy over the index data.
|
|
52
|
+
Once finished, you can delete the index.
|
|
53
|
+
When the synonyms set is not used in analyzers, you will be able to delete it.</p>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-delete-synonym>`_
|
|
56
57
|
|
|
57
58
|
:param id: The synonyms set identifier to delete.
|
|
58
59
|
"""
|
|
@@ -91,9 +92,13 @@ class SynonymsClient(NamespacedClient):
|
|
|
91
92
|
pretty: t.Optional[bool] = None,
|
|
92
93
|
) -> ObjectApiResponse[t.Any]:
|
|
93
94
|
"""
|
|
94
|
-
|
|
95
|
+
.. raw:: html
|
|
96
|
+
|
|
97
|
+
<p>Delete a synonym rule.
|
|
98
|
+
Delete a synonym rule from a synonym set.</p>
|
|
95
99
|
|
|
96
|
-
|
|
100
|
+
|
|
101
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-delete-synonym-rule>`_
|
|
97
102
|
|
|
98
103
|
:param set_id: The ID of the synonym set to update.
|
|
99
104
|
:param rule_id: The ID of the synonym rule to delete.
|
|
@@ -141,9 +146,12 @@ class SynonymsClient(NamespacedClient):
|
|
|
141
146
|
size: t.Optional[int] = None,
|
|
142
147
|
) -> ObjectApiResponse[t.Any]:
|
|
143
148
|
"""
|
|
144
|
-
|
|
149
|
+
.. raw:: html
|
|
150
|
+
|
|
151
|
+
<p>Get a synonym set.</p>
|
|
145
152
|
|
|
146
|
-
|
|
153
|
+
|
|
154
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym>`_
|
|
147
155
|
|
|
148
156
|
:param id: The synonyms set identifier to retrieve.
|
|
149
157
|
:param from_: The starting offset for query rules to retrieve.
|
|
@@ -188,9 +196,13 @@ class SynonymsClient(NamespacedClient):
|
|
|
188
196
|
pretty: t.Optional[bool] = None,
|
|
189
197
|
) -> ObjectApiResponse[t.Any]:
|
|
190
198
|
"""
|
|
191
|
-
|
|
199
|
+
.. raw:: html
|
|
200
|
+
|
|
201
|
+
<p>Get a synonym rule.
|
|
202
|
+
Get a synonym rule from a synonym set.</p>
|
|
192
203
|
|
|
193
|
-
|
|
204
|
+
|
|
205
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym-rule>`_
|
|
194
206
|
|
|
195
207
|
:param set_id: The ID of the synonym set to retrieve the synonym rule from.
|
|
196
208
|
:param rule_id: The ID of the synonym rule to retrieve.
|
|
@@ -237,9 +249,13 @@ class SynonymsClient(NamespacedClient):
|
|
|
237
249
|
size: t.Optional[int] = None,
|
|
238
250
|
) -> ObjectApiResponse[t.Any]:
|
|
239
251
|
"""
|
|
240
|
-
|
|
252
|
+
.. raw:: html
|
|
253
|
+
|
|
254
|
+
<p>Get all synonym sets.
|
|
255
|
+
Get a summary of all defined synonym sets.</p>
|
|
241
256
|
|
|
242
|
-
|
|
257
|
+
|
|
258
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-get-synonym>`_
|
|
243
259
|
|
|
244
260
|
:param from_: The starting offset for synonyms sets to retrieve.
|
|
245
261
|
:param size: The maximum number of synonyms sets to retrieve.
|
|
@@ -286,14 +302,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
286
302
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
287
303
|
) -> ObjectApiResponse[t.Any]:
|
|
288
304
|
"""
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
305
|
+
.. raw:: html
|
|
306
|
+
|
|
307
|
+
<p>Create or update a synonym set.
|
|
308
|
+
Synonyms sets are limited to a maximum of 10,000 synonym rules per set.
|
|
309
|
+
If you need to manage more synonym rules, you can create multiple synonym sets.</p>
|
|
310
|
+
<p>When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.
|
|
311
|
+
This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.</p>
|
|
295
312
|
|
|
296
|
-
|
|
313
|
+
|
|
314
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-put-synonym>`_
|
|
297
315
|
|
|
298
316
|
:param id: The ID of the synonyms set to be created or updated.
|
|
299
317
|
:param synonyms_set: The synonym rules definitions for the synonyms set.
|
|
@@ -344,12 +362,15 @@ class SynonymsClient(NamespacedClient):
|
|
|
344
362
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
345
363
|
) -> ObjectApiResponse[t.Any]:
|
|
346
364
|
"""
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
365
|
+
.. raw:: html
|
|
366
|
+
|
|
367
|
+
<p>Create or update a synonym rule.
|
|
368
|
+
Create or update a synonym rule in a synonym set.</p>
|
|
369
|
+
<p>If any of the synonym rules included is invalid, the API returns an error.</p>
|
|
370
|
+
<p>When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.</p>
|
|
371
|
+
|
|
351
372
|
|
|
352
|
-
`<https://www.elastic.co/
|
|
373
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-synonyms-put-synonym-rule>`_
|
|
353
374
|
|
|
354
375
|
:param set_id: The ID of the synonym set.
|
|
355
376
|
:param rule_id: The ID of the synonym rule to be updated or created.
|
|
@@ -47,21 +47,20 @@ class TasksClient(NamespacedClient):
|
|
|
47
47
|
wait_for_completion: t.Optional[bool] = None,
|
|
48
48
|
) -> ObjectApiResponse[t.Any]:
|
|
49
49
|
"""
|
|
50
|
-
|
|
51
|
-
a beta feature. The API may change in ways that are not backwards compatible.
|
|
52
|
-
A task may continue to run for some time after it has been cancelled because
|
|
53
|
-
it may not be able to safely stop its current activity straight away. It is also
|
|
54
|
-
possible that Elasticsearch must complete its work on other tasks before it can
|
|
55
|
-
process the cancellation. The get task information API will continue to list
|
|
56
|
-
these cancelled tasks until they complete. The cancelled flag in the response
|
|
57
|
-
indicates that the cancellation command has been processed and the task will
|
|
58
|
-
stop as soon as possible. To troubleshoot why a cancelled task does not complete
|
|
59
|
-
promptly, use the get task information API with the `?detailed` parameter to
|
|
60
|
-
identify the other tasks the system is running. You can also use the node hot
|
|
61
|
-
threads API to obtain detailed information about the work the system is doing
|
|
62
|
-
instead of completing the cancelled task.
|
|
50
|
+
.. raw:: html
|
|
63
51
|
|
|
64
|
-
|
|
52
|
+
<p>Cancel a task.</p>
|
|
53
|
+
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
54
|
+
The API may change in ways that are not backwards compatible.</p>
|
|
55
|
+
<p>A task may continue to run for some time after it has been cancelled because it may not be able to safely stop its current activity straight away.
|
|
56
|
+
It is also possible that Elasticsearch must complete its work on other tasks before it can process the cancellation.
|
|
57
|
+
The get task information API will continue to list these cancelled tasks until they complete.
|
|
58
|
+
The cancelled flag in the response indicates that the cancellation command has been processed and the task will stop as soon as possible.</p>
|
|
59
|
+
<p>To troubleshoot why a cancelled task does not complete promptly, use the get task information API with the <code>?detailed</code> parameter to identify the other tasks the system is running.
|
|
60
|
+
You can also use the node hot threads API to obtain detailed information about the work the system is doing instead of completing the cancelled task.</p>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
|
|
65
64
|
|
|
66
65
|
:param task_id: The task identifier.
|
|
67
66
|
:param actions: A comma-separated list or wildcard expression of actions that
|
|
@@ -120,13 +119,16 @@ class TasksClient(NamespacedClient):
|
|
|
120
119
|
wait_for_completion: t.Optional[bool] = None,
|
|
121
120
|
) -> ObjectApiResponse[t.Any]:
|
|
122
121
|
"""
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
.. raw:: html
|
|
123
|
+
|
|
124
|
+
<p>Get task information.
|
|
125
|
+
Get information about a task currently running in the cluster.</p>
|
|
126
|
+
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
127
|
+
The API may change in ways that are not backwards compatible.</p>
|
|
128
|
+
<p>If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.</p>
|
|
129
|
+
|
|
128
130
|
|
|
129
|
-
`<https://www.elastic.co/
|
|
131
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
|
|
130
132
|
|
|
131
133
|
:param task_id: The task identifier.
|
|
132
134
|
:param timeout: The period to wait for a response. If no response is received
|
|
@@ -174,7 +176,6 @@ class TasksClient(NamespacedClient):
|
|
|
174
176
|
t.Union[str, t.Literal["nodes", "none", "parents"]]
|
|
175
177
|
] = None,
|
|
176
178
|
human: t.Optional[bool] = None,
|
|
177
|
-
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
178
179
|
nodes: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
179
180
|
parent_task_id: t.Optional[str] = None,
|
|
180
181
|
pretty: t.Optional[bool] = None,
|
|
@@ -182,29 +183,62 @@ class TasksClient(NamespacedClient):
|
|
|
182
183
|
wait_for_completion: t.Optional[bool] = None,
|
|
183
184
|
) -> ObjectApiResponse[t.Any]:
|
|
184
185
|
"""
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
186
|
+
.. raw:: html
|
|
187
|
+
|
|
188
|
+
<p>Get all tasks.
|
|
189
|
+
Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
190
|
+
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
191
|
+
The API may change in ways that are not backwards compatible.</p>
|
|
192
|
+
<p><strong>Identifying running tasks</strong></p>
|
|
193
|
+
<p>The <code>X-Opaque-Id header</code>, when provided on the HTTP request header, is going to be returned as a header in the response as well as in the headers field for in the task information.
|
|
194
|
+
This enables you to track certain calls or associate certain tasks with the client that started them.
|
|
195
|
+
For example:</p>
|
|
196
|
+
<pre><code>curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents"
|
|
197
|
+
</code></pre>
|
|
198
|
+
<p>The API returns the following result:</p>
|
|
199
|
+
<pre><code>HTTP/1.1 200 OK
|
|
200
|
+
X-Opaque-Id: 123456
|
|
201
|
+
content-type: application/json; charset=UTF-8
|
|
202
|
+
content-length: 831
|
|
203
|
+
|
|
204
|
+
{
|
|
205
|
+
"tasks" : {
|
|
206
|
+
"u5lcZHqcQhu-rUoFaqDphA:45" : {
|
|
207
|
+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
|
|
208
|
+
"id" : 45,
|
|
209
|
+
"type" : "transport",
|
|
210
|
+
"action" : "cluster:monitor/tasks/lists",
|
|
211
|
+
"start_time_in_millis" : 1513823752749,
|
|
212
|
+
"running_time_in_nanos" : 293139,
|
|
213
|
+
"cancellable" : false,
|
|
214
|
+
"headers" : {
|
|
215
|
+
"X-Opaque-Id" : "123456"
|
|
216
|
+
},
|
|
217
|
+
"children" : [
|
|
218
|
+
{
|
|
219
|
+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
|
|
220
|
+
"id" : 46,
|
|
221
|
+
"type" : "direct",
|
|
222
|
+
"action" : "cluster:monitor/tasks/lists[n]",
|
|
223
|
+
"start_time_in_millis" : 1513823752750,
|
|
224
|
+
"running_time_in_nanos" : 92133,
|
|
225
|
+
"cancellable" : false,
|
|
226
|
+
"parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45",
|
|
227
|
+
"headers" : {
|
|
228
|
+
"X-Opaque-Id" : "123456"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
</code></pre>
|
|
236
|
+
<p>In this example, <code>X-Opaque-Id: 123456</code> is the ID as a part of the response header.
|
|
237
|
+
The <code>X-Opaque-Id</code> in the task <code>headers</code> is the ID for the task that was initiated by the REST request.
|
|
238
|
+
The <code>X-Opaque-Id</code> in the children <code>headers</code> is the child task of the task that was initiated by the REST request.</p>
|
|
239
|
+
|
|
206
240
|
|
|
207
|
-
`<https://www.elastic.co/
|
|
241
|
+
`<https://www.elastic.co/docs/api/doc/elasticsearch/v9/group/endpoint-tasks>`_
|
|
208
242
|
|
|
209
243
|
:param actions: A comma-separated list or wildcard expression of actions used
|
|
210
244
|
to limit the request. For example, you can use `cluser:*` to retrieve all
|
|
@@ -214,9 +248,6 @@ class TasksClient(NamespacedClient):
|
|
|
214
248
|
other but is more costly to run.
|
|
215
249
|
:param group_by: A key that is used to group tasks in the response. The task
|
|
216
250
|
lists can be grouped either by nodes or by parent tasks.
|
|
217
|
-
:param master_timeout: The period to wait for a connection to the master node.
|
|
218
|
-
If no response is received before the timeout expires, the request fails
|
|
219
|
-
and returns an error.
|
|
220
251
|
:param nodes: A comma-separated list of node IDs or names that is used to limit
|
|
221
252
|
the returned information.
|
|
222
253
|
:param parent_task_id: A parent task identifier that is used to limit returned
|
|
@@ -243,8 +274,6 @@ class TasksClient(NamespacedClient):
|
|
|
243
274
|
__query["group_by"] = group_by
|
|
244
275
|
if human is not None:
|
|
245
276
|
__query["human"] = human
|
|
246
|
-
if master_timeout is not None:
|
|
247
|
-
__query["master_timeout"] = master_timeout
|
|
248
277
|
if nodes is not None:
|
|
249
278
|
__query["nodes"] = nodes
|
|
250
279
|
if parent_task_id is not None:
|