elasticsearch 8.17.0__py3-none-any.whl → 8.17.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +2034 -740
- elasticsearch/_async/client/async_search.py +33 -22
- elasticsearch/_async/client/autoscaling.py +27 -21
- elasticsearch/_async/client/cat.py +280 -336
- elasticsearch/_async/client/ccr.py +96 -70
- elasticsearch/_async/client/cluster.py +152 -144
- elasticsearch/_async/client/connector.py +488 -55
- elasticsearch/_async/client/dangling_indices.py +22 -16
- elasticsearch/_async/client/enrich.py +25 -6
- elasticsearch/_async/client/eql.py +22 -9
- elasticsearch/_async/client/esql.py +295 -3
- elasticsearch/_async/client/features.py +25 -25
- elasticsearch/_async/client/fleet.py +15 -9
- elasticsearch/_async/client/graph.py +9 -8
- elasticsearch/_async/client/ilm.py +91 -61
- elasticsearch/_async/client/indices.py +746 -324
- elasticsearch/_async/client/inference.py +101 -4
- elasticsearch/_async/client/ingest.py +231 -19
- elasticsearch/_async/client/license.py +48 -31
- elasticsearch/_async/client/logstash.py +20 -6
- elasticsearch/_async/client/migration.py +25 -7
- elasticsearch/_async/client/ml.py +532 -278
- elasticsearch/_async/client/monitoring.py +5 -1
- elasticsearch/_async/client/nodes.py +46 -30
- elasticsearch/_async/client/query_rules.py +65 -18
- elasticsearch/_async/client/rollup.py +126 -13
- elasticsearch/_async/client/search_application.py +170 -13
- elasticsearch/_async/client/searchable_snapshots.py +45 -23
- elasticsearch/_async/client/security.py +1299 -340
- elasticsearch/_async/client/shutdown.py +43 -15
- elasticsearch/_async/client/simulate.py +145 -0
- elasticsearch/_async/client/slm.py +163 -19
- elasticsearch/_async/client/snapshot.py +288 -23
- elasticsearch/_async/client/sql.py +94 -53
- elasticsearch/_async/client/ssl.py +16 -17
- elasticsearch/_async/client/synonyms.py +67 -26
- elasticsearch/_async/client/tasks.py +103 -28
- elasticsearch/_async/client/text_structure.py +475 -46
- elasticsearch/_async/client/transform.py +108 -72
- elasticsearch/_async/client/watcher.py +245 -43
- elasticsearch/_async/client/xpack.py +20 -6
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_sync/client/__init__.py +2034 -740
- elasticsearch/_sync/client/async_search.py +33 -22
- elasticsearch/_sync/client/autoscaling.py +27 -21
- elasticsearch/_sync/client/cat.py +280 -336
- elasticsearch/_sync/client/ccr.py +96 -70
- elasticsearch/_sync/client/cluster.py +152 -144
- elasticsearch/_sync/client/connector.py +488 -55
- elasticsearch/_sync/client/dangling_indices.py +22 -16
- elasticsearch/_sync/client/enrich.py +25 -6
- elasticsearch/_sync/client/eql.py +22 -9
- elasticsearch/_sync/client/esql.py +295 -3
- elasticsearch/_sync/client/features.py +25 -25
- elasticsearch/_sync/client/fleet.py +15 -9
- elasticsearch/_sync/client/graph.py +9 -8
- elasticsearch/_sync/client/ilm.py +91 -61
- elasticsearch/_sync/client/indices.py +746 -324
- elasticsearch/_sync/client/inference.py +101 -4
- elasticsearch/_sync/client/ingest.py +231 -19
- elasticsearch/_sync/client/license.py +48 -31
- elasticsearch/_sync/client/logstash.py +20 -6
- elasticsearch/_sync/client/migration.py +25 -7
- elasticsearch/_sync/client/ml.py +532 -278
- elasticsearch/_sync/client/monitoring.py +5 -1
- elasticsearch/_sync/client/nodes.py +46 -30
- elasticsearch/_sync/client/query_rules.py +65 -18
- elasticsearch/_sync/client/rollup.py +126 -13
- elasticsearch/_sync/client/search_application.py +170 -13
- elasticsearch/_sync/client/searchable_snapshots.py +45 -23
- elasticsearch/_sync/client/security.py +1299 -340
- elasticsearch/_sync/client/shutdown.py +43 -15
- elasticsearch/_sync/client/simulate.py +145 -0
- elasticsearch/_sync/client/slm.py +163 -19
- elasticsearch/_sync/client/snapshot.py +288 -23
- elasticsearch/_sync/client/sql.py +94 -53
- elasticsearch/_sync/client/ssl.py +16 -17
- elasticsearch/_sync/client/synonyms.py +67 -26
- elasticsearch/_sync/client/tasks.py +103 -28
- elasticsearch/_sync/client/text_structure.py +475 -46
- elasticsearch/_sync/client/transform.py +108 -72
- elasticsearch/_sync/client/utils.py +1 -1
- elasticsearch/_sync/client/watcher.py +245 -43
- elasticsearch/_sync/client/xpack.py +20 -6
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +4 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
- elasticsearch-8.17.2.dist-info/RECORD +119 -0
- elasticsearch-8.17.0.dist-info/RECORD +0 -117
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
|
@@ -39,7 +39,10 @@ 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
|
+
|
|
44
|
+
<p>Clear an SQL search cursor.</p>
|
|
45
|
+
|
|
43
46
|
|
|
44
47
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-sql-cursor-api.html>`_
|
|
45
48
|
|
|
@@ -84,12 +87,21 @@ class SqlClient(NamespacedClient):
|
|
|
84
87
|
pretty: t.Optional[bool] = None,
|
|
85
88
|
) -> ObjectApiResponse[t.Any]:
|
|
86
89
|
"""
|
|
87
|
-
|
|
88
|
-
|
|
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>
|
|
100
|
+
|
|
89
101
|
|
|
90
102
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-async-sql-search-api.html>`_
|
|
91
103
|
|
|
92
|
-
:param id:
|
|
104
|
+
:param id: The identifier for the search.
|
|
93
105
|
"""
|
|
94
106
|
if id in SKIP_IN_PATH:
|
|
95
107
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -131,21 +143,26 @@ class SqlClient(NamespacedClient):
|
|
|
131
143
|
] = None,
|
|
132
144
|
) -> ObjectApiResponse[t.Any]:
|
|
133
145
|
"""
|
|
134
|
-
|
|
135
|
-
|
|
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
|
+
|
|
136
152
|
|
|
137
153
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-sql-search-api.html>`_
|
|
138
154
|
|
|
139
|
-
:param id:
|
|
140
|
-
:param delimiter:
|
|
141
|
-
for CSV responses.
|
|
142
|
-
:param format:
|
|
143
|
-
parameter or the Accept HTTP header. If you specify both, the API uses
|
|
144
|
-
parameter.
|
|
145
|
-
:param keep_alive:
|
|
155
|
+
:param id: The identifier for the search.
|
|
156
|
+
:param delimiter: The separator for CSV results. The API supports this parameter
|
|
157
|
+
only for CSV responses.
|
|
158
|
+
:param format: The format for the response. You must specify a format using this
|
|
159
|
+
parameter or the `Accept` HTTP header. If you specify both, the API uses
|
|
160
|
+
this parameter.
|
|
161
|
+
:param keep_alive: The retention period for the search and its results. It defaults
|
|
146
162
|
to the `keep_alive` period for the original SQL search.
|
|
147
|
-
:param wait_for_completion_timeout:
|
|
148
|
-
to no timeout, meaning the request waits for complete search
|
|
163
|
+
:param wait_for_completion_timeout: The period to wait for complete results.
|
|
164
|
+
It defaults to no timeout, meaning the request waits for complete search
|
|
165
|
+
results.
|
|
149
166
|
"""
|
|
150
167
|
if id in SKIP_IN_PATH:
|
|
151
168
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -189,12 +206,15 @@ class SqlClient(NamespacedClient):
|
|
|
189
206
|
pretty: t.Optional[bool] = None,
|
|
190
207
|
) -> ObjectApiResponse[t.Any]:
|
|
191
208
|
"""
|
|
192
|
-
|
|
193
|
-
|
|
209
|
+
.. raw:: html
|
|
210
|
+
|
|
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
|
+
|
|
194
214
|
|
|
195
215
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-sql-search-status-api.html>`_
|
|
196
216
|
|
|
197
|
-
:param id:
|
|
217
|
+
:param id: The identifier for the search.
|
|
198
218
|
"""
|
|
199
219
|
if id in SKIP_IN_PATH:
|
|
200
220
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -221,6 +241,7 @@ class SqlClient(NamespacedClient):
|
|
|
221
241
|
|
|
222
242
|
@_rewrite_parameters(
|
|
223
243
|
body_fields=(
|
|
244
|
+
"allow_partial_search_results",
|
|
224
245
|
"catalog",
|
|
225
246
|
"columnar",
|
|
226
247
|
"cursor",
|
|
@@ -243,6 +264,7 @@ class SqlClient(NamespacedClient):
|
|
|
243
264
|
async def query(
|
|
244
265
|
self,
|
|
245
266
|
*,
|
|
267
|
+
allow_partial_search_results: t.Optional[bool] = None,
|
|
246
268
|
catalog: t.Optional[str] = None,
|
|
247
269
|
columnar: t.Optional[bool] = None,
|
|
248
270
|
cursor: t.Optional[str] = None,
|
|
@@ -273,40 +295,53 @@ class SqlClient(NamespacedClient):
|
|
|
273
295
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
274
296
|
) -> ObjectApiResponse[t.Any]:
|
|
275
297
|
"""
|
|
276
|
-
|
|
298
|
+
.. raw:: html
|
|
299
|
+
|
|
300
|
+
<p>Get SQL search results.
|
|
301
|
+
Run an SQL request.</p>
|
|
302
|
+
|
|
277
303
|
|
|
278
304
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/sql-search-api.html>`_
|
|
279
305
|
|
|
280
|
-
:param
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
:param
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
:param
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
:param
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
:param
|
|
301
|
-
:param
|
|
302
|
-
|
|
306
|
+
:param allow_partial_search_results: If `true`, the response has partial results
|
|
307
|
+
when there are shard request timeouts or shard failures. If `false`, the
|
|
308
|
+
API returns an error with no partial results.
|
|
309
|
+
:param catalog: The default catalog (cluster) for queries. If unspecified, the
|
|
310
|
+
queries execute on the data in the local cluster only.
|
|
311
|
+
:param columnar: If `true`, the results are in a columnar fashion: one row represents
|
|
312
|
+
all the values of a certain column from the current page of results. The
|
|
313
|
+
API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.
|
|
314
|
+
:param cursor: The cursor used to retrieve a set of paginated results. If you
|
|
315
|
+
specify a cursor, the API only uses the `columnar` and `time_zone` request
|
|
316
|
+
body parameters. It ignores other request body parameters.
|
|
317
|
+
:param fetch_size: The maximum number of rows (or entries) to return in one response.
|
|
318
|
+
:param field_multi_value_leniency: If `false`, the API returns an exception when
|
|
319
|
+
encountering multiple values for a field. If `true`, the API is lenient and
|
|
320
|
+
returns the first value from the array with no guarantee of consistent results.
|
|
321
|
+
:param filter: The Elasticsearch query DSL for additional filtering.
|
|
322
|
+
:param format: The format for the response. You can also specify a format using
|
|
323
|
+
the `Accept` HTTP header. If you specify both this parameter and the `Accept`
|
|
324
|
+
HTTP header, this parameter takes precedence.
|
|
325
|
+
:param index_using_frozen: If `true`, the search can run on frozen indices.
|
|
326
|
+
:param keep_alive: The retention period for an async or saved synchronous search.
|
|
327
|
+
:param keep_on_completion: If `true`, Elasticsearch stores synchronous searches
|
|
328
|
+
if you also specify the `wait_for_completion_timeout` parameter. If `false`,
|
|
329
|
+
Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.
|
|
330
|
+
:param page_timeout: The minimum retention period for the scroll cursor. After
|
|
331
|
+
this time period, a pagination request might fail because the scroll cursor
|
|
332
|
+
is no longer available. Subsequent scroll requests prolong the lifetime of
|
|
333
|
+
the scroll cursor by the duration of `page_timeout` in the scroll request.
|
|
334
|
+
:param params: The values for parameters in the query.
|
|
335
|
+
:param query: The SQL query to run.
|
|
303
336
|
:param request_timeout: The timeout before the request fails.
|
|
304
|
-
:param runtime_mappings:
|
|
305
|
-
|
|
306
|
-
:param time_zone: ISO-8601 time zone ID for the search.
|
|
307
|
-
:param wait_for_completion_timeout:
|
|
308
|
-
to no timeout, meaning the request waits for complete search
|
|
309
|
-
the search doesn
|
|
337
|
+
:param runtime_mappings: One or more runtime fields for the search request. These
|
|
338
|
+
fields take precedence over mapped fields with the same name.
|
|
339
|
+
:param time_zone: The ISO-8601 time zone ID for the search.
|
|
340
|
+
:param wait_for_completion_timeout: The period to wait for complete results.
|
|
341
|
+
It defaults to no timeout, meaning the request waits for complete search
|
|
342
|
+
results. If the search doesn't finish within this period, the search becomes
|
|
343
|
+
async. To save a synchronous search, you must specify this parameter and
|
|
344
|
+
the `keep_on_completion` parameter.
|
|
310
345
|
"""
|
|
311
346
|
__path_parts: t.Dict[str, str] = {}
|
|
312
347
|
__path = "/_sql"
|
|
@@ -323,6 +358,8 @@ class SqlClient(NamespacedClient):
|
|
|
323
358
|
if pretty is not None:
|
|
324
359
|
__query["pretty"] = pretty
|
|
325
360
|
if not __body:
|
|
361
|
+
if allow_partial_search_results is not None:
|
|
362
|
+
__body["allow_partial_search_results"] = allow_partial_search_results
|
|
326
363
|
if catalog is not None:
|
|
327
364
|
__body["catalog"] = catalog
|
|
328
365
|
if columnar is not None:
|
|
@@ -383,15 +420,19 @@ class SqlClient(NamespacedClient):
|
|
|
383
420
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
384
421
|
) -> ObjectApiResponse[t.Any]:
|
|
385
422
|
"""
|
|
386
|
-
|
|
387
|
-
|
|
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
|
+
|
|
388
429
|
|
|
389
430
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/sql-translate-api.html>`_
|
|
390
431
|
|
|
391
|
-
:param query: SQL query to run.
|
|
432
|
+
:param query: The SQL query to run.
|
|
392
433
|
:param fetch_size: The maximum number of rows (or entries) to return in one response.
|
|
393
|
-
:param filter: Elasticsearch query DSL for additional filtering.
|
|
394
|
-
:param time_zone: ISO-8601 time zone ID for the search.
|
|
434
|
+
:param filter: The Elasticsearch query DSL for additional filtering.
|
|
435
|
+
:param time_zone: The ISO-8601 time zone ID for the search.
|
|
395
436
|
"""
|
|
396
437
|
if query is None and body is None:
|
|
397
438
|
raise ValueError("Empty value passed for parameter 'query'")
|
|
@@ -35,23 +35,22 @@ class SslClient(NamespacedClient):
|
|
|
35
35
|
pretty: t.Optional[bool] = None,
|
|
36
36
|
) -> ObjectApiResponse[t.Any]:
|
|
37
37
|
"""
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
certificates might not be in active use within the cluster.
|
|
38
|
+
.. raw:: html
|
|
39
|
+
|
|
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
|
+
|
|
55
54
|
|
|
56
55
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-ssl.html>`_
|
|
57
56
|
"""
|
|
@@ -36,11 +36,26 @@ class SynonymsClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
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
|
+
|
|
40
55
|
|
|
41
56
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-synonyms-set.html>`_
|
|
42
57
|
|
|
43
|
-
:param id: The
|
|
58
|
+
:param id: The synonyms set identifier to delete.
|
|
44
59
|
"""
|
|
45
60
|
if id in SKIP_IN_PATH:
|
|
46
61
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -77,12 +92,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
77
92
|
pretty: t.Optional[bool] = None,
|
|
78
93
|
) -> ObjectApiResponse[t.Any]:
|
|
79
94
|
"""
|
|
80
|
-
|
|
95
|
+
.. raw:: html
|
|
96
|
+
|
|
97
|
+
<p>Delete a synonym rule.
|
|
98
|
+
Delete a synonym rule from a synonym set.</p>
|
|
99
|
+
|
|
81
100
|
|
|
82
101
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-synonym-rule.html>`_
|
|
83
102
|
|
|
84
|
-
:param set_id: The
|
|
85
|
-
:param rule_id: The
|
|
103
|
+
:param set_id: The ID of the synonym set to update.
|
|
104
|
+
:param rule_id: The ID of the synonym rule to delete.
|
|
86
105
|
"""
|
|
87
106
|
if set_id in SKIP_IN_PATH:
|
|
88
107
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -127,13 +146,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
127
146
|
size: t.Optional[int] = None,
|
|
128
147
|
) -> ObjectApiResponse[t.Any]:
|
|
129
148
|
"""
|
|
130
|
-
|
|
149
|
+
.. raw:: html
|
|
150
|
+
|
|
151
|
+
<p>Get a synonym set.</p>
|
|
152
|
+
|
|
131
153
|
|
|
132
154
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonyms-set.html>`_
|
|
133
155
|
|
|
134
|
-
:param id:
|
|
135
|
-
:param from_:
|
|
136
|
-
:param size:
|
|
156
|
+
:param id: The synonyms set identifier to retrieve.
|
|
157
|
+
:param from_: The starting offset for query rules to retrieve.
|
|
158
|
+
:param size: The max number of query rules to retrieve.
|
|
137
159
|
"""
|
|
138
160
|
if id in SKIP_IN_PATH:
|
|
139
161
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -174,12 +196,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
174
196
|
pretty: t.Optional[bool] = None,
|
|
175
197
|
) -> ObjectApiResponse[t.Any]:
|
|
176
198
|
"""
|
|
177
|
-
|
|
199
|
+
.. raw:: html
|
|
200
|
+
|
|
201
|
+
<p>Get a synonym rule.
|
|
202
|
+
Get a synonym rule from a synonym set.</p>
|
|
203
|
+
|
|
178
204
|
|
|
179
205
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonym-rule.html>`_
|
|
180
206
|
|
|
181
|
-
:param set_id: The
|
|
182
|
-
:param rule_id: The
|
|
207
|
+
:param set_id: The ID of the synonym set to retrieve the synonym rule from.
|
|
208
|
+
:param rule_id: The ID of the synonym rule to retrieve.
|
|
183
209
|
"""
|
|
184
210
|
if set_id in SKIP_IN_PATH:
|
|
185
211
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -223,12 +249,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
223
249
|
size: t.Optional[int] = None,
|
|
224
250
|
) -> ObjectApiResponse[t.Any]:
|
|
225
251
|
"""
|
|
226
|
-
|
|
252
|
+
.. raw:: html
|
|
227
253
|
|
|
228
|
-
|
|
254
|
+
<p>Get all synonym sets.
|
|
255
|
+
Get a summary of all defined synonym sets.</p>
|
|
229
256
|
|
|
230
|
-
|
|
231
|
-
|
|
257
|
+
|
|
258
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonyms-set.html>`_
|
|
259
|
+
|
|
260
|
+
:param from_: The starting offset for synonyms sets to retrieve.
|
|
261
|
+
:param size: The maximum number of synonyms sets to retrieve.
|
|
232
262
|
"""
|
|
233
263
|
__path_parts: t.Dict[str, str] = {}
|
|
234
264
|
__path = "/_synonyms"
|
|
@@ -272,14 +302,19 @@ class SynonymsClient(NamespacedClient):
|
|
|
272
302
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
273
303
|
) -> ObjectApiResponse[t.Any]:
|
|
274
304
|
"""
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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>
|
|
312
|
+
|
|
278
313
|
|
|
279
314
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonyms-set.html>`_
|
|
280
315
|
|
|
281
|
-
:param id: The
|
|
282
|
-
:param synonyms_set: The synonym
|
|
316
|
+
:param id: The ID of the synonyms set to be created or updated.
|
|
317
|
+
:param synonyms_set: The synonym rules definitions for the synonyms set.
|
|
283
318
|
"""
|
|
284
319
|
if id in SKIP_IN_PATH:
|
|
285
320
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -327,14 +362,20 @@ class SynonymsClient(NamespacedClient):
|
|
|
327
362
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
328
363
|
) -> ObjectApiResponse[t.Any]:
|
|
329
364
|
"""
|
|
330
|
-
|
|
331
|
-
|
|
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
|
+
|
|
332
372
|
|
|
333
373
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonym-rule.html>`_
|
|
334
374
|
|
|
335
|
-
:param set_id: The
|
|
336
|
-
:param rule_id: The
|
|
337
|
-
:param synonyms:
|
|
375
|
+
:param set_id: The ID of the synonym set.
|
|
376
|
+
:param rule_id: The ID of the synonym rule to be updated or created.
|
|
377
|
+
:param synonyms: The synonym rule information definition, which must be in Solr
|
|
378
|
+
format.
|
|
338
379
|
"""
|
|
339
380
|
if set_id in SKIP_IN_PATH:
|
|
340
381
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -47,17 +47,29 @@ class TasksClient(NamespacedClient):
|
|
|
47
47
|
wait_for_completion: t.Optional[bool] = None,
|
|
48
48
|
) -> ObjectApiResponse[t.Any]:
|
|
49
49
|
"""
|
|
50
|
-
|
|
50
|
+
.. raw:: html
|
|
51
|
+
|
|
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
|
+
|
|
51
62
|
|
|
52
63
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
53
64
|
|
|
54
|
-
:param task_id:
|
|
55
|
-
:param actions:
|
|
56
|
-
limit the request.
|
|
57
|
-
:param nodes:
|
|
58
|
-
|
|
59
|
-
:param
|
|
60
|
-
|
|
65
|
+
:param task_id: The task identifier.
|
|
66
|
+
:param actions: A comma-separated list or wildcard expression of actions that
|
|
67
|
+
is used to limit the request.
|
|
68
|
+
:param nodes: A comma-separated list of node IDs or names that is used to limit
|
|
69
|
+
the request.
|
|
70
|
+
:param parent_task_id: A parent task ID that is used to limit the tasks.
|
|
71
|
+
:param wait_for_completion: If true, the request blocks until all found tasks
|
|
72
|
+
are complete.
|
|
61
73
|
"""
|
|
62
74
|
__path_parts: t.Dict[str, str]
|
|
63
75
|
if task_id not in SKIP_IN_PATH:
|
|
@@ -107,14 +119,20 @@ class TasksClient(NamespacedClient):
|
|
|
107
119
|
wait_for_completion: t.Optional[bool] = None,
|
|
108
120
|
) -> ObjectApiResponse[t.Any]:
|
|
109
121
|
"""
|
|
110
|
-
|
|
111
|
-
|
|
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
|
+
|
|
112
130
|
|
|
113
131
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
114
132
|
|
|
115
|
-
:param task_id:
|
|
116
|
-
:param timeout:
|
|
117
|
-
the timeout expires, the request fails and returns an error.
|
|
133
|
+
:param task_id: The task identifier.
|
|
134
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
135
|
+
before the timeout expires, the request fails and returns an error.
|
|
118
136
|
:param wait_for_completion: If `true`, the request blocks until the task has
|
|
119
137
|
completed.
|
|
120
138
|
"""
|
|
@@ -166,25 +184,82 @@ class TasksClient(NamespacedClient):
|
|
|
166
184
|
wait_for_completion: t.Optional[bool] = None,
|
|
167
185
|
) -> ObjectApiResponse[t.Any]:
|
|
168
186
|
"""
|
|
169
|
-
|
|
170
|
-
|
|
187
|
+
.. raw:: html
|
|
188
|
+
|
|
189
|
+
<p>Get all tasks.
|
|
190
|
+
Get information about the tasks currently running on one or more nodes in the cluster.</p>
|
|
191
|
+
<p>WARNING: The task management API is new and should still be considered a beta feature.
|
|
192
|
+
The API may change in ways that are not backwards compatible.</p>
|
|
193
|
+
<p><strong>Identifying running tasks</strong></p>
|
|
194
|
+
<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.
|
|
195
|
+
This enables you to track certain calls or associate certain tasks with the client that started them.
|
|
196
|
+
For example:</p>
|
|
197
|
+
<pre><code>curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents"
|
|
198
|
+
</code></pre>
|
|
199
|
+
<p>The API returns the following result:</p>
|
|
200
|
+
<pre><code>HTTP/1.1 200 OK
|
|
201
|
+
X-Opaque-Id: 123456
|
|
202
|
+
content-type: application/json; charset=UTF-8
|
|
203
|
+
content-length: 831
|
|
204
|
+
|
|
205
|
+
{
|
|
206
|
+
"tasks" : {
|
|
207
|
+
"u5lcZHqcQhu-rUoFaqDphA:45" : {
|
|
208
|
+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
|
|
209
|
+
"id" : 45,
|
|
210
|
+
"type" : "transport",
|
|
211
|
+
"action" : "cluster:monitor/tasks/lists",
|
|
212
|
+
"start_time_in_millis" : 1513823752749,
|
|
213
|
+
"running_time_in_nanos" : 293139,
|
|
214
|
+
"cancellable" : false,
|
|
215
|
+
"headers" : {
|
|
216
|
+
"X-Opaque-Id" : "123456"
|
|
217
|
+
},
|
|
218
|
+
"children" : [
|
|
219
|
+
{
|
|
220
|
+
"node" : "u5lcZHqcQhu-rUoFaqDphA",
|
|
221
|
+
"id" : 46,
|
|
222
|
+
"type" : "direct",
|
|
223
|
+
"action" : "cluster:monitor/tasks/lists[n]",
|
|
224
|
+
"start_time_in_millis" : 1513823752750,
|
|
225
|
+
"running_time_in_nanos" : 92133,
|
|
226
|
+
"cancellable" : false,
|
|
227
|
+
"parent_task_id" : "u5lcZHqcQhu-rUoFaqDphA:45",
|
|
228
|
+
"headers" : {
|
|
229
|
+
"X-Opaque-Id" : "123456"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
</code></pre>
|
|
237
|
+
<p>In this example, <code>X-Opaque-Id: 123456</code> is the ID as a part of the response header.
|
|
238
|
+
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.
|
|
239
|
+
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>
|
|
240
|
+
|
|
171
241
|
|
|
172
242
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
173
243
|
|
|
174
|
-
:param actions:
|
|
175
|
-
limit the request.
|
|
244
|
+
:param actions: A comma-separated list or wildcard expression of actions used
|
|
245
|
+
to limit the request. For example, you can use `cluser:*` to retrieve all
|
|
246
|
+
cluster-related tasks.
|
|
176
247
|
:param detailed: If `true`, the response includes detailed information about
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
:param
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:param
|
|
185
|
-
|
|
186
|
-
:param
|
|
187
|
-
|
|
248
|
+
the running tasks. This information is useful to distinguish tasks from each
|
|
249
|
+
other but is more costly to run.
|
|
250
|
+
:param group_by: A key that is used to group tasks in the response. The task
|
|
251
|
+
lists can be grouped either by nodes or by parent tasks.
|
|
252
|
+
:param master_timeout: The period to wait for a connection to the master node.
|
|
253
|
+
If no response is received before the timeout expires, the request fails
|
|
254
|
+
and returns an error.
|
|
255
|
+
:param nodes: A comma-separated list of node IDs or names that is used to limit
|
|
256
|
+
the returned information.
|
|
257
|
+
:param parent_task_id: A parent task identifier that is used to limit returned
|
|
258
|
+
information. To return all tasks, omit this parameter or use a value of `-1`.
|
|
259
|
+
If the parent task is not found, the API does not return a 404 response code.
|
|
260
|
+
:param timeout: The period to wait for each node to respond. If a node does not
|
|
261
|
+
respond before its timeout expires, the response does not include its information.
|
|
262
|
+
However, timed out nodes are included in the `node_failures` property.
|
|
188
263
|
:param wait_for_completion: If `true`, the request blocks until the operation
|
|
189
264
|
is complete.
|
|
190
265
|
"""
|