elasticsearch 8.12.1__py3-none-any.whl → 8.13.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/__init__.py +7 -0
- elasticsearch/_async/client/__init__.py +477 -128
- elasticsearch/_async/client/_base.py +41 -1
- elasticsearch/_async/client/async_search.py +40 -12
- elasticsearch/_async/client/autoscaling.py +37 -11
- elasticsearch/_async/client/cat.py +260 -69
- elasticsearch/_async/client/ccr.py +123 -38
- elasticsearch/_async/client/cluster.py +153 -42
- elasticsearch/_async/client/dangling_indices.py +27 -8
- elasticsearch/_async/client/enrich.py +48 -14
- elasticsearch/_async/client/eql.py +38 -12
- elasticsearch/_async/client/esql.py +10 -2
- elasticsearch/_async/client/features.py +17 -4
- elasticsearch/_async/client/fleet.py +30 -7
- elasticsearch/_async/client/graph.py +11 -3
- elasticsearch/_async/client/ilm.py +101 -29
- elasticsearch/_async/client/indices.py +688 -181
- elasticsearch/_async/client/inference.py +111 -44
- elasticsearch/_async/client/ingest.py +59 -16
- elasticsearch/_async/client/license.py +58 -14
- elasticsearch/_async/client/logstash.py +31 -9
- elasticsearch/_async/client/migration.py +28 -7
- elasticsearch/_async/client/ml.py +781 -214
- elasticsearch/_async/client/monitoring.py +10 -2
- elasticsearch/_async/client/nodes.py +103 -29
- elasticsearch/_async/client/query_ruleset.py +37 -11
- elasticsearch/_async/client/rollup.py +79 -24
- elasticsearch/_async/client/search_application.py +76 -23
- elasticsearch/_async/client/searchable_snapshots.py +49 -12
- elasticsearch/_async/client/security.py +544 -143
- elasticsearch/_async/client/shutdown.py +28 -6
- elasticsearch/_async/client/slm.py +80 -22
- elasticsearch/_async/client/snapshot.py +140 -54
- elasticsearch/_async/client/sql.py +55 -15
- elasticsearch/_async/client/ssl.py +9 -2
- elasticsearch/_async/client/synonyms.py +75 -21
- elasticsearch/_async/client/tasks.py +29 -8
- elasticsearch/_async/client/text_structure.py +74 -2
- elasticsearch/_async/client/transform.py +106 -32
- elasticsearch/_async/client/watcher.py +110 -31
- elasticsearch/_async/client/xpack.py +16 -4
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_otel.py +92 -0
- elasticsearch/_sync/client/__init__.py +477 -128
- elasticsearch/_sync/client/_base.py +41 -1
- elasticsearch/_sync/client/async_search.py +40 -12
- elasticsearch/_sync/client/autoscaling.py +37 -11
- elasticsearch/_sync/client/cat.py +260 -69
- elasticsearch/_sync/client/ccr.py +123 -38
- elasticsearch/_sync/client/cluster.py +153 -42
- elasticsearch/_sync/client/dangling_indices.py +27 -8
- elasticsearch/_sync/client/enrich.py +48 -14
- elasticsearch/_sync/client/eql.py +38 -12
- elasticsearch/_sync/client/esql.py +10 -2
- elasticsearch/_sync/client/features.py +17 -4
- elasticsearch/_sync/client/fleet.py +30 -7
- elasticsearch/_sync/client/graph.py +11 -3
- elasticsearch/_sync/client/ilm.py +101 -29
- elasticsearch/_sync/client/indices.py +688 -181
- elasticsearch/_sync/client/inference.py +111 -44
- elasticsearch/_sync/client/ingest.py +59 -16
- elasticsearch/_sync/client/license.py +58 -14
- elasticsearch/_sync/client/logstash.py +31 -9
- elasticsearch/_sync/client/migration.py +28 -7
- elasticsearch/_sync/client/ml.py +781 -214
- elasticsearch/_sync/client/monitoring.py +10 -2
- elasticsearch/_sync/client/nodes.py +103 -29
- elasticsearch/_sync/client/query_ruleset.py +37 -11
- elasticsearch/_sync/client/rollup.py +79 -24
- elasticsearch/_sync/client/search_application.py +76 -23
- elasticsearch/_sync/client/searchable_snapshots.py +49 -12
- elasticsearch/_sync/client/security.py +544 -143
- elasticsearch/_sync/client/shutdown.py +28 -6
- elasticsearch/_sync/client/slm.py +80 -22
- elasticsearch/_sync/client/snapshot.py +140 -54
- elasticsearch/_sync/client/sql.py +55 -15
- elasticsearch/_sync/client/ssl.py +9 -2
- elasticsearch/_sync/client/synonyms.py +75 -21
- elasticsearch/_sync/client/tasks.py +29 -8
- elasticsearch/_sync/client/text_structure.py +74 -2
- elasticsearch/_sync/client/transform.py +106 -32
- elasticsearch/_sync/client/watcher.py +110 -31
- elasticsearch/_sync/client/xpack.py +16 -4
- elasticsearch/_version.py +1 -1
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/__init__.py +62 -0
- elasticsearch/helpers/vectorstore/_async/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_async/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_async/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_async/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_async/vectorstore.py +391 -0
- elasticsearch/helpers/vectorstore/_sync/__init__.py +16 -0
- elasticsearch/helpers/vectorstore/_sync/_utils.py +39 -0
- elasticsearch/helpers/vectorstore/_sync/embedding_service.py +89 -0
- elasticsearch/helpers/vectorstore/_sync/strategies.py +466 -0
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +388 -0
- elasticsearch/helpers/vectorstore/_utils.py +116 -0
- elasticsearch/serializer.py +14 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/METADATA +28 -8
- elasticsearch-8.13.1.dist-info/RECORD +116 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/WHEEL +1 -1
- elasticsearch-8.12.1.dist-info/RECORD +0 -103
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/LICENSE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/NOTICE +0 -0
- {elasticsearch-8.12.1.dist-info → elasticsearch-8.13.1.dist-info}/top_level.txt +0 -0
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class RollupClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete_job(
|
|
29
30
|
self,
|
|
@@ -37,13 +38,14 @@ class RollupClient(NamespacedClient):
|
|
|
37
38
|
"""
|
|
38
39
|
Deletes an existing rollup job.
|
|
39
40
|
|
|
40
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-delete-job.html>`_
|
|
41
42
|
|
|
42
43
|
:param id: Identifier for the job.
|
|
43
44
|
"""
|
|
44
45
|
if id in SKIP_IN_PATH:
|
|
45
46
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
46
|
-
|
|
47
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
48
|
+
__path = f'/_rollup/job/{__path_parts["id"]}'
|
|
47
49
|
__query: t.Dict[str, t.Any] = {}
|
|
48
50
|
if error_trace is not None:
|
|
49
51
|
__query["error_trace"] = error_trace
|
|
@@ -55,7 +57,12 @@ class RollupClient(NamespacedClient):
|
|
|
55
57
|
__query["pretty"] = pretty
|
|
56
58
|
__headers = {"accept": "application/json"}
|
|
57
59
|
return self.perform_request( # type: ignore[return-value]
|
|
58
|
-
"DELETE",
|
|
60
|
+
"DELETE",
|
|
61
|
+
__path,
|
|
62
|
+
params=__query,
|
|
63
|
+
headers=__headers,
|
|
64
|
+
endpoint_id="rollup.delete_job",
|
|
65
|
+
path_parts=__path_parts,
|
|
59
66
|
)
|
|
60
67
|
|
|
61
68
|
@_rewrite_parameters()
|
|
@@ -71,14 +78,17 @@ class RollupClient(NamespacedClient):
|
|
|
71
78
|
"""
|
|
72
79
|
Retrieves the configuration, stats, and status of rollup jobs.
|
|
73
80
|
|
|
74
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
81
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-job.html>`_
|
|
75
82
|
|
|
76
83
|
:param id: Identifier for the rollup job. If it is `_all` or omitted, the API
|
|
77
84
|
returns all rollup jobs.
|
|
78
85
|
"""
|
|
86
|
+
__path_parts: t.Dict[str, str]
|
|
79
87
|
if id not in SKIP_IN_PATH:
|
|
80
|
-
|
|
88
|
+
__path_parts = {"id": _quote(id)}
|
|
89
|
+
__path = f'/_rollup/job/{__path_parts["id"]}'
|
|
81
90
|
else:
|
|
91
|
+
__path_parts = {}
|
|
82
92
|
__path = "/_rollup/job"
|
|
83
93
|
__query: t.Dict[str, t.Any] = {}
|
|
84
94
|
if error_trace is not None:
|
|
@@ -91,7 +101,12 @@ class RollupClient(NamespacedClient):
|
|
|
91
101
|
__query["pretty"] = pretty
|
|
92
102
|
__headers = {"accept": "application/json"}
|
|
93
103
|
return self.perform_request( # type: ignore[return-value]
|
|
94
|
-
"GET",
|
|
104
|
+
"GET",
|
|
105
|
+
__path,
|
|
106
|
+
params=__query,
|
|
107
|
+
headers=__headers,
|
|
108
|
+
endpoint_id="rollup.get_jobs",
|
|
109
|
+
path_parts=__path_parts,
|
|
95
110
|
)
|
|
96
111
|
|
|
97
112
|
@_rewrite_parameters()
|
|
@@ -108,14 +123,17 @@ class RollupClient(NamespacedClient):
|
|
|
108
123
|
Returns the capabilities of any rollup jobs that have been configured for a specific
|
|
109
124
|
index or index pattern.
|
|
110
125
|
|
|
111
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
126
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-rollup-caps.html>`_
|
|
112
127
|
|
|
113
128
|
:param id: Index, indices or index-pattern to return rollup capabilities for.
|
|
114
129
|
`_all` may be used to fetch rollup capabilities from all jobs.
|
|
115
130
|
"""
|
|
131
|
+
__path_parts: t.Dict[str, str]
|
|
116
132
|
if id not in SKIP_IN_PATH:
|
|
117
|
-
|
|
133
|
+
__path_parts = {"id": _quote(id)}
|
|
134
|
+
__path = f'/_rollup/data/{__path_parts["id"]}'
|
|
118
135
|
else:
|
|
136
|
+
__path_parts = {}
|
|
119
137
|
__path = "/_rollup/data"
|
|
120
138
|
__query: t.Dict[str, t.Any] = {}
|
|
121
139
|
if error_trace is not None:
|
|
@@ -128,7 +146,12 @@ class RollupClient(NamespacedClient):
|
|
|
128
146
|
__query["pretty"] = pretty
|
|
129
147
|
__headers = {"accept": "application/json"}
|
|
130
148
|
return self.perform_request( # type: ignore[return-value]
|
|
131
|
-
"GET",
|
|
149
|
+
"GET",
|
|
150
|
+
__path,
|
|
151
|
+
params=__query,
|
|
152
|
+
headers=__headers,
|
|
153
|
+
endpoint_id="rollup.get_rollup_caps",
|
|
154
|
+
path_parts=__path_parts,
|
|
132
155
|
)
|
|
133
156
|
|
|
134
157
|
@_rewrite_parameters()
|
|
@@ -145,14 +168,15 @@ class RollupClient(NamespacedClient):
|
|
|
145
168
|
Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the
|
|
146
169
|
index where rollup data is stored).
|
|
147
170
|
|
|
148
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
171
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-get-rollup-index-caps.html>`_
|
|
149
172
|
|
|
150
173
|
:param index: Data stream or index to check for rollup capabilities. Wildcard
|
|
151
174
|
(`*`) expressions are supported.
|
|
152
175
|
"""
|
|
153
176
|
if index in SKIP_IN_PATH:
|
|
154
177
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
155
|
-
|
|
178
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
179
|
+
__path = f'/{__path_parts["index"]}/_rollup/data'
|
|
156
180
|
__query: t.Dict[str, t.Any] = {}
|
|
157
181
|
if error_trace is not None:
|
|
158
182
|
__query["error_trace"] = error_trace
|
|
@@ -164,7 +188,12 @@ class RollupClient(NamespacedClient):
|
|
|
164
188
|
__query["pretty"] = pretty
|
|
165
189
|
__headers = {"accept": "application/json"}
|
|
166
190
|
return self.perform_request( # type: ignore[return-value]
|
|
167
|
-
"GET",
|
|
191
|
+
"GET",
|
|
192
|
+
__path,
|
|
193
|
+
params=__query,
|
|
194
|
+
headers=__headers,
|
|
195
|
+
endpoint_id="rollup.get_rollup_index_caps",
|
|
196
|
+
path_parts=__path_parts,
|
|
168
197
|
)
|
|
169
198
|
|
|
170
199
|
@_rewrite_parameters(
|
|
@@ -201,7 +230,7 @@ class RollupClient(NamespacedClient):
|
|
|
201
230
|
"""
|
|
202
231
|
Creates a rollup job.
|
|
203
232
|
|
|
204
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
233
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-put-job.html>`_
|
|
205
234
|
|
|
206
235
|
:param id: Identifier for the rollup job. This can be any alphanumeric string
|
|
207
236
|
and uniquely identifies the data that is associated with the rollup job.
|
|
@@ -255,7 +284,8 @@ class RollupClient(NamespacedClient):
|
|
|
255
284
|
raise ValueError("Empty value passed for parameter 'page_size'")
|
|
256
285
|
if rollup_index is None and body is None:
|
|
257
286
|
raise ValueError("Empty value passed for parameter 'rollup_index'")
|
|
258
|
-
|
|
287
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
288
|
+
__path = f'/_rollup/job/{__path_parts["id"]}'
|
|
259
289
|
__query: t.Dict[str, t.Any] = {}
|
|
260
290
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
261
291
|
if error_trace is not None:
|
|
@@ -285,7 +315,13 @@ class RollupClient(NamespacedClient):
|
|
|
285
315
|
__body["timeout"] = timeout
|
|
286
316
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
287
317
|
return self.perform_request( # type: ignore[return-value]
|
|
288
|
-
"PUT",
|
|
318
|
+
"PUT",
|
|
319
|
+
__path,
|
|
320
|
+
params=__query,
|
|
321
|
+
headers=__headers,
|
|
322
|
+
body=__body,
|
|
323
|
+
endpoint_id="rollup.put_job",
|
|
324
|
+
path_parts=__path_parts,
|
|
289
325
|
)
|
|
290
326
|
|
|
291
327
|
@_rewrite_parameters(
|
|
@@ -310,7 +346,7 @@ class RollupClient(NamespacedClient):
|
|
|
310
346
|
"""
|
|
311
347
|
Enables searching rolled-up data using the standard query DSL.
|
|
312
348
|
|
|
313
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
349
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-search.html>`_
|
|
314
350
|
|
|
315
351
|
:param index: Enables searching rolled-up data using the standard Query DSL.
|
|
316
352
|
:param aggregations: Specifies aggregations.
|
|
@@ -324,7 +360,8 @@ class RollupClient(NamespacedClient):
|
|
|
324
360
|
"""
|
|
325
361
|
if index in SKIP_IN_PATH:
|
|
326
362
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
327
|
-
|
|
363
|
+
__path_parts: t.Dict[str, str] = {"index": _quote(index)}
|
|
364
|
+
__path = f'/{__path_parts["index"]}/_rollup_search'
|
|
328
365
|
__query: t.Dict[str, t.Any] = {}
|
|
329
366
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
330
367
|
if error_trace is not None:
|
|
@@ -350,7 +387,13 @@ class RollupClient(NamespacedClient):
|
|
|
350
387
|
__body["size"] = size
|
|
351
388
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
352
389
|
return self.perform_request( # type: ignore[return-value]
|
|
353
|
-
"POST",
|
|
390
|
+
"POST",
|
|
391
|
+
__path,
|
|
392
|
+
params=__query,
|
|
393
|
+
headers=__headers,
|
|
394
|
+
body=__body,
|
|
395
|
+
endpoint_id="rollup.rollup_search",
|
|
396
|
+
path_parts=__path_parts,
|
|
354
397
|
)
|
|
355
398
|
|
|
356
399
|
@_rewrite_parameters()
|
|
@@ -366,13 +409,14 @@ class RollupClient(NamespacedClient):
|
|
|
366
409
|
"""
|
|
367
410
|
Starts an existing, stopped rollup job.
|
|
368
411
|
|
|
369
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
412
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-start-job.html>`_
|
|
370
413
|
|
|
371
414
|
:param id: Identifier for the rollup job.
|
|
372
415
|
"""
|
|
373
416
|
if id in SKIP_IN_PATH:
|
|
374
417
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
375
|
-
|
|
418
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
419
|
+
__path = f'/_rollup/job/{__path_parts["id"]}/_start'
|
|
376
420
|
__query: t.Dict[str, t.Any] = {}
|
|
377
421
|
if error_trace is not None:
|
|
378
422
|
__query["error_trace"] = error_trace
|
|
@@ -384,7 +428,12 @@ class RollupClient(NamespacedClient):
|
|
|
384
428
|
__query["pretty"] = pretty
|
|
385
429
|
__headers = {"accept": "application/json"}
|
|
386
430
|
return self.perform_request( # type: ignore[return-value]
|
|
387
|
-
"POST",
|
|
431
|
+
"POST",
|
|
432
|
+
__path,
|
|
433
|
+
params=__query,
|
|
434
|
+
headers=__headers,
|
|
435
|
+
endpoint_id="rollup.start_job",
|
|
436
|
+
path_parts=__path_parts,
|
|
388
437
|
)
|
|
389
438
|
|
|
390
439
|
@_rewrite_parameters()
|
|
@@ -402,7 +451,7 @@ class RollupClient(NamespacedClient):
|
|
|
402
451
|
"""
|
|
403
452
|
Stops an existing, started rollup job.
|
|
404
453
|
|
|
405
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
454
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/rollup-stop-job.html>`_
|
|
406
455
|
|
|
407
456
|
:param id: Identifier for the rollup job.
|
|
408
457
|
:param timeout: If `wait_for_completion` is `true`, the API blocks for (at maximum)
|
|
@@ -414,7 +463,8 @@ class RollupClient(NamespacedClient):
|
|
|
414
463
|
"""
|
|
415
464
|
if id in SKIP_IN_PATH:
|
|
416
465
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
417
|
-
|
|
466
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
467
|
+
__path = f'/_rollup/job/{__path_parts["id"]}/_stop'
|
|
418
468
|
__query: t.Dict[str, t.Any] = {}
|
|
419
469
|
if error_trace is not None:
|
|
420
470
|
__query["error_trace"] = error_trace
|
|
@@ -430,5 +480,10 @@ class RollupClient(NamespacedClient):
|
|
|
430
480
|
__query["wait_for_completion"] = wait_for_completion
|
|
431
481
|
__headers = {"accept": "application/json"}
|
|
432
482
|
return self.perform_request( # type: ignore[return-value]
|
|
433
|
-
"POST",
|
|
483
|
+
"POST",
|
|
484
|
+
__path,
|
|
485
|
+
params=__query,
|
|
486
|
+
headers=__headers,
|
|
487
|
+
endpoint_id="rollup.stop_job",
|
|
488
|
+
path_parts=__path_parts,
|
|
434
489
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class SearchApplicationClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def delete(
|
|
29
30
|
self,
|
|
@@ -37,13 +38,14 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
37
38
|
"""
|
|
38
39
|
Deletes a search application.
|
|
39
40
|
|
|
40
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
41
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-search-application.html>`_
|
|
41
42
|
|
|
42
43
|
:param name: The name of the search application to delete
|
|
43
44
|
"""
|
|
44
45
|
if name in SKIP_IN_PATH:
|
|
45
46
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
46
|
-
|
|
47
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
48
|
+
__path = f'/_application/search_application/{__path_parts["name"]}'
|
|
47
49
|
__query: t.Dict[str, t.Any] = {}
|
|
48
50
|
if error_trace is not None:
|
|
49
51
|
__query["error_trace"] = error_trace
|
|
@@ -55,7 +57,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
55
57
|
__query["pretty"] = pretty
|
|
56
58
|
__headers = {"accept": "application/json"}
|
|
57
59
|
return self.perform_request( # type: ignore[return-value]
|
|
58
|
-
"DELETE",
|
|
60
|
+
"DELETE",
|
|
61
|
+
__path,
|
|
62
|
+
params=__query,
|
|
63
|
+
headers=__headers,
|
|
64
|
+
endpoint_id="search_application.delete",
|
|
65
|
+
path_parts=__path_parts,
|
|
59
66
|
)
|
|
60
67
|
|
|
61
68
|
@_rewrite_parameters()
|
|
@@ -71,13 +78,14 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
71
78
|
"""
|
|
72
79
|
Delete a behavioral analytics collection.
|
|
73
80
|
|
|
74
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
81
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-analytics-collection.html>`_
|
|
75
82
|
|
|
76
83
|
:param name: The name of the analytics collection to be deleted
|
|
77
84
|
"""
|
|
78
85
|
if name in SKIP_IN_PATH:
|
|
79
86
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
80
|
-
|
|
87
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
88
|
+
__path = f'/_application/analytics/{__path_parts["name"]}'
|
|
81
89
|
__query: t.Dict[str, t.Any] = {}
|
|
82
90
|
if error_trace is not None:
|
|
83
91
|
__query["error_trace"] = error_trace
|
|
@@ -89,7 +97,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
89
97
|
__query["pretty"] = pretty
|
|
90
98
|
__headers = {"accept": "application/json"}
|
|
91
99
|
return self.perform_request( # type: ignore[return-value]
|
|
92
|
-
"DELETE",
|
|
100
|
+
"DELETE",
|
|
101
|
+
__path,
|
|
102
|
+
params=__query,
|
|
103
|
+
headers=__headers,
|
|
104
|
+
endpoint_id="search_application.delete_behavioral_analytics",
|
|
105
|
+
path_parts=__path_parts,
|
|
93
106
|
)
|
|
94
107
|
|
|
95
108
|
@_rewrite_parameters()
|
|
@@ -105,13 +118,14 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
105
118
|
"""
|
|
106
119
|
Returns the details about a search application.
|
|
107
120
|
|
|
108
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
121
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-search-application.html>`_
|
|
109
122
|
|
|
110
123
|
:param name: The name of the search application
|
|
111
124
|
"""
|
|
112
125
|
if name in SKIP_IN_PATH:
|
|
113
126
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
114
|
-
|
|
127
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
128
|
+
__path = f'/_application/search_application/{__path_parts["name"]}'
|
|
115
129
|
__query: t.Dict[str, t.Any] = {}
|
|
116
130
|
if error_trace is not None:
|
|
117
131
|
__query["error_trace"] = error_trace
|
|
@@ -123,7 +137,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
123
137
|
__query["pretty"] = pretty
|
|
124
138
|
__headers = {"accept": "application/json"}
|
|
125
139
|
return self.perform_request( # type: ignore[return-value]
|
|
126
|
-
"GET",
|
|
140
|
+
"GET",
|
|
141
|
+
__path,
|
|
142
|
+
params=__query,
|
|
143
|
+
headers=__headers,
|
|
144
|
+
endpoint_id="search_application.get",
|
|
145
|
+
path_parts=__path_parts,
|
|
127
146
|
)
|
|
128
147
|
|
|
129
148
|
@_rewrite_parameters()
|
|
@@ -139,13 +158,16 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
139
158
|
"""
|
|
140
159
|
Returns the existing behavioral analytics collections.
|
|
141
160
|
|
|
142
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
161
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/list-analytics-collection.html>`_
|
|
143
162
|
|
|
144
163
|
:param name: A list of analytics collections to limit the returned information
|
|
145
164
|
"""
|
|
165
|
+
__path_parts: t.Dict[str, str]
|
|
146
166
|
if name not in SKIP_IN_PATH:
|
|
147
|
-
|
|
167
|
+
__path_parts = {"name": _quote(name)}
|
|
168
|
+
__path = f'/_application/analytics/{__path_parts["name"]}'
|
|
148
169
|
else:
|
|
170
|
+
__path_parts = {}
|
|
149
171
|
__path = "/_application/analytics"
|
|
150
172
|
__query: t.Dict[str, t.Any] = {}
|
|
151
173
|
if error_trace is not None:
|
|
@@ -158,7 +180,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
158
180
|
__query["pretty"] = pretty
|
|
159
181
|
__headers = {"accept": "application/json"}
|
|
160
182
|
return self.perform_request( # type: ignore[return-value]
|
|
161
|
-
"GET",
|
|
183
|
+
"GET",
|
|
184
|
+
__path,
|
|
185
|
+
params=__query,
|
|
186
|
+
headers=__headers,
|
|
187
|
+
endpoint_id="search_application.get_behavioral_analytics",
|
|
188
|
+
path_parts=__path_parts,
|
|
162
189
|
)
|
|
163
190
|
|
|
164
191
|
@_rewrite_parameters(
|
|
@@ -178,12 +205,13 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
178
205
|
"""
|
|
179
206
|
Returns the existing search applications.
|
|
180
207
|
|
|
181
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
208
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/list-search-applications.html>`_
|
|
182
209
|
|
|
183
210
|
:param from_: Starting offset.
|
|
184
211
|
:param q: Query in the Lucene query string syntax.
|
|
185
212
|
:param size: Specifies a max number of results to get.
|
|
186
213
|
"""
|
|
214
|
+
__path_parts: t.Dict[str, str] = {}
|
|
187
215
|
__path = "/_application/search_application"
|
|
188
216
|
__query: t.Dict[str, t.Any] = {}
|
|
189
217
|
if error_trace is not None:
|
|
@@ -202,7 +230,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
202
230
|
__query["size"] = size
|
|
203
231
|
__headers = {"accept": "application/json"}
|
|
204
232
|
return self.perform_request( # type: ignore[return-value]
|
|
205
|
-
"GET",
|
|
233
|
+
"GET",
|
|
234
|
+
__path,
|
|
235
|
+
params=__query,
|
|
236
|
+
headers=__headers,
|
|
237
|
+
endpoint_id="search_application.list",
|
|
238
|
+
path_parts=__path_parts,
|
|
206
239
|
)
|
|
207
240
|
|
|
208
241
|
@_rewrite_parameters(
|
|
@@ -223,7 +256,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
223
256
|
"""
|
|
224
257
|
Creates or updates a search application.
|
|
225
258
|
|
|
226
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
259
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-search-application.html>`_
|
|
227
260
|
|
|
228
261
|
:param name: The name of the search application to be created or updated.
|
|
229
262
|
:param search_application:
|
|
@@ -238,7 +271,8 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
238
271
|
)
|
|
239
272
|
elif search_application is not None and body is not None:
|
|
240
273
|
raise ValueError("Cannot set both 'search_application' and 'body'")
|
|
241
|
-
|
|
274
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
275
|
+
__path = f'/_application/search_application/{__path_parts["name"]}'
|
|
242
276
|
__query: t.Dict[str, t.Any] = {}
|
|
243
277
|
if create is not None:
|
|
244
278
|
__query["create"] = create
|
|
@@ -253,7 +287,13 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
253
287
|
__body = search_application if search_application is not None else body
|
|
254
288
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
255
289
|
return self.perform_request( # type: ignore[return-value]
|
|
256
|
-
"PUT",
|
|
290
|
+
"PUT",
|
|
291
|
+
__path,
|
|
292
|
+
params=__query,
|
|
293
|
+
headers=__headers,
|
|
294
|
+
body=__body,
|
|
295
|
+
endpoint_id="search_application.put",
|
|
296
|
+
path_parts=__path_parts,
|
|
257
297
|
)
|
|
258
298
|
|
|
259
299
|
@_rewrite_parameters()
|
|
@@ -269,13 +309,14 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
269
309
|
"""
|
|
270
310
|
Creates a behavioral analytics collection.
|
|
271
311
|
|
|
272
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
312
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/put-analytics-collection.html>`_
|
|
273
313
|
|
|
274
314
|
:param name: The name of the analytics collection to be created or updated.
|
|
275
315
|
"""
|
|
276
316
|
if name in SKIP_IN_PATH:
|
|
277
317
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
278
|
-
|
|
318
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
319
|
+
__path = f'/_application/analytics/{__path_parts["name"]}'
|
|
279
320
|
__query: t.Dict[str, t.Any] = {}
|
|
280
321
|
if error_trace is not None:
|
|
281
322
|
__query["error_trace"] = error_trace
|
|
@@ -287,7 +328,12 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
287
328
|
__query["pretty"] = pretty
|
|
288
329
|
__headers = {"accept": "application/json"}
|
|
289
330
|
return self.perform_request( # type: ignore[return-value]
|
|
290
|
-
"PUT",
|
|
331
|
+
"PUT",
|
|
332
|
+
__path,
|
|
333
|
+
params=__query,
|
|
334
|
+
headers=__headers,
|
|
335
|
+
endpoint_id="search_application.put_behavioral_analytics",
|
|
336
|
+
path_parts=__path_parts,
|
|
291
337
|
)
|
|
292
338
|
|
|
293
339
|
@_rewrite_parameters(
|
|
@@ -308,7 +354,7 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
308
354
|
"""
|
|
309
355
|
Perform a search against a search application
|
|
310
356
|
|
|
311
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
357
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/search-application-search.html>`_
|
|
312
358
|
|
|
313
359
|
:param name: The name of the search application to be searched.
|
|
314
360
|
:param params: Query parameters specific to this request, which will override
|
|
@@ -316,7 +362,8 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
316
362
|
"""
|
|
317
363
|
if name in SKIP_IN_PATH:
|
|
318
364
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
319
|
-
|
|
365
|
+
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
366
|
+
__path = f'/_application/search_application/{__path_parts["name"]}/_search'
|
|
320
367
|
__query: t.Dict[str, t.Any] = {}
|
|
321
368
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
322
369
|
if error_trace is not None:
|
|
@@ -336,5 +383,11 @@ class SearchApplicationClient(NamespacedClient):
|
|
|
336
383
|
if __body is not None:
|
|
337
384
|
__headers["content-type"] = "application/json"
|
|
338
385
|
return self.perform_request( # type: ignore[return-value]
|
|
339
|
-
"POST",
|
|
386
|
+
"POST",
|
|
387
|
+
__path,
|
|
388
|
+
params=__query,
|
|
389
|
+
headers=__headers,
|
|
390
|
+
body=__body,
|
|
391
|
+
endpoint_id="search_application.search",
|
|
392
|
+
path_parts=__path_parts,
|
|
340
393
|
)
|
|
@@ -24,6 +24,7 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class SearchableSnapshotsClient(NamespacedClient):
|
|
27
|
+
|
|
27
28
|
@_rewrite_parameters()
|
|
28
29
|
def cache_stats(
|
|
29
30
|
self,
|
|
@@ -40,16 +41,19 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
40
41
|
"""
|
|
41
42
|
Retrieve node-level cache statistics about searchable snapshots.
|
|
42
43
|
|
|
43
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
44
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
|
|
44
45
|
|
|
45
46
|
:param node_id: A comma-separated list of node IDs or names to limit the returned
|
|
46
47
|
information; use `_local` to return information from the node you're connecting
|
|
47
48
|
to, leave empty to get information from all nodes
|
|
48
49
|
:param master_timeout:
|
|
49
50
|
"""
|
|
51
|
+
__path_parts: t.Dict[str, str]
|
|
50
52
|
if node_id not in SKIP_IN_PATH:
|
|
51
|
-
|
|
53
|
+
__path_parts = {"node_id": _quote(node_id)}
|
|
54
|
+
__path = f'/_searchable_snapshots/{__path_parts["node_id"]}/cache/stats'
|
|
52
55
|
else:
|
|
56
|
+
__path_parts = {}
|
|
53
57
|
__path = "/_searchable_snapshots/cache/stats"
|
|
54
58
|
__query: t.Dict[str, t.Any] = {}
|
|
55
59
|
if error_trace is not None:
|
|
@@ -64,7 +68,12 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
64
68
|
__query["pretty"] = pretty
|
|
65
69
|
__headers = {"accept": "application/json"}
|
|
66
70
|
return self.perform_request( # type: ignore[return-value]
|
|
67
|
-
"GET",
|
|
71
|
+
"GET",
|
|
72
|
+
__path,
|
|
73
|
+
params=__query,
|
|
74
|
+
headers=__headers,
|
|
75
|
+
endpoint_id="searchable_snapshots.cache_stats",
|
|
76
|
+
path_parts=__path_parts,
|
|
68
77
|
)
|
|
69
78
|
|
|
70
79
|
@_rewrite_parameters()
|
|
@@ -90,7 +99,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
90
99
|
"""
|
|
91
100
|
Clear the cache of searchable snapshots.
|
|
92
101
|
|
|
93
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
102
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
|
|
94
103
|
|
|
95
104
|
:param index: A comma-separated list of index names
|
|
96
105
|
:param allow_no_indices: Whether to ignore if a wildcard indices expression resolves
|
|
@@ -101,9 +110,12 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
101
110
|
:param ignore_unavailable: Whether specified concrete indices should be ignored
|
|
102
111
|
when unavailable (missing or closed)
|
|
103
112
|
"""
|
|
113
|
+
__path_parts: t.Dict[str, str]
|
|
104
114
|
if index not in SKIP_IN_PATH:
|
|
105
|
-
|
|
115
|
+
__path_parts = {"index": _quote(index)}
|
|
116
|
+
__path = f'/{__path_parts["index"]}/_searchable_snapshots/cache/clear'
|
|
106
117
|
else:
|
|
118
|
+
__path_parts = {}
|
|
107
119
|
__path = "/_searchable_snapshots/cache/clear"
|
|
108
120
|
__query: t.Dict[str, t.Any] = {}
|
|
109
121
|
if allow_no_indices is not None:
|
|
@@ -122,7 +134,12 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
122
134
|
__query["pretty"] = pretty
|
|
123
135
|
__headers = {"accept": "application/json"}
|
|
124
136
|
return self.perform_request( # type: ignore[return-value]
|
|
125
|
-
"POST",
|
|
137
|
+
"POST",
|
|
138
|
+
__path,
|
|
139
|
+
params=__query,
|
|
140
|
+
headers=__headers,
|
|
141
|
+
endpoint_id="searchable_snapshots.clear_cache",
|
|
142
|
+
path_parts=__path_parts,
|
|
126
143
|
)
|
|
127
144
|
|
|
128
145
|
@_rewrite_parameters(
|
|
@@ -156,7 +173,7 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
156
173
|
"""
|
|
157
174
|
Mount a snapshot as a searchable index.
|
|
158
175
|
|
|
159
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
176
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-api-mount-snapshot.html>`_
|
|
160
177
|
|
|
161
178
|
:param repository: The name of the repository containing the snapshot of the
|
|
162
179
|
index to mount
|
|
@@ -177,7 +194,13 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
177
194
|
raise ValueError("Empty value passed for parameter 'snapshot'")
|
|
178
195
|
if index is None and body is None:
|
|
179
196
|
raise ValueError("Empty value passed for parameter 'index'")
|
|
180
|
-
|
|
197
|
+
__path_parts: t.Dict[str, str] = {
|
|
198
|
+
"repository": _quote(repository),
|
|
199
|
+
"snapshot": _quote(snapshot),
|
|
200
|
+
}
|
|
201
|
+
__path = (
|
|
202
|
+
f'/_snapshot/{__path_parts["repository"]}/{__path_parts["snapshot"]}/_mount'
|
|
203
|
+
)
|
|
181
204
|
__query: t.Dict[str, t.Any] = {}
|
|
182
205
|
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
183
206
|
if error_trace is not None:
|
|
@@ -205,7 +228,13 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
205
228
|
__body["renamed_index"] = renamed_index
|
|
206
229
|
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
207
230
|
return self.perform_request( # type: ignore[return-value]
|
|
208
|
-
"POST",
|
|
231
|
+
"POST",
|
|
232
|
+
__path,
|
|
233
|
+
params=__query,
|
|
234
|
+
headers=__headers,
|
|
235
|
+
body=__body,
|
|
236
|
+
endpoint_id="searchable_snapshots.mount",
|
|
237
|
+
path_parts=__path_parts,
|
|
209
238
|
)
|
|
210
239
|
|
|
211
240
|
@_rewrite_parameters()
|
|
@@ -224,14 +253,17 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
224
253
|
"""
|
|
225
254
|
Retrieve shard-level statistics about searchable snapshots.
|
|
226
255
|
|
|
227
|
-
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
|
256
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.13/searchable-snapshots-apis.html>`_
|
|
228
257
|
|
|
229
258
|
:param index: A comma-separated list of index names
|
|
230
259
|
:param level: Return stats aggregated at cluster, index or shard level
|
|
231
260
|
"""
|
|
261
|
+
__path_parts: t.Dict[str, str]
|
|
232
262
|
if index not in SKIP_IN_PATH:
|
|
233
|
-
|
|
263
|
+
__path_parts = {"index": _quote(index)}
|
|
264
|
+
__path = f'/{__path_parts["index"]}/_searchable_snapshots/stats'
|
|
234
265
|
else:
|
|
266
|
+
__path_parts = {}
|
|
235
267
|
__path = "/_searchable_snapshots/stats"
|
|
236
268
|
__query: t.Dict[str, t.Any] = {}
|
|
237
269
|
if error_trace is not None:
|
|
@@ -246,5 +278,10 @@ class SearchableSnapshotsClient(NamespacedClient):
|
|
|
246
278
|
__query["pretty"] = pretty
|
|
247
279
|
__headers = {"accept": "application/json"}
|
|
248
280
|
return self.perform_request( # type: ignore[return-value]
|
|
249
|
-
"GET",
|
|
281
|
+
"GET",
|
|
282
|
+
__path,
|
|
283
|
+
params=__query,
|
|
284
|
+
headers=__headers,
|
|
285
|
+
endpoint_id="searchable_snapshots.stats",
|
|
286
|
+
path_parts=__path_parts,
|
|
250
287
|
)
|