elasticsearch 8.17.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 +153 -51
- elasticsearch/_async/client/cat.py +64 -195
- elasticsearch/_async/client/cluster.py +19 -19
- elasticsearch/_async/client/connector.py +337 -0
- elasticsearch/_async/client/dangling_indices.py +3 -3
- elasticsearch/_async/client/ilm.py +6 -6
- elasticsearch/_async/client/indices.py +360 -81
- elasticsearch/_async/client/inference.py +94 -1
- elasticsearch/_async/client/ingest.py +175 -2
- elasticsearch/_async/client/logstash.py +9 -6
- elasticsearch/_async/client/migration.py +16 -7
- elasticsearch/_async/client/ml.py +12 -6
- elasticsearch/_async/client/monitoring.py +2 -1
- elasticsearch/_async/client/nodes.py +3 -3
- elasticsearch/_async/client/query_rules.py +33 -12
- elasticsearch/_async/client/rollup.py +88 -13
- elasticsearch/_async/client/search_application.py +130 -1
- elasticsearch/_async/client/searchable_snapshots.py +32 -23
- elasticsearch/_async/client/security.py +676 -55
- elasticsearch/_async/client/shutdown.py +38 -15
- elasticsearch/_async/client/simulate.py +151 -0
- elasticsearch/_async/client/slm.py +138 -19
- elasticsearch/_async/client/snapshot.py +307 -23
- elasticsearch/_async/client/sql.py +66 -46
- elasticsearch/_async/client/synonyms.py +39 -19
- elasticsearch/_async/client/tasks.py +68 -28
- elasticsearch/_async/client/text_structure.py +466 -46
- elasticsearch/_async/client/transform.py +9 -2
- elasticsearch/_async/client/watcher.py +207 -41
- elasticsearch/_async/client/xpack.py +11 -6
- elasticsearch/_sync/client/__init__.py +153 -51
- elasticsearch/_sync/client/cat.py +64 -195
- elasticsearch/_sync/client/cluster.py +19 -19
- elasticsearch/_sync/client/connector.py +337 -0
- elasticsearch/_sync/client/dangling_indices.py +3 -3
- elasticsearch/_sync/client/ilm.py +6 -6
- elasticsearch/_sync/client/indices.py +360 -81
- elasticsearch/_sync/client/inference.py +94 -1
- elasticsearch/_sync/client/ingest.py +175 -2
- elasticsearch/_sync/client/logstash.py +9 -6
- elasticsearch/_sync/client/migration.py +16 -7
- elasticsearch/_sync/client/ml.py +12 -6
- elasticsearch/_sync/client/monitoring.py +2 -1
- elasticsearch/_sync/client/nodes.py +3 -3
- elasticsearch/_sync/client/query_rules.py +33 -12
- elasticsearch/_sync/client/rollup.py +88 -13
- elasticsearch/_sync/client/search_application.py +130 -1
- elasticsearch/_sync/client/searchable_snapshots.py +32 -23
- elasticsearch/_sync/client/security.py +676 -55
- elasticsearch/_sync/client/shutdown.py +38 -15
- elasticsearch/_sync/client/simulate.py +151 -0
- elasticsearch/_sync/client/slm.py +138 -19
- elasticsearch/_sync/client/snapshot.py +307 -23
- elasticsearch/_sync/client/sql.py +66 -46
- elasticsearch/_sync/client/synonyms.py +39 -19
- elasticsearch/_sync/client/tasks.py +68 -28
- elasticsearch/_sync/client/text_structure.py +466 -46
- elasticsearch/_sync/client/transform.py +9 -2
- elasticsearch/_sync/client/watcher.py +207 -41
- elasticsearch/_sync/client/xpack.py +11 -6
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/METADATA +1 -1
- elasticsearch-8.17.1.dist-info/RECORD +119 -0
- elasticsearch-8.17.0.dist-info/RECORD +0 -117
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.0.dist-info → elasticsearch-8.17.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -36,11 +36,25 @@ class SynonymsClient(NamespacedClient):
|
|
|
36
36
|
pretty: t.Optional[bool] = None,
|
|
37
37
|
) -> ObjectApiResponse[t.Any]:
|
|
38
38
|
"""
|
|
39
|
-
Delete a synonym set.
|
|
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
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'")
|
|
@@ -81,8 +95,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
81
95
|
|
|
82
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'")
|
|
@@ -131,9 +145,9 @@ class SynonymsClient(NamespacedClient):
|
|
|
131
145
|
|
|
132
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'")
|
|
@@ -178,8 +192,8 @@ class SynonymsClient(NamespacedClient):
|
|
|
178
192
|
|
|
179
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'")
|
|
@@ -225,10 +239,10 @@ class SynonymsClient(NamespacedClient):
|
|
|
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.17/
|
|
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"
|
|
@@ -274,12 +288,15 @@ class SynonymsClient(NamespacedClient):
|
|
|
274
288
|
"""
|
|
275
289
|
Create or update a synonym set. Synonyms sets are limited to a maximum of 10,000
|
|
276
290
|
synonym rules per set. If you need to manage more synonym rules, you can create
|
|
277
|
-
multiple synonym sets.
|
|
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.
|
|
278
295
|
|
|
279
296
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonyms-set.html>`_
|
|
280
297
|
|
|
281
|
-
:param id: The
|
|
282
|
-
: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.
|
|
283
300
|
"""
|
|
284
301
|
if id in SKIP_IN_PATH:
|
|
285
302
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -328,13 +345,16 @@ class SynonymsClient(NamespacedClient):
|
|
|
328
345
|
) -> ObjectApiResponse[t.Any]:
|
|
329
346
|
"""
|
|
330
347
|
Create or update a synonym rule. Create or update a synonym rule in a synonym
|
|
331
|
-
set.
|
|
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.
|
|
332
351
|
|
|
333
352
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/put-synonym-rule.html>`_
|
|
334
353
|
|
|
335
|
-
:param set_id: The
|
|
336
|
-
:param rule_id: The
|
|
337
|
-
: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.
|
|
338
358
|
"""
|
|
339
359
|
if set_id in SKIP_IN_PATH:
|
|
340
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
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
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
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
|
"""
|