elasticsearch 8.16.0__py3-none-any.whl → 8.17.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.
- elasticsearch/_async/client/__init__.py +234 -96
- elasticsearch/_async/client/async_search.py +12 -22
- elasticsearch/_async/client/autoscaling.py +39 -4
- elasticsearch/_async/client/cat.py +90 -221
- elasticsearch/_async/client/ccr.py +85 -35
- elasticsearch/_async/client/cluster.py +160 -68
- elasticsearch/_async/client/connector.py +362 -25
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/enrich.py +6 -6
- elasticsearch/_async/client/eql.py +13 -11
- elasticsearch/_async/client/esql.py +3 -2
- elasticsearch/_async/client/features.py +27 -5
- elasticsearch/_async/client/fleet.py +1 -1
- elasticsearch/_async/client/graph.py +9 -3
- elasticsearch/_async/client/ilm.py +74 -39
- elasticsearch/_async/client/indices.py +633 -152
- elasticsearch/_async/client/inference.py +99 -16
- elasticsearch/_async/client/ingest.py +201 -23
- elasticsearch/_async/client/license.py +38 -22
- elasticsearch/_async/client/logstash.py +12 -9
- elasticsearch/_async/client/migration.py +17 -8
- elasticsearch/_async/client/ml.py +137 -79
- elasticsearch/_async/client/monitoring.py +3 -2
- elasticsearch/_async/client/nodes.py +37 -23
- elasticsearch/_async/client/query_rules.py +47 -25
- elasticsearch/_async/client/rollup.py +96 -21
- elasticsearch/_async/client/search_application.py +138 -9
- elasticsearch/_async/client/searchable_snapshots.py +33 -24
- elasticsearch/_async/client/security.py +751 -123
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +147 -28
- elasticsearch/_async/client/snapshot.py +309 -25
- elasticsearch/_async/client/sql.py +79 -58
- elasticsearch/_async/client/ssl.py +1 -1
- elasticsearch/_async/client/synonyms.py +52 -29
- elasticsearch/_async/client/tasks.py +71 -31
- elasticsearch/_async/client/text_structure.py +468 -48
- elasticsearch/_async/client/transform.py +21 -14
- elasticsearch/_async/client/watcher.py +226 -60
- elasticsearch/_async/client/xpack.py +13 -8
- elasticsearch/_sync/client/__init__.py +234 -96
- elasticsearch/_sync/client/async_search.py +12 -22
- elasticsearch/_sync/client/autoscaling.py +39 -4
- elasticsearch/_sync/client/cat.py +90 -221
- elasticsearch/_sync/client/ccr.py +85 -35
- elasticsearch/_sync/client/cluster.py +160 -68
- elasticsearch/_sync/client/connector.py +362 -25
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/enrich.py +6 -6
- elasticsearch/_sync/client/eql.py +13 -11
- elasticsearch/_sync/client/esql.py +3 -2
- elasticsearch/_sync/client/features.py +27 -5
- elasticsearch/_sync/client/fleet.py +1 -1
- elasticsearch/_sync/client/graph.py +9 -3
- elasticsearch/_sync/client/ilm.py +74 -39
- elasticsearch/_sync/client/indices.py +633 -152
- elasticsearch/_sync/client/inference.py +99 -16
- elasticsearch/_sync/client/ingest.py +201 -23
- elasticsearch/_sync/client/license.py +38 -22
- elasticsearch/_sync/client/logstash.py +12 -9
- elasticsearch/_sync/client/migration.py +17 -8
- elasticsearch/_sync/client/ml.py +137 -79
- elasticsearch/_sync/client/monitoring.py +3 -2
- elasticsearch/_sync/client/nodes.py +37 -23
- elasticsearch/_sync/client/query_rules.py +47 -25
- elasticsearch/_sync/client/rollup.py +96 -21
- elasticsearch/_sync/client/search_application.py +138 -9
- elasticsearch/_sync/client/searchable_snapshots.py +33 -24
- elasticsearch/_sync/client/security.py +751 -123
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +147 -28
- elasticsearch/_sync/client/snapshot.py +309 -25
- elasticsearch/_sync/client/sql.py +79 -58
- elasticsearch/_sync/client/ssl.py +1 -1
- elasticsearch/_sync/client/synonyms.py +52 -29
- elasticsearch/_sync/client/tasks.py +71 -31
- elasticsearch/_sync/client/text_structure.py +468 -48
- elasticsearch/_sync/client/transform.py +21 -14
- elasticsearch/_sync/client/watcher.py +226 -60
- elasticsearch/_sync/client/xpack.py +13 -8
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +6 -4
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.16.0.dist-info/RECORD +0 -117
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.16.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -39,9 +39,9 @@ class SqlClient(NamespacedClient):
|
|
|
39
39
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
40
40
|
) -> ObjectApiResponse[t.Any]:
|
|
41
41
|
"""
|
|
42
|
-
|
|
42
|
+
Clear an SQL search cursor.
|
|
43
43
|
|
|
44
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
44
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/clear-sql-cursor-api.html>`_
|
|
45
45
|
|
|
46
46
|
:param cursor: Cursor to clear.
|
|
47
47
|
"""
|
|
@@ -84,12 +84,15 @@ class SqlClient(NamespacedClient):
|
|
|
84
84
|
pretty: t.Optional[bool] = None,
|
|
85
85
|
) -> ObjectApiResponse[t.Any]:
|
|
86
86
|
"""
|
|
87
|
-
|
|
88
|
-
is still running, the API cancels it.
|
|
87
|
+
Delete an async SQL search. Delete an async SQL search or a stored synchronous
|
|
88
|
+
SQL search. If the search is still running, the API cancels it. If the Elasticsearch
|
|
89
|
+
security features are enabled, only the following users can use this API to delete
|
|
90
|
+
a search: * Users with the `cancel_task` cluster privilege. * The user who first
|
|
91
|
+
submitted the search.
|
|
89
92
|
|
|
90
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
93
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-async-sql-search-api.html>`_
|
|
91
94
|
|
|
92
|
-
:param id:
|
|
95
|
+
:param id: The identifier for the search.
|
|
93
96
|
"""
|
|
94
97
|
if id in SKIP_IN_PATH:
|
|
95
98
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -131,21 +134,24 @@ class SqlClient(NamespacedClient):
|
|
|
131
134
|
] = None,
|
|
132
135
|
) -> ObjectApiResponse[t.Any]:
|
|
133
136
|
"""
|
|
134
|
-
|
|
135
|
-
synchronous SQL search
|
|
137
|
+
Get async SQL search results. Get the current status and available results for
|
|
138
|
+
an async SQL search or stored synchronous SQL search. If the Elasticsearch security
|
|
139
|
+
features are enabled, only the user who first submitted the SQL search can retrieve
|
|
140
|
+
the search using this API.
|
|
136
141
|
|
|
137
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
142
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-sql-search-api.html>`_
|
|
138
143
|
|
|
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:
|
|
144
|
+
:param id: The identifier for the search.
|
|
145
|
+
:param delimiter: The separator for CSV results. The API supports this parameter
|
|
146
|
+
only for CSV responses.
|
|
147
|
+
:param format: The format for the response. You must specify a format using this
|
|
148
|
+
parameter or the `Accept` HTTP header. If you specify both, the API uses
|
|
149
|
+
this parameter.
|
|
150
|
+
:param keep_alive: The retention period for the search and its results. It defaults
|
|
146
151
|
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
|
|
152
|
+
:param wait_for_completion_timeout: The period to wait for complete results.
|
|
153
|
+
It defaults to no timeout, meaning the request waits for complete search
|
|
154
|
+
results.
|
|
149
155
|
"""
|
|
150
156
|
if id in SKIP_IN_PATH:
|
|
151
157
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -189,12 +195,12 @@ class SqlClient(NamespacedClient):
|
|
|
189
195
|
pretty: t.Optional[bool] = None,
|
|
190
196
|
) -> ObjectApiResponse[t.Any]:
|
|
191
197
|
"""
|
|
192
|
-
|
|
193
|
-
search
|
|
198
|
+
Get the async SQL search status. Get the current status of an async SQL search
|
|
199
|
+
or a stored synchronous SQL search.
|
|
194
200
|
|
|
195
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
201
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-async-sql-search-status-api.html>`_
|
|
196
202
|
|
|
197
|
-
:param id:
|
|
203
|
+
:param id: The identifier for the search.
|
|
198
204
|
"""
|
|
199
205
|
if id in SKIP_IN_PATH:
|
|
200
206
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -221,6 +227,7 @@ class SqlClient(NamespacedClient):
|
|
|
221
227
|
|
|
222
228
|
@_rewrite_parameters(
|
|
223
229
|
body_fields=(
|
|
230
|
+
"allow_partial_search_results",
|
|
224
231
|
"catalog",
|
|
225
232
|
"columnar",
|
|
226
233
|
"cursor",
|
|
@@ -243,6 +250,7 @@ class SqlClient(NamespacedClient):
|
|
|
243
250
|
async def query(
|
|
244
251
|
self,
|
|
245
252
|
*,
|
|
253
|
+
allow_partial_search_results: t.Optional[bool] = None,
|
|
246
254
|
catalog: t.Optional[str] = None,
|
|
247
255
|
columnar: t.Optional[bool] = None,
|
|
248
256
|
cursor: t.Optional[str] = None,
|
|
@@ -273,40 +281,49 @@ class SqlClient(NamespacedClient):
|
|
|
273
281
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
274
282
|
) -> ObjectApiResponse[t.Any]:
|
|
275
283
|
"""
|
|
276
|
-
|
|
284
|
+
Get SQL search results. Run an SQL request.
|
|
277
285
|
|
|
278
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
286
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/sql-search-api.html>`_
|
|
279
287
|
|
|
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
|
-
|
|
288
|
+
:param allow_partial_search_results: If `true`, the response has partial results
|
|
289
|
+
when there are shard request timeouts or shard failures. If `false`, the
|
|
290
|
+
API returns an error with no partial results.
|
|
291
|
+
:param catalog: The default catalog (cluster) for queries. If unspecified, the
|
|
292
|
+
queries execute on the data in the local cluster only.
|
|
293
|
+
:param columnar: If `true`, the results are in a columnar fashion: one row represents
|
|
294
|
+
all the values of a certain column from the current page of results. The
|
|
295
|
+
API supports this parameter only for CBOR, JSON, SMILE, and YAML responses.
|
|
296
|
+
:param cursor: The cursor used to retrieve a set of paginated results. If you
|
|
297
|
+
specify a cursor, the API only uses the `columnar` and `time_zone` request
|
|
298
|
+
body parameters. It ignores other request body parameters.
|
|
299
|
+
:param fetch_size: The maximum number of rows (or entries) to return in one response.
|
|
300
|
+
:param field_multi_value_leniency: If `false`, the API returns an exception when
|
|
301
|
+
encountering multiple values for a field. If `true`, the API is lenient and
|
|
302
|
+
returns the first value from the array with no guarantee of consistent results.
|
|
303
|
+
:param filter: The Elasticsearch query DSL for additional filtering.
|
|
304
|
+
:param format: The format for the response. You can also specify a format using
|
|
305
|
+
the `Accept` HTTP header. If you specify both this parameter and the `Accept`
|
|
306
|
+
HTTP header, this parameter takes precedence.
|
|
307
|
+
:param index_using_frozen: If `true`, the search can run on frozen indices.
|
|
308
|
+
:param keep_alive: The retention period for an async or saved synchronous search.
|
|
309
|
+
:param keep_on_completion: If `true`, Elasticsearch stores synchronous searches
|
|
310
|
+
if you also specify the `wait_for_completion_timeout` parameter. If `false`,
|
|
311
|
+
Elasticsearch only stores async searches that don't finish before the `wait_for_completion_timeout`.
|
|
312
|
+
:param page_timeout: The minimum retention period for the scroll cursor. After
|
|
313
|
+
this time period, a pagination request might fail because the scroll cursor
|
|
314
|
+
is no longer available. Subsequent scroll requests prolong the lifetime of
|
|
315
|
+
the scroll cursor by the duration of `page_timeout` in the scroll request.
|
|
316
|
+
:param params: The values for parameters in the query.
|
|
317
|
+
:param query: The SQL query to run.
|
|
303
318
|
: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
|
|
319
|
+
:param runtime_mappings: One or more runtime fields for the search request. These
|
|
320
|
+
fields take precedence over mapped fields with the same name.
|
|
321
|
+
:param time_zone: The ISO-8601 time zone ID for the search.
|
|
322
|
+
:param wait_for_completion_timeout: The period to wait for complete results.
|
|
323
|
+
It defaults to no timeout, meaning the request waits for complete search
|
|
324
|
+
results. If the search doesn't finish within this period, the search becomes
|
|
325
|
+
async. To save a synchronous search, you must specify this parameter and
|
|
326
|
+
the `keep_on_completion` parameter.
|
|
310
327
|
"""
|
|
311
328
|
__path_parts: t.Dict[str, str] = {}
|
|
312
329
|
__path = "/_sql"
|
|
@@ -323,6 +340,8 @@ class SqlClient(NamespacedClient):
|
|
|
323
340
|
if pretty is not None:
|
|
324
341
|
__query["pretty"] = pretty
|
|
325
342
|
if not __body:
|
|
343
|
+
if allow_partial_search_results is not None:
|
|
344
|
+
__body["allow_partial_search_results"] = allow_partial_search_results
|
|
326
345
|
if catalog is not None:
|
|
327
346
|
__body["catalog"] = catalog
|
|
328
347
|
if columnar is not None:
|
|
@@ -383,14 +402,16 @@ class SqlClient(NamespacedClient):
|
|
|
383
402
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
384
403
|
) -> ObjectApiResponse[t.Any]:
|
|
385
404
|
"""
|
|
386
|
-
|
|
405
|
+
Translate SQL into Elasticsearch queries. Translate an SQL search into a search
|
|
406
|
+
API request containing Query DSL. It accepts the same request body parameters
|
|
407
|
+
as the SQL search API, excluding `cursor`.
|
|
387
408
|
|
|
388
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
409
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/sql-translate-api.html>`_
|
|
389
410
|
|
|
390
|
-
:param query: SQL query to run.
|
|
411
|
+
:param query: The SQL query to run.
|
|
391
412
|
:param fetch_size: The maximum number of rows (or entries) to return in one response.
|
|
392
|
-
:param filter: Elasticsearch query DSL for additional filtering.
|
|
393
|
-
:param time_zone: ISO-8601 time zone ID for the search.
|
|
413
|
+
:param filter: The Elasticsearch query DSL for additional filtering.
|
|
414
|
+
:param time_zone: The ISO-8601 time zone ID for the search.
|
|
394
415
|
"""
|
|
395
416
|
if query is None and body is None:
|
|
396
417
|
raise ValueError("Empty value passed for parameter 'query'")
|
|
@@ -53,7 +53,7 @@ class SslClient(NamespacedClient):
|
|
|
53
53
|
the API output includes all certificates in that store, even though some of the
|
|
54
54
|
certificates might not be in active use within the cluster.
|
|
55
55
|
|
|
56
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
56
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-ssl.html>`_
|
|
57
57
|
"""
|
|
58
58
|
__path_parts: t.Dict[str, str] = {}
|
|
59
59
|
__path = "/_ssl/certificates"
|
|
@@ -36,11 +36,25 @@ class SynonymsClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
|
|
39
|
+
Delete a synonym set. You can only delete a synonyms set that is not in use by
|
|
40
|
+
any index analyzer. Synonyms sets can be used in synonym graph token filters
|
|
41
|
+
and synonym token filters. These synonym filters can be used as part of search
|
|
42
|
+
analyzers. Analyzers need to be loaded when an index is restored (such as when
|
|
43
|
+
a node starts, or the index becomes open). Even if the analyzer is not used on
|
|
44
|
+
any field mapping, it still needs to be loaded on the index recovery phase. If
|
|
45
|
+
any analyzers cannot be loaded, the index becomes unavailable and the cluster
|
|
46
|
+
status becomes red or yellow as index shards are not available. To prevent that,
|
|
47
|
+
synonyms sets that are used in analyzers can't be deleted. A delete request in
|
|
48
|
+
this case will return a 400 response code. To remove a synonyms set, you must
|
|
49
|
+
first remove all indices that contain analyzers using it. You can migrate an
|
|
50
|
+
index by creating a new index that does not contain the token filter with the
|
|
51
|
+
synonyms set, and use the reindex API in order to copy over the index data. Once
|
|
52
|
+
finished, you can delete the index. When the synonyms set is not used in analyzers,
|
|
53
|
+
you will be able to delete it.
|
|
40
54
|
|
|
41
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
55
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-synonyms-set.html>`_
|
|
42
56
|
|
|
43
|
-
:param id: The
|
|
57
|
+
:param id: The synonyms set identifier to delete.
|
|
44
58
|
"""
|
|
45
59
|
if id in SKIP_IN_PATH:
|
|
46
60
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -77,12 +91,12 @@ class SynonymsClient(NamespacedClient):
|
|
|
77
91
|
pretty: t.Optional[bool] = None,
|
|
78
92
|
) -> ObjectApiResponse[t.Any]:
|
|
79
93
|
"""
|
|
80
|
-
|
|
94
|
+
Delete a synonym rule. Delete a synonym rule from a synonym set.
|
|
81
95
|
|
|
82
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
96
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/delete-synonym-rule.html>`_
|
|
83
97
|
|
|
84
|
-
:param set_id: The
|
|
85
|
-
:param rule_id: The
|
|
98
|
+
:param set_id: The ID of the synonym set to update.
|
|
99
|
+
:param rule_id: The ID of the synonym rule to delete.
|
|
86
100
|
"""
|
|
87
101
|
if set_id in SKIP_IN_PATH:
|
|
88
102
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -127,13 +141,13 @@ class SynonymsClient(NamespacedClient):
|
|
|
127
141
|
size: t.Optional[int] = None,
|
|
128
142
|
) -> ObjectApiResponse[t.Any]:
|
|
129
143
|
"""
|
|
130
|
-
|
|
144
|
+
Get a synonym set.
|
|
131
145
|
|
|
132
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
146
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonyms-set.html>`_
|
|
133
147
|
|
|
134
|
-
:param id:
|
|
135
|
-
:param from_:
|
|
136
|
-
:param size:
|
|
148
|
+
:param id: The synonyms set identifier to retrieve.
|
|
149
|
+
:param from_: The starting offset for query rules to retrieve.
|
|
150
|
+
:param size: The max number of query rules to retrieve.
|
|
137
151
|
"""
|
|
138
152
|
if id in SKIP_IN_PATH:
|
|
139
153
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -174,12 +188,12 @@ class SynonymsClient(NamespacedClient):
|
|
|
174
188
|
pretty: t.Optional[bool] = None,
|
|
175
189
|
) -> ObjectApiResponse[t.Any]:
|
|
176
190
|
"""
|
|
177
|
-
|
|
191
|
+
Get a synonym rule. Get a synonym rule from a synonym set.
|
|
178
192
|
|
|
179
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
193
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonym-rule.html>`_
|
|
180
194
|
|
|
181
|
-
:param set_id: The
|
|
182
|
-
:param rule_id: The
|
|
195
|
+
:param set_id: The ID of the synonym set to retrieve the synonym rule from.
|
|
196
|
+
:param rule_id: The ID of the synonym rule to retrieve.
|
|
183
197
|
"""
|
|
184
198
|
if set_id in SKIP_IN_PATH:
|
|
185
199
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -223,12 +237,12 @@ class SynonymsClient(NamespacedClient):
|
|
|
223
237
|
size: t.Optional[int] = None,
|
|
224
238
|
) -> ObjectApiResponse[t.Any]:
|
|
225
239
|
"""
|
|
226
|
-
|
|
240
|
+
Get all synonym sets. Get a summary of all defined synonym sets.
|
|
227
241
|
|
|
228
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
242
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/get-synonyms-set.html>`_
|
|
229
243
|
|
|
230
|
-
:param from_:
|
|
231
|
-
:param size:
|
|
244
|
+
:param from_: The starting offset for synonyms sets to retrieve.
|
|
245
|
+
:param size: The maximum number of synonyms sets to retrieve.
|
|
232
246
|
"""
|
|
233
247
|
__path_parts: t.Dict[str, str] = {}
|
|
234
248
|
__path = "/_synonyms"
|
|
@@ -272,12 +286,17 @@ class SynonymsClient(NamespacedClient):
|
|
|
272
286
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
273
287
|
) -> ObjectApiResponse[t.Any]:
|
|
274
288
|
"""
|
|
275
|
-
|
|
289
|
+
Create or update a synonym set. Synonyms sets are limited to a maximum of 10,000
|
|
290
|
+
synonym rules per set. If you need to manage more synonym rules, you can create
|
|
291
|
+
multiple synonym sets. When an existing synonyms set is updated, the search analyzers
|
|
292
|
+
that use the synonyms set are reloaded automatically for all indices. This is
|
|
293
|
+
equivalent to invoking the reload search analyzers API for all indices that use
|
|
294
|
+
the synonyms set.
|
|
276
295
|
|
|
277
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
296
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonyms-set.html>`_
|
|
278
297
|
|
|
279
|
-
:param id: The
|
|
280
|
-
:param synonyms_set: The synonym
|
|
298
|
+
:param id: The ID of the synonyms set to be created or updated.
|
|
299
|
+
:param synonyms_set: The synonym rules definitions for the synonyms set.
|
|
281
300
|
"""
|
|
282
301
|
if id in SKIP_IN_PATH:
|
|
283
302
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -325,13 +344,17 @@ class SynonymsClient(NamespacedClient):
|
|
|
325
344
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
326
345
|
) -> ObjectApiResponse[t.Any]:
|
|
327
346
|
"""
|
|
328
|
-
|
|
347
|
+
Create or update a synonym rule. Create or update a synonym rule in a synonym
|
|
348
|
+
set. If any of the synonym rules included is invalid, the API returns an error.
|
|
349
|
+
When you update a synonym rule, all analyzers using the synonyms set will be
|
|
350
|
+
reloaded automatically to reflect the new rule.
|
|
329
351
|
|
|
330
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
352
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonym-rule.html>`_
|
|
331
353
|
|
|
332
|
-
:param set_id: The
|
|
333
|
-
:param rule_id: The
|
|
334
|
-
:param synonyms:
|
|
354
|
+
:param set_id: The ID of the synonym set.
|
|
355
|
+
:param rule_id: The ID of the synonym rule to be updated or created.
|
|
356
|
+
:param synonyms: The synonym rule information definition, which must be in Solr
|
|
357
|
+
format.
|
|
335
358
|
"""
|
|
336
359
|
if set_id in SKIP_IN_PATH:
|
|
337
360
|
raise ValueError("Empty value passed for parameter 'set_id'")
|
|
@@ -47,17 +47,30 @@ class TasksClient(NamespacedClient):
|
|
|
47
47
|
wait_for_completion: t.Optional[bool] = None,
|
|
48
48
|
) -> ObjectApiResponse[t.Any]:
|
|
49
49
|
"""
|
|
50
|
-
|
|
50
|
+
Cancel a task. WARNING: The task management API is new and should still be considered
|
|
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.
|
|
51
63
|
|
|
52
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
64
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
53
65
|
|
|
54
|
-
:param task_id:
|
|
55
|
-
:param actions:
|
|
56
|
-
limit the request.
|
|
57
|
-
:param nodes:
|
|
58
|
-
|
|
59
|
-
:param
|
|
60
|
-
|
|
66
|
+
:param task_id: The task identifier.
|
|
67
|
+
:param actions: A comma-separated list or wildcard expression of actions that
|
|
68
|
+
is used to limit the request.
|
|
69
|
+
:param nodes: A comma-separated list of node IDs or names that is used to limit
|
|
70
|
+
the request.
|
|
71
|
+
:param parent_task_id: A parent task ID that is used to limit the tasks.
|
|
72
|
+
:param wait_for_completion: If true, the request blocks until all found tasks
|
|
73
|
+
are complete.
|
|
61
74
|
"""
|
|
62
75
|
__path_parts: t.Dict[str, str]
|
|
63
76
|
if task_id not in SKIP_IN_PATH:
|
|
@@ -107,14 +120,17 @@ class TasksClient(NamespacedClient):
|
|
|
107
120
|
wait_for_completion: t.Optional[bool] = None,
|
|
108
121
|
) -> ObjectApiResponse[t.Any]:
|
|
109
122
|
"""
|
|
110
|
-
Get task information.
|
|
111
|
-
|
|
123
|
+
Get task information. Get information about a task currently running in the cluster.
|
|
124
|
+
WARNING: The task management API is new and should still be considered a beta
|
|
125
|
+
feature. The API may change in ways that are not backwards compatible. If the
|
|
126
|
+
task identifier is not found, a 404 response code indicates that there are no
|
|
127
|
+
resources that match the request.
|
|
112
128
|
|
|
113
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
129
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
114
130
|
|
|
115
|
-
:param task_id:
|
|
116
|
-
:param timeout:
|
|
117
|
-
the timeout expires, the request fails and returns an error.
|
|
131
|
+
:param task_id: The task identifier.
|
|
132
|
+
:param timeout: The period to wait for a response. If no response is received
|
|
133
|
+
before the timeout expires, the request fails and returns an error.
|
|
118
134
|
:param wait_for_completion: If `true`, the request blocks until the task has
|
|
119
135
|
completed.
|
|
120
136
|
"""
|
|
@@ -166,25 +182,49 @@ class TasksClient(NamespacedClient):
|
|
|
166
182
|
wait_for_completion: t.Optional[bool] = None,
|
|
167
183
|
) -> ObjectApiResponse[t.Any]:
|
|
168
184
|
"""
|
|
169
|
-
|
|
170
|
-
|
|
185
|
+
Get all tasks. Get information about the tasks currently running on one or more
|
|
186
|
+
nodes in the cluster. WARNING: The task management API is new and should still
|
|
187
|
+
be considered a beta feature. The API may change in ways that are not backwards
|
|
188
|
+
compatible. **Identifying running tasks** The `X-Opaque-Id header`, when provided
|
|
189
|
+
on the HTTP request header, is going to be returned as a header in the response
|
|
190
|
+
as well as in the headers field for in the task information. This enables you
|
|
191
|
+
to track certain calls or associate certain tasks with the client that started
|
|
192
|
+
them. For example: ``` curl -i -H "X-Opaque-Id: 123456" "http://localhost:9200/_tasks?group_by=parents"
|
|
193
|
+
``` The API returns the following result: ``` HTTP/1.1 200 OK X-Opaque-Id: 123456
|
|
194
|
+
content-type: application/json; charset=UTF-8 content-length: 831 { "tasks" :
|
|
195
|
+
{ "u5lcZHqcQhu-rUoFaqDphA:45" : { "node" : "u5lcZHqcQhu-rUoFaqDphA", "id" : 45,
|
|
196
|
+
"type" : "transport", "action" : "cluster:monitor/tasks/lists", "start_time_in_millis"
|
|
197
|
+
: 1513823752749, "running_time_in_nanos" : 293139, "cancellable" : false, "headers"
|
|
198
|
+
: { "X-Opaque-Id" : "123456" }, "children" : [ { "node" : "u5lcZHqcQhu-rUoFaqDphA",
|
|
199
|
+
"id" : 46, "type" : "direct", "action" : "cluster:monitor/tasks/lists[n]", "start_time_in_millis"
|
|
200
|
+
: 1513823752750, "running_time_in_nanos" : 92133, "cancellable" : false, "parent_task_id"
|
|
201
|
+
: "u5lcZHqcQhu-rUoFaqDphA:45", "headers" : { "X-Opaque-Id" : "123456" } } ] }
|
|
202
|
+
} } ``` In this example, `X-Opaque-Id: 123456` is the ID as a part of the response
|
|
203
|
+
header. The `X-Opaque-Id` in the task `headers` is the ID for the task that was
|
|
204
|
+
initiated by the REST request. The `X-Opaque-Id` in the children `headers` is
|
|
205
|
+
the child task of the task that was initiated by the REST request.
|
|
171
206
|
|
|
172
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
207
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/tasks.html>`_
|
|
173
208
|
|
|
174
|
-
:param actions:
|
|
175
|
-
limit the request.
|
|
209
|
+
:param actions: A comma-separated list or wildcard expression of actions used
|
|
210
|
+
to limit the request. For example, you can use `cluser:*` to retrieve all
|
|
211
|
+
cluster-related tasks.
|
|
176
212
|
:param detailed: If `true`, the response includes detailed information about
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
:param
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:param
|
|
185
|
-
|
|
186
|
-
:param
|
|
187
|
-
|
|
213
|
+
the running tasks. This information is useful to distinguish tasks from each
|
|
214
|
+
other but is more costly to run.
|
|
215
|
+
:param group_by: A key that is used to group tasks in the response. The task
|
|
216
|
+
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
|
+
:param nodes: A comma-separated list of node IDs or names that is used to limit
|
|
221
|
+
the returned information.
|
|
222
|
+
:param parent_task_id: A parent task identifier that is used to limit returned
|
|
223
|
+
information. To return all tasks, omit this parameter or use a value of `-1`.
|
|
224
|
+
If the parent task is not found, the API does not return a 404 response code.
|
|
225
|
+
:param timeout: The period to wait for each node to respond. If a node does not
|
|
226
|
+
respond before its timeout expires, the response does not include its information.
|
|
227
|
+
However, timed out nodes are included in the `node_failures` property.
|
|
188
228
|
:param wait_for_completion: If `true`, the request blocks until the operation
|
|
189
229
|
is complete.
|
|
190
230
|
"""
|