elasticsearch 8.15.0__py3-none-any.whl → 8.15.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 +4 -0
- elasticsearch/_async/client/indices.py +13 -0
- elasticsearch/_async/client/ingest.py +175 -0
- elasticsearch/_async/client/synonyms.py +3 -1
- elasticsearch/_otel.py +22 -0
- elasticsearch/_sync/client/__init__.py +4 -0
- elasticsearch/_sync/client/indices.py +13 -0
- elasticsearch/_sync/client/ingest.py +175 -0
- elasticsearch/_sync/client/synonyms.py +3 -1
- elasticsearch/_version.py +1 -1
- elasticsearch/helpers/actions.py +120 -106
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.15.1.dist-info}/METADATA +2 -2
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.15.1.dist-info}/RECORD +16 -16
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.15.1.dist-info}/WHEEL +0 -0
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.15.1.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.15.0.dist-info → elasticsearch-8.15.1.dist-info}/licenses/NOTICE +0 -0
|
@@ -4980,6 +4980,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
4980
4980
|
pipeline: t.Optional[str] = None,
|
|
4981
4981
|
preference: t.Optional[str] = None,
|
|
4982
4982
|
pretty: t.Optional[bool] = None,
|
|
4983
|
+
q: t.Optional[str] = None,
|
|
4983
4984
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4984
4985
|
refresh: t.Optional[bool] = None,
|
|
4985
4986
|
request_cache: t.Optional[bool] = None,
|
|
@@ -5046,6 +5047,7 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5046
5047
|
parameter.
|
|
5047
5048
|
:param preference: Specifies the node or shard the operation should be performed
|
|
5048
5049
|
on. Random by default.
|
|
5050
|
+
:param q: Query in the Lucene query string syntax.
|
|
5049
5051
|
:param query: Specifies the documents to update using the Query DSL.
|
|
5050
5052
|
:param refresh: If `true`, Elasticsearch refreshes affected shards to make the
|
|
5051
5053
|
operation visible to search.
|
|
@@ -5130,6 +5132,8 @@ class AsyncElasticsearch(BaseClient):
|
|
|
5130
5132
|
__query["preference"] = preference
|
|
5131
5133
|
if pretty is not None:
|
|
5132
5134
|
__query["pretty"] = pretty
|
|
5135
|
+
if q is not None:
|
|
5136
|
+
__query["q"] = q
|
|
5133
5137
|
if refresh is not None:
|
|
5134
5138
|
__query["refresh"] = refresh
|
|
5135
5139
|
if request_cache is not None:
|
|
@@ -3614,6 +3614,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3614
3614
|
self,
|
|
3615
3615
|
*,
|
|
3616
3616
|
name: t.Union[str, t.Sequence[str]],
|
|
3617
|
+
allow_no_indices: t.Optional[bool] = None,
|
|
3617
3618
|
error_trace: t.Optional[bool] = None,
|
|
3618
3619
|
expand_wildcards: t.Optional[
|
|
3619
3620
|
t.Union[
|
|
@@ -3625,6 +3626,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3625
3626
|
] = None,
|
|
3626
3627
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3627
3628
|
human: t.Optional[bool] = None,
|
|
3629
|
+
ignore_unavailable: t.Optional[bool] = None,
|
|
3628
3630
|
pretty: t.Optional[bool] = None,
|
|
3629
3631
|
) -> ObjectApiResponse[t.Any]:
|
|
3630
3632
|
"""
|
|
@@ -3636,16 +3638,25 @@ class IndicesClient(NamespacedClient):
|
|
|
3636
3638
|
:param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
|
|
3637
3639
|
and data streams to resolve. Resources on remote clusters can be specified
|
|
3638
3640
|
using the `<cluster>`:`<name>` syntax.
|
|
3641
|
+
:param allow_no_indices: If `false`, the request returns an error if any wildcard
|
|
3642
|
+
expression, index alias, or `_all` value targets only missing or closed indices.
|
|
3643
|
+
This behavior applies even if the request targets other open indices. For
|
|
3644
|
+
example, a request targeting `foo*,bar*` returns an error if an index starts
|
|
3645
|
+
with `foo` but no index starts with `bar`.
|
|
3639
3646
|
:param expand_wildcards: Type of index that wildcard patterns can match. If the
|
|
3640
3647
|
request can target data streams, this argument determines whether wildcard
|
|
3641
3648
|
expressions match hidden data streams. Supports comma-separated values, such
|
|
3642
3649
|
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
|
|
3650
|
+
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
3651
|
+
a missing or closed index.
|
|
3643
3652
|
"""
|
|
3644
3653
|
if name in SKIP_IN_PATH:
|
|
3645
3654
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
3646
3655
|
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
3647
3656
|
__path = f'/_resolve/index/{__path_parts["name"]}'
|
|
3648
3657
|
__query: t.Dict[str, t.Any] = {}
|
|
3658
|
+
if allow_no_indices is not None:
|
|
3659
|
+
__query["allow_no_indices"] = allow_no_indices
|
|
3649
3660
|
if error_trace is not None:
|
|
3650
3661
|
__query["error_trace"] = error_trace
|
|
3651
3662
|
if expand_wildcards is not None:
|
|
@@ -3654,6 +3665,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3654
3665
|
__query["filter_path"] = filter_path
|
|
3655
3666
|
if human is not None:
|
|
3656
3667
|
__query["human"] = human
|
|
3668
|
+
if ignore_unavailable is not None:
|
|
3669
|
+
__query["ignore_unavailable"] = ignore_unavailable
|
|
3657
3670
|
if pretty is not None:
|
|
3658
3671
|
__query["pretty"] = pretty
|
|
3659
3672
|
__headers = {"accept": "application/json"}
|
|
@@ -25,6 +25,57 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
25
25
|
|
|
26
26
|
class IngestClient(NamespacedClient):
|
|
27
27
|
|
|
28
|
+
@_rewrite_parameters()
|
|
29
|
+
async def delete_geoip_database(
|
|
30
|
+
self,
|
|
31
|
+
*,
|
|
32
|
+
id: t.Union[str, t.Sequence[str]],
|
|
33
|
+
error_trace: t.Optional[bool] = None,
|
|
34
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
|
+
human: t.Optional[bool] = None,
|
|
36
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
37
|
+
pretty: t.Optional[bool] = None,
|
|
38
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
39
|
+
) -> ObjectApiResponse[t.Any]:
|
|
40
|
+
"""
|
|
41
|
+
Deletes a geoip database configuration.
|
|
42
|
+
|
|
43
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
44
|
+
|
|
45
|
+
:param id: A comma-separated list of geoip database configurations to delete
|
|
46
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
47
|
+
no response is received before the timeout expires, the request fails and
|
|
48
|
+
returns an error.
|
|
49
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
50
|
+
the timeout expires, the request fails and returns an error.
|
|
51
|
+
"""
|
|
52
|
+
if id in SKIP_IN_PATH:
|
|
53
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
54
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
55
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
56
|
+
__query: t.Dict[str, t.Any] = {}
|
|
57
|
+
if error_trace is not None:
|
|
58
|
+
__query["error_trace"] = error_trace
|
|
59
|
+
if filter_path is not None:
|
|
60
|
+
__query["filter_path"] = filter_path
|
|
61
|
+
if human is not None:
|
|
62
|
+
__query["human"] = human
|
|
63
|
+
if master_timeout is not None:
|
|
64
|
+
__query["master_timeout"] = master_timeout
|
|
65
|
+
if pretty is not None:
|
|
66
|
+
__query["pretty"] = pretty
|
|
67
|
+
if timeout is not None:
|
|
68
|
+
__query["timeout"] = timeout
|
|
69
|
+
__headers = {"accept": "application/json"}
|
|
70
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
71
|
+
"DELETE",
|
|
72
|
+
__path,
|
|
73
|
+
params=__query,
|
|
74
|
+
headers=__headers,
|
|
75
|
+
endpoint_id="ingest.delete_geoip_database",
|
|
76
|
+
path_parts=__path_parts,
|
|
77
|
+
)
|
|
78
|
+
|
|
28
79
|
@_rewrite_parameters()
|
|
29
80
|
async def delete_pipeline(
|
|
30
81
|
self,
|
|
@@ -112,6 +163,57 @@ class IngestClient(NamespacedClient):
|
|
|
112
163
|
path_parts=__path_parts,
|
|
113
164
|
)
|
|
114
165
|
|
|
166
|
+
@_rewrite_parameters()
|
|
167
|
+
async def get_geoip_database(
|
|
168
|
+
self,
|
|
169
|
+
*,
|
|
170
|
+
id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
171
|
+
error_trace: t.Optional[bool] = None,
|
|
172
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
173
|
+
human: t.Optional[bool] = None,
|
|
174
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
175
|
+
pretty: t.Optional[bool] = None,
|
|
176
|
+
) -> ObjectApiResponse[t.Any]:
|
|
177
|
+
"""
|
|
178
|
+
Returns information about one or more geoip database configurations.
|
|
179
|
+
|
|
180
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
181
|
+
|
|
182
|
+
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
|
|
183
|
+
(`*`) expressions are supported. To get all database configurations, omit
|
|
184
|
+
this parameter or use `*`.
|
|
185
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
186
|
+
no response is received before the timeout expires, the request fails and
|
|
187
|
+
returns an error.
|
|
188
|
+
"""
|
|
189
|
+
__path_parts: t.Dict[str, str]
|
|
190
|
+
if id not in SKIP_IN_PATH:
|
|
191
|
+
__path_parts = {"id": _quote(id)}
|
|
192
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
193
|
+
else:
|
|
194
|
+
__path_parts = {}
|
|
195
|
+
__path = "/_ingest/geoip/database"
|
|
196
|
+
__query: t.Dict[str, t.Any] = {}
|
|
197
|
+
if error_trace is not None:
|
|
198
|
+
__query["error_trace"] = error_trace
|
|
199
|
+
if filter_path is not None:
|
|
200
|
+
__query["filter_path"] = filter_path
|
|
201
|
+
if human is not None:
|
|
202
|
+
__query["human"] = human
|
|
203
|
+
if master_timeout is not None:
|
|
204
|
+
__query["master_timeout"] = master_timeout
|
|
205
|
+
if pretty is not None:
|
|
206
|
+
__query["pretty"] = pretty
|
|
207
|
+
__headers = {"accept": "application/json"}
|
|
208
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
209
|
+
"GET",
|
|
210
|
+
__path,
|
|
211
|
+
params=__query,
|
|
212
|
+
headers=__headers,
|
|
213
|
+
endpoint_id="ingest.get_geoip_database",
|
|
214
|
+
path_parts=__path_parts,
|
|
215
|
+
)
|
|
216
|
+
|
|
115
217
|
@_rewrite_parameters()
|
|
116
218
|
async def get_pipeline(
|
|
117
219
|
self,
|
|
@@ -205,6 +307,79 @@ class IngestClient(NamespacedClient):
|
|
|
205
307
|
path_parts=__path_parts,
|
|
206
308
|
)
|
|
207
309
|
|
|
310
|
+
@_rewrite_parameters(
|
|
311
|
+
body_fields=("maxmind", "name"),
|
|
312
|
+
)
|
|
313
|
+
async def put_geoip_database(
|
|
314
|
+
self,
|
|
315
|
+
*,
|
|
316
|
+
id: str,
|
|
317
|
+
maxmind: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
318
|
+
name: t.Optional[str] = None,
|
|
319
|
+
error_trace: t.Optional[bool] = None,
|
|
320
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
321
|
+
human: t.Optional[bool] = None,
|
|
322
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
323
|
+
pretty: t.Optional[bool] = None,
|
|
324
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
325
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
326
|
+
) -> ObjectApiResponse[t.Any]:
|
|
327
|
+
"""
|
|
328
|
+
Returns information about one or more geoip database configurations.
|
|
329
|
+
|
|
330
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
331
|
+
|
|
332
|
+
:param id: ID of the database configuration to create or update.
|
|
333
|
+
:param maxmind: The configuration necessary to identify which IP geolocation
|
|
334
|
+
provider to use to download the database, as well as any provider-specific
|
|
335
|
+
configuration necessary for such downloading. At present, the only supported
|
|
336
|
+
provider is maxmind, and the maxmind provider requires that an account_id
|
|
337
|
+
(string) is configured.
|
|
338
|
+
:param name: The provider-assigned name of the IP geolocation database to download.
|
|
339
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
340
|
+
no response is received before the timeout expires, the request fails and
|
|
341
|
+
returns an error.
|
|
342
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
343
|
+
the timeout expires, the request fails and returns an error.
|
|
344
|
+
"""
|
|
345
|
+
if id in SKIP_IN_PATH:
|
|
346
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
347
|
+
if maxmind is None and body is None:
|
|
348
|
+
raise ValueError("Empty value passed for parameter 'maxmind'")
|
|
349
|
+
if name is None and body is None:
|
|
350
|
+
raise ValueError("Empty value passed for parameter 'name'")
|
|
351
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
352
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
353
|
+
__query: t.Dict[str, t.Any] = {}
|
|
354
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
355
|
+
if error_trace is not None:
|
|
356
|
+
__query["error_trace"] = error_trace
|
|
357
|
+
if filter_path is not None:
|
|
358
|
+
__query["filter_path"] = filter_path
|
|
359
|
+
if human is not None:
|
|
360
|
+
__query["human"] = human
|
|
361
|
+
if master_timeout is not None:
|
|
362
|
+
__query["master_timeout"] = master_timeout
|
|
363
|
+
if pretty is not None:
|
|
364
|
+
__query["pretty"] = pretty
|
|
365
|
+
if timeout is not None:
|
|
366
|
+
__query["timeout"] = timeout
|
|
367
|
+
if not __body:
|
|
368
|
+
if maxmind is not None:
|
|
369
|
+
__body["maxmind"] = maxmind
|
|
370
|
+
if name is not None:
|
|
371
|
+
__body["name"] = name
|
|
372
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
373
|
+
return await self.perform_request( # type: ignore[return-value]
|
|
374
|
+
"PUT",
|
|
375
|
+
__path,
|
|
376
|
+
params=__query,
|
|
377
|
+
headers=__headers,
|
|
378
|
+
body=__body,
|
|
379
|
+
endpoint_id="ingest.put_geoip_database",
|
|
380
|
+
path_parts=__path_parts,
|
|
381
|
+
)
|
|
382
|
+
|
|
208
383
|
@_rewrite_parameters(
|
|
209
384
|
body_fields=("description", "meta", "on_failure", "processors", "version"),
|
|
210
385
|
parameter_aliases={"_meta": "meta"},
|
|
@@ -262,7 +262,9 @@ class SynonymsClient(NamespacedClient):
|
|
|
262
262
|
self,
|
|
263
263
|
*,
|
|
264
264
|
id: str,
|
|
265
|
-
synonyms_set: t.Optional[
|
|
265
|
+
synonyms_set: t.Optional[
|
|
266
|
+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
267
|
+
] = None,
|
|
266
268
|
error_trace: t.Optional[bool] = None,
|
|
267
269
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
268
270
|
human: t.Optional[bool] = None,
|
elasticsearch/_otel.py
CHANGED
|
@@ -86,3 +86,25 @@ class OpenTelemetry:
|
|
|
86
86
|
endpoint_id=endpoint_id,
|
|
87
87
|
body_strategy=self.body_strategy,
|
|
88
88
|
)
|
|
89
|
+
|
|
90
|
+
@contextlib.contextmanager
|
|
91
|
+
def helpers_span(self, span_name: str) -> Generator[OpenTelemetrySpan, None, None]:
|
|
92
|
+
if not self.enabled or self.tracer is None:
|
|
93
|
+
yield OpenTelemetrySpan(None)
|
|
94
|
+
return
|
|
95
|
+
|
|
96
|
+
with self.tracer.start_as_current_span(span_name) as otel_span:
|
|
97
|
+
otel_span.set_attribute("db.system", "elasticsearch")
|
|
98
|
+
otel_span.set_attribute("db.operation", span_name)
|
|
99
|
+
# Without a request method, Elastic APM does not display the traces
|
|
100
|
+
otel_span.set_attribute("http.request.method", "null")
|
|
101
|
+
yield OpenTelemetrySpan(otel_span)
|
|
102
|
+
|
|
103
|
+
@contextlib.contextmanager
|
|
104
|
+
def use_span(self, span: OpenTelemetrySpan) -> Generator[None, None, None]:
|
|
105
|
+
if not self.enabled or self.tracer is None:
|
|
106
|
+
yield
|
|
107
|
+
return
|
|
108
|
+
|
|
109
|
+
with trace.use_span(span.otel_span):
|
|
110
|
+
yield
|
|
@@ -4978,6 +4978,7 @@ class Elasticsearch(BaseClient):
|
|
|
4978
4978
|
pipeline: t.Optional[str] = None,
|
|
4979
4979
|
preference: t.Optional[str] = None,
|
|
4980
4980
|
pretty: t.Optional[bool] = None,
|
|
4981
|
+
q: t.Optional[str] = None,
|
|
4981
4982
|
query: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
4982
4983
|
refresh: t.Optional[bool] = None,
|
|
4983
4984
|
request_cache: t.Optional[bool] = None,
|
|
@@ -5044,6 +5045,7 @@ class Elasticsearch(BaseClient):
|
|
|
5044
5045
|
parameter.
|
|
5045
5046
|
:param preference: Specifies the node or shard the operation should be performed
|
|
5046
5047
|
on. Random by default.
|
|
5048
|
+
:param q: Query in the Lucene query string syntax.
|
|
5047
5049
|
:param query: Specifies the documents to update using the Query DSL.
|
|
5048
5050
|
:param refresh: If `true`, Elasticsearch refreshes affected shards to make the
|
|
5049
5051
|
operation visible to search.
|
|
@@ -5128,6 +5130,8 @@ class Elasticsearch(BaseClient):
|
|
|
5128
5130
|
__query["preference"] = preference
|
|
5129
5131
|
if pretty is not None:
|
|
5130
5132
|
__query["pretty"] = pretty
|
|
5133
|
+
if q is not None:
|
|
5134
|
+
__query["q"] = q
|
|
5131
5135
|
if refresh is not None:
|
|
5132
5136
|
__query["refresh"] = refresh
|
|
5133
5137
|
if request_cache is not None:
|
|
@@ -3614,6 +3614,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3614
3614
|
self,
|
|
3615
3615
|
*,
|
|
3616
3616
|
name: t.Union[str, t.Sequence[str]],
|
|
3617
|
+
allow_no_indices: t.Optional[bool] = None,
|
|
3617
3618
|
error_trace: t.Optional[bool] = None,
|
|
3618
3619
|
expand_wildcards: t.Optional[
|
|
3619
3620
|
t.Union[
|
|
@@ -3625,6 +3626,7 @@ class IndicesClient(NamespacedClient):
|
|
|
3625
3626
|
] = None,
|
|
3626
3627
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
3627
3628
|
human: t.Optional[bool] = None,
|
|
3629
|
+
ignore_unavailable: t.Optional[bool] = None,
|
|
3628
3630
|
pretty: t.Optional[bool] = None,
|
|
3629
3631
|
) -> ObjectApiResponse[t.Any]:
|
|
3630
3632
|
"""
|
|
@@ -3636,16 +3638,25 @@ class IndicesClient(NamespacedClient):
|
|
|
3636
3638
|
:param name: Comma-separated name(s) or index pattern(s) of the indices, aliases,
|
|
3637
3639
|
and data streams to resolve. Resources on remote clusters can be specified
|
|
3638
3640
|
using the `<cluster>`:`<name>` syntax.
|
|
3641
|
+
:param allow_no_indices: If `false`, the request returns an error if any wildcard
|
|
3642
|
+
expression, index alias, or `_all` value targets only missing or closed indices.
|
|
3643
|
+
This behavior applies even if the request targets other open indices. For
|
|
3644
|
+
example, a request targeting `foo*,bar*` returns an error if an index starts
|
|
3645
|
+
with `foo` but no index starts with `bar`.
|
|
3639
3646
|
:param expand_wildcards: Type of index that wildcard patterns can match. If the
|
|
3640
3647
|
request can target data streams, this argument determines whether wildcard
|
|
3641
3648
|
expressions match hidden data streams. Supports comma-separated values, such
|
|
3642
3649
|
as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
|
|
3650
|
+
:param ignore_unavailable: If `false`, the request returns an error if it targets
|
|
3651
|
+
a missing or closed index.
|
|
3643
3652
|
"""
|
|
3644
3653
|
if name in SKIP_IN_PATH:
|
|
3645
3654
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
3646
3655
|
__path_parts: t.Dict[str, str] = {"name": _quote(name)}
|
|
3647
3656
|
__path = f'/_resolve/index/{__path_parts["name"]}'
|
|
3648
3657
|
__query: t.Dict[str, t.Any] = {}
|
|
3658
|
+
if allow_no_indices is not None:
|
|
3659
|
+
__query["allow_no_indices"] = allow_no_indices
|
|
3649
3660
|
if error_trace is not None:
|
|
3650
3661
|
__query["error_trace"] = error_trace
|
|
3651
3662
|
if expand_wildcards is not None:
|
|
@@ -3654,6 +3665,8 @@ class IndicesClient(NamespacedClient):
|
|
|
3654
3665
|
__query["filter_path"] = filter_path
|
|
3655
3666
|
if human is not None:
|
|
3656
3667
|
__query["human"] = human
|
|
3668
|
+
if ignore_unavailable is not None:
|
|
3669
|
+
__query["ignore_unavailable"] = ignore_unavailable
|
|
3657
3670
|
if pretty is not None:
|
|
3658
3671
|
__query["pretty"] = pretty
|
|
3659
3672
|
__headers = {"accept": "application/json"}
|
|
@@ -25,6 +25,57 @@ from .utils import SKIP_IN_PATH, _quote, _rewrite_parameters
|
|
|
25
25
|
|
|
26
26
|
class IngestClient(NamespacedClient):
|
|
27
27
|
|
|
28
|
+
@_rewrite_parameters()
|
|
29
|
+
def delete_geoip_database(
|
|
30
|
+
self,
|
|
31
|
+
*,
|
|
32
|
+
id: t.Union[str, t.Sequence[str]],
|
|
33
|
+
error_trace: t.Optional[bool] = None,
|
|
34
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
35
|
+
human: t.Optional[bool] = None,
|
|
36
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
37
|
+
pretty: t.Optional[bool] = None,
|
|
38
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
39
|
+
) -> ObjectApiResponse[t.Any]:
|
|
40
|
+
"""
|
|
41
|
+
Deletes a geoip database configuration.
|
|
42
|
+
|
|
43
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
44
|
+
|
|
45
|
+
:param id: A comma-separated list of geoip database configurations to delete
|
|
46
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
47
|
+
no response is received before the timeout expires, the request fails and
|
|
48
|
+
returns an error.
|
|
49
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
50
|
+
the timeout expires, the request fails and returns an error.
|
|
51
|
+
"""
|
|
52
|
+
if id in SKIP_IN_PATH:
|
|
53
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
54
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
55
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
56
|
+
__query: t.Dict[str, t.Any] = {}
|
|
57
|
+
if error_trace is not None:
|
|
58
|
+
__query["error_trace"] = error_trace
|
|
59
|
+
if filter_path is not None:
|
|
60
|
+
__query["filter_path"] = filter_path
|
|
61
|
+
if human is not None:
|
|
62
|
+
__query["human"] = human
|
|
63
|
+
if master_timeout is not None:
|
|
64
|
+
__query["master_timeout"] = master_timeout
|
|
65
|
+
if pretty is not None:
|
|
66
|
+
__query["pretty"] = pretty
|
|
67
|
+
if timeout is not None:
|
|
68
|
+
__query["timeout"] = timeout
|
|
69
|
+
__headers = {"accept": "application/json"}
|
|
70
|
+
return self.perform_request( # type: ignore[return-value]
|
|
71
|
+
"DELETE",
|
|
72
|
+
__path,
|
|
73
|
+
params=__query,
|
|
74
|
+
headers=__headers,
|
|
75
|
+
endpoint_id="ingest.delete_geoip_database",
|
|
76
|
+
path_parts=__path_parts,
|
|
77
|
+
)
|
|
78
|
+
|
|
28
79
|
@_rewrite_parameters()
|
|
29
80
|
def delete_pipeline(
|
|
30
81
|
self,
|
|
@@ -112,6 +163,57 @@ class IngestClient(NamespacedClient):
|
|
|
112
163
|
path_parts=__path_parts,
|
|
113
164
|
)
|
|
114
165
|
|
|
166
|
+
@_rewrite_parameters()
|
|
167
|
+
def get_geoip_database(
|
|
168
|
+
self,
|
|
169
|
+
*,
|
|
170
|
+
id: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
171
|
+
error_trace: t.Optional[bool] = None,
|
|
172
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
173
|
+
human: t.Optional[bool] = None,
|
|
174
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
175
|
+
pretty: t.Optional[bool] = None,
|
|
176
|
+
) -> ObjectApiResponse[t.Any]:
|
|
177
|
+
"""
|
|
178
|
+
Returns information about one or more geoip database configurations.
|
|
179
|
+
|
|
180
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
181
|
+
|
|
182
|
+
:param id: Comma-separated list of database configuration IDs to retrieve. Wildcard
|
|
183
|
+
(`*`) expressions are supported. To get all database configurations, omit
|
|
184
|
+
this parameter or use `*`.
|
|
185
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
186
|
+
no response is received before the timeout expires, the request fails and
|
|
187
|
+
returns an error.
|
|
188
|
+
"""
|
|
189
|
+
__path_parts: t.Dict[str, str]
|
|
190
|
+
if id not in SKIP_IN_PATH:
|
|
191
|
+
__path_parts = {"id": _quote(id)}
|
|
192
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
193
|
+
else:
|
|
194
|
+
__path_parts = {}
|
|
195
|
+
__path = "/_ingest/geoip/database"
|
|
196
|
+
__query: t.Dict[str, t.Any] = {}
|
|
197
|
+
if error_trace is not None:
|
|
198
|
+
__query["error_trace"] = error_trace
|
|
199
|
+
if filter_path is not None:
|
|
200
|
+
__query["filter_path"] = filter_path
|
|
201
|
+
if human is not None:
|
|
202
|
+
__query["human"] = human
|
|
203
|
+
if master_timeout is not None:
|
|
204
|
+
__query["master_timeout"] = master_timeout
|
|
205
|
+
if pretty is not None:
|
|
206
|
+
__query["pretty"] = pretty
|
|
207
|
+
__headers = {"accept": "application/json"}
|
|
208
|
+
return self.perform_request( # type: ignore[return-value]
|
|
209
|
+
"GET",
|
|
210
|
+
__path,
|
|
211
|
+
params=__query,
|
|
212
|
+
headers=__headers,
|
|
213
|
+
endpoint_id="ingest.get_geoip_database",
|
|
214
|
+
path_parts=__path_parts,
|
|
215
|
+
)
|
|
216
|
+
|
|
115
217
|
@_rewrite_parameters()
|
|
116
218
|
def get_pipeline(
|
|
117
219
|
self,
|
|
@@ -205,6 +307,79 @@ class IngestClient(NamespacedClient):
|
|
|
205
307
|
path_parts=__path_parts,
|
|
206
308
|
)
|
|
207
309
|
|
|
310
|
+
@_rewrite_parameters(
|
|
311
|
+
body_fields=("maxmind", "name"),
|
|
312
|
+
)
|
|
313
|
+
def put_geoip_database(
|
|
314
|
+
self,
|
|
315
|
+
*,
|
|
316
|
+
id: str,
|
|
317
|
+
maxmind: t.Optional[t.Mapping[str, t.Any]] = None,
|
|
318
|
+
name: t.Optional[str] = None,
|
|
319
|
+
error_trace: t.Optional[bool] = None,
|
|
320
|
+
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
321
|
+
human: t.Optional[bool] = None,
|
|
322
|
+
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
323
|
+
pretty: t.Optional[bool] = None,
|
|
324
|
+
timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
|
|
325
|
+
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
326
|
+
) -> ObjectApiResponse[t.Any]:
|
|
327
|
+
"""
|
|
328
|
+
Returns information about one or more geoip database configurations.
|
|
329
|
+
|
|
330
|
+
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.15/TODO.html>`_
|
|
331
|
+
|
|
332
|
+
:param id: ID of the database configuration to create or update.
|
|
333
|
+
:param maxmind: The configuration necessary to identify which IP geolocation
|
|
334
|
+
provider to use to download the database, as well as any provider-specific
|
|
335
|
+
configuration necessary for such downloading. At present, the only supported
|
|
336
|
+
provider is maxmind, and the maxmind provider requires that an account_id
|
|
337
|
+
(string) is configured.
|
|
338
|
+
:param name: The provider-assigned name of the IP geolocation database to download.
|
|
339
|
+
:param master_timeout: Period to wait for a connection to the master node. If
|
|
340
|
+
no response is received before the timeout expires, the request fails and
|
|
341
|
+
returns an error.
|
|
342
|
+
:param timeout: Period to wait for a response. If no response is received before
|
|
343
|
+
the timeout expires, the request fails and returns an error.
|
|
344
|
+
"""
|
|
345
|
+
if id in SKIP_IN_PATH:
|
|
346
|
+
raise ValueError("Empty value passed for parameter 'id'")
|
|
347
|
+
if maxmind is None and body is None:
|
|
348
|
+
raise ValueError("Empty value passed for parameter 'maxmind'")
|
|
349
|
+
if name is None and body is None:
|
|
350
|
+
raise ValueError("Empty value passed for parameter 'name'")
|
|
351
|
+
__path_parts: t.Dict[str, str] = {"id": _quote(id)}
|
|
352
|
+
__path = f'/_ingest/geoip/database/{__path_parts["id"]}'
|
|
353
|
+
__query: t.Dict[str, t.Any] = {}
|
|
354
|
+
__body: t.Dict[str, t.Any] = body if body is not None else {}
|
|
355
|
+
if error_trace is not None:
|
|
356
|
+
__query["error_trace"] = error_trace
|
|
357
|
+
if filter_path is not None:
|
|
358
|
+
__query["filter_path"] = filter_path
|
|
359
|
+
if human is not None:
|
|
360
|
+
__query["human"] = human
|
|
361
|
+
if master_timeout is not None:
|
|
362
|
+
__query["master_timeout"] = master_timeout
|
|
363
|
+
if pretty is not None:
|
|
364
|
+
__query["pretty"] = pretty
|
|
365
|
+
if timeout is not None:
|
|
366
|
+
__query["timeout"] = timeout
|
|
367
|
+
if not __body:
|
|
368
|
+
if maxmind is not None:
|
|
369
|
+
__body["maxmind"] = maxmind
|
|
370
|
+
if name is not None:
|
|
371
|
+
__body["name"] = name
|
|
372
|
+
__headers = {"accept": "application/json", "content-type": "application/json"}
|
|
373
|
+
return self.perform_request( # type: ignore[return-value]
|
|
374
|
+
"PUT",
|
|
375
|
+
__path,
|
|
376
|
+
params=__query,
|
|
377
|
+
headers=__headers,
|
|
378
|
+
body=__body,
|
|
379
|
+
endpoint_id="ingest.put_geoip_database",
|
|
380
|
+
path_parts=__path_parts,
|
|
381
|
+
)
|
|
382
|
+
|
|
208
383
|
@_rewrite_parameters(
|
|
209
384
|
body_fields=("description", "meta", "on_failure", "processors", "version"),
|
|
210
385
|
parameter_aliases={"_meta": "meta"},
|
|
@@ -262,7 +262,9 @@ class SynonymsClient(NamespacedClient):
|
|
|
262
262
|
self,
|
|
263
263
|
*,
|
|
264
264
|
id: str,
|
|
265
|
-
synonyms_set: t.Optional[
|
|
265
|
+
synonyms_set: t.Optional[
|
|
266
|
+
t.Union[t.Mapping[str, t.Any], t.Sequence[t.Mapping[str, t.Any]]]
|
|
267
|
+
] = None,
|
|
266
268
|
error_trace: t.Optional[bool] = None,
|
|
267
269
|
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
|
|
268
270
|
human: t.Optional[bool] = None,
|
elasticsearch/_version.py
CHANGED
elasticsearch/helpers/actions.py
CHANGED
|
@@ -34,6 +34,8 @@ from typing import (
|
|
|
34
34
|
Union,
|
|
35
35
|
)
|
|
36
36
|
|
|
37
|
+
from elastic_transport import OpenTelemetrySpan
|
|
38
|
+
|
|
37
39
|
from .. import Elasticsearch
|
|
38
40
|
from ..compat import to_bytes
|
|
39
41
|
from ..exceptions import ApiError, NotFoundError, TransportError
|
|
@@ -322,6 +324,7 @@ def _process_bulk_chunk(
|
|
|
322
324
|
Tuple[_TYPE_BULK_ACTION_HEADER, _TYPE_BULK_ACTION_BODY],
|
|
323
325
|
]
|
|
324
326
|
],
|
|
327
|
+
otel_span: OpenTelemetrySpan,
|
|
325
328
|
raise_on_exception: bool = True,
|
|
326
329
|
raise_on_error: bool = True,
|
|
327
330
|
ignore_status: Union[int, Collection[int]] = (),
|
|
@@ -331,28 +334,29 @@ def _process_bulk_chunk(
|
|
|
331
334
|
"""
|
|
332
335
|
Send a bulk request to elasticsearch and process the output.
|
|
333
336
|
"""
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
337
|
+
with client._otel.use_span(otel_span):
|
|
338
|
+
if isinstance(ignore_status, int):
|
|
339
|
+
ignore_status = (ignore_status,)
|
|
340
|
+
|
|
341
|
+
try:
|
|
342
|
+
# send the actual request
|
|
343
|
+
resp = client.bulk(*args, operations=bulk_actions, **kwargs) # type: ignore[arg-type]
|
|
344
|
+
except ApiError as e:
|
|
345
|
+
gen = _process_bulk_chunk_error(
|
|
346
|
+
error=e,
|
|
347
|
+
bulk_data=bulk_data,
|
|
348
|
+
ignore_status=ignore_status,
|
|
349
|
+
raise_on_exception=raise_on_exception,
|
|
350
|
+
raise_on_error=raise_on_error,
|
|
351
|
+
)
|
|
352
|
+
else:
|
|
353
|
+
gen = _process_bulk_chunk_success(
|
|
354
|
+
resp=resp.body,
|
|
355
|
+
bulk_data=bulk_data,
|
|
356
|
+
ignore_status=ignore_status,
|
|
357
|
+
raise_on_error=raise_on_error,
|
|
358
|
+
)
|
|
359
|
+
yield from gen
|
|
356
360
|
|
|
357
361
|
|
|
358
362
|
def streaming_bulk(
|
|
@@ -370,6 +374,7 @@ def streaming_bulk(
|
|
|
370
374
|
max_backoff: float = 600,
|
|
371
375
|
yield_ok: bool = True,
|
|
372
376
|
ignore_status: Union[int, Collection[int]] = (),
|
|
377
|
+
span_name: str = "helpers.streaming_bulk",
|
|
373
378
|
*args: Any,
|
|
374
379
|
**kwargs: Any,
|
|
375
380
|
) -> Iterable[Tuple[bool, Dict[str, Any]]]:
|
|
@@ -406,73 +411,78 @@ def streaming_bulk(
|
|
|
406
411
|
:arg yield_ok: if set to False will skip successful documents in the output
|
|
407
412
|
:arg ignore_status: list of HTTP status code that you want to ignore
|
|
408
413
|
"""
|
|
409
|
-
|
|
410
|
-
|
|
414
|
+
with client._otel.helpers_span(span_name) as otel_span:
|
|
415
|
+
client = client.options()
|
|
416
|
+
client._client_meta = (("h", "bp"),)
|
|
411
417
|
|
|
412
|
-
|
|
418
|
+
serializer = client.transport.serializers.get_serializer("application/json")
|
|
413
419
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
420
|
+
bulk_data: List[
|
|
421
|
+
Union[
|
|
422
|
+
Tuple[_TYPE_BULK_ACTION_HEADER],
|
|
423
|
+
Tuple[_TYPE_BULK_ACTION_HEADER, _TYPE_BULK_ACTION_BODY],
|
|
424
|
+
]
|
|
418
425
|
]
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
client,
|
|
440
|
-
bulk_actions,
|
|
426
|
+
bulk_actions: List[bytes]
|
|
427
|
+
for bulk_data, bulk_actions in _chunk_actions(
|
|
428
|
+
map(expand_action_callback, actions),
|
|
429
|
+
chunk_size,
|
|
430
|
+
max_chunk_bytes,
|
|
431
|
+
serializer,
|
|
432
|
+
):
|
|
433
|
+
for attempt in range(max_retries + 1):
|
|
434
|
+
to_retry: List[bytes] = []
|
|
435
|
+
to_retry_data: List[
|
|
436
|
+
Union[
|
|
437
|
+
Tuple[_TYPE_BULK_ACTION_HEADER],
|
|
438
|
+
Tuple[_TYPE_BULK_ACTION_HEADER, _TYPE_BULK_ACTION_BODY],
|
|
439
|
+
]
|
|
440
|
+
] = []
|
|
441
|
+
if attempt:
|
|
442
|
+
time.sleep(min(max_backoff, initial_backoff * 2 ** (attempt - 1)))
|
|
443
|
+
|
|
444
|
+
try:
|
|
445
|
+
for data, (ok, info) in zip(
|
|
441
446
|
bulk_data,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
447
|
+
_process_bulk_chunk(
|
|
448
|
+
client,
|
|
449
|
+
bulk_actions,
|
|
450
|
+
bulk_data,
|
|
451
|
+
otel_span,
|
|
452
|
+
raise_on_exception,
|
|
453
|
+
raise_on_error,
|
|
454
|
+
ignore_status,
|
|
455
|
+
*args,
|
|
456
|
+
**kwargs,
|
|
457
|
+
),
|
|
458
|
+
):
|
|
459
|
+
if not ok:
|
|
460
|
+
action, info = info.popitem()
|
|
461
|
+
# retry if retries enabled, we get 429, and we are not
|
|
462
|
+
# in the last attempt
|
|
463
|
+
if (
|
|
464
|
+
max_retries
|
|
465
|
+
and info["status"] == 429
|
|
466
|
+
and (attempt + 1) <= max_retries
|
|
467
|
+
):
|
|
468
|
+
# _process_bulk_chunk expects bytes so we need to
|
|
469
|
+
# re-serialize the data
|
|
470
|
+
to_retry.extend(map(serializer.dumps, data))
|
|
471
|
+
to_retry_data.append(data)
|
|
472
|
+
else:
|
|
473
|
+
yield ok, {action: info}
|
|
474
|
+
elif yield_ok:
|
|
475
|
+
yield ok, info
|
|
476
|
+
|
|
477
|
+
except ApiError as e:
|
|
478
|
+
# suppress 429 errors since we will retry them
|
|
479
|
+
if attempt == max_retries or e.status_code != 429:
|
|
480
|
+
raise
|
|
481
|
+
else:
|
|
482
|
+
if not to_retry:
|
|
483
|
+
break
|
|
484
|
+
# retry only subset of documents that didn't succeed
|
|
485
|
+
bulk_actions, bulk_data = to_retry, to_retry_data
|
|
476
486
|
|
|
477
487
|
|
|
478
488
|
def bulk(
|
|
@@ -519,7 +529,7 @@ def bulk(
|
|
|
519
529
|
# make streaming_bulk yield successful results so we can count them
|
|
520
530
|
kwargs["yield_ok"] = True
|
|
521
531
|
for ok, item in streaming_bulk(
|
|
522
|
-
client, actions, ignore_status=ignore_status, *args, **kwargs # type: ignore[misc]
|
|
532
|
+
client, actions, ignore_status=ignore_status, span_name="helpers.bulk", *args, **kwargs # type: ignore[misc]
|
|
523
533
|
):
|
|
524
534
|
# go through request-response pairs and detect failures
|
|
525
535
|
if not ok:
|
|
@@ -589,27 +599,31 @@ def parallel_bulk(
|
|
|
589
599
|
] = Queue(max(queue_size, thread_count))
|
|
590
600
|
self._quick_put = self._inqueue.put
|
|
591
601
|
|
|
592
|
-
|
|
602
|
+
with client._otel.helpers_span("helpers.parallel_bulk") as otel_span:
|
|
603
|
+
pool = BlockingPool(thread_count)
|
|
593
604
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
605
|
+
try:
|
|
606
|
+
for result in pool.imap(
|
|
607
|
+
lambda bulk_chunk: list(
|
|
608
|
+
_process_bulk_chunk(
|
|
609
|
+
client,
|
|
610
|
+
bulk_chunk[1],
|
|
611
|
+
bulk_chunk[0],
|
|
612
|
+
otel_span=otel_span,
|
|
613
|
+
ignore_status=ignore_status, # type: ignore[misc]
|
|
614
|
+
*args,
|
|
615
|
+
**kwargs,
|
|
616
|
+
)
|
|
617
|
+
),
|
|
618
|
+
_chunk_actions(
|
|
619
|
+
expanded_actions, chunk_size, max_chunk_bytes, serializer
|
|
620
|
+
),
|
|
621
|
+
):
|
|
622
|
+
yield from result
|
|
623
|
+
|
|
624
|
+
finally:
|
|
625
|
+
pool.close()
|
|
626
|
+
pool.join()
|
|
613
627
|
|
|
614
628
|
|
|
615
629
|
def scan(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: elasticsearch
|
|
3
|
-
Version: 8.15.
|
|
3
|
+
Version: 8.15.1
|
|
4
4
|
Summary: Python client for Elasticsearch
|
|
5
5
|
Project-URL: Documentation, https://elasticsearch-py.readthedocs.io/
|
|
6
6
|
Project-URL: Homepage, https://github.com/elastic/elasticsearch-py
|
|
@@ -54,7 +54,7 @@ Requires-Dist: unasync; extra == 'dev'
|
|
|
54
54
|
Provides-Extra: docs
|
|
55
55
|
Requires-Dist: sphinx; extra == 'docs'
|
|
56
56
|
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
|
|
57
|
-
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
57
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
|
|
58
58
|
Provides-Extra: orjson
|
|
59
59
|
Requires-Dist: orjson>=3; extra == 'orjson'
|
|
60
60
|
Provides-Extra: pyarrow
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
elasticsearch/__init__.py,sha256=w5YnO16zjOi6loGJ8caUgSXsj3b-Y8OfF0BIddP2BiE,3289
|
|
2
|
-
elasticsearch/_otel.py,sha256=
|
|
2
|
+
elasticsearch/_otel.py,sha256=qb5Hpmsfv2rNUyjWPf3A1YIpTx91yt0-bD4Wl0dyyjc,4170
|
|
3
3
|
elasticsearch/_utils.py,sha256=Vr_aNG5ddxInE1PgDpCXMYpXBTNUFM9nYrgbw-cjeCc,1419
|
|
4
|
-
elasticsearch/_version.py,sha256=
|
|
4
|
+
elasticsearch/_version.py,sha256=0JU12tnNQH8UnZmbmQeyZnBfx4Up70zoMUJ3tMilJYo,814
|
|
5
5
|
elasticsearch/client.py,sha256=Zik8KKnpJBvbapk4BhZXC7PZiuZwWqtcmMARDNXMwlA,5213
|
|
6
6
|
elasticsearch/compat.py,sha256=hL3mtqVxWwxeiFbNGADva5XruAwK-A6xcu-vrpnDXFs,2657
|
|
7
7
|
elasticsearch/exceptions.py,sha256=HHqidMTlLXRcNbo4gjsbhHsLfiV4JGg7tx1lXQndG98,4025
|
|
@@ -10,7 +10,7 @@ elasticsearch/serializer.py,sha256=vLhhlU6fAjHXB-z2E5ieBe_XKWx4A0o-lbJY9Bknt70,8
|
|
|
10
10
|
elasticsearch/transport.py,sha256=CxKo2USPQ-6q4x8Ckfq_dUFWhA1s98p75ghXc3breJI,2248
|
|
11
11
|
elasticsearch/_async/__init__.py,sha256=TZps9WjF-TaSNzBvW5wUCgXRcbHnvE_9xAynBHsMtSo,787
|
|
12
12
|
elasticsearch/_async/helpers.py,sha256=vX2oGiYHO5raZJOnTMEX9hViPNy1YW26IeS60gbhNno,22285
|
|
13
|
-
elasticsearch/_async/client/__init__.py,sha256=
|
|
13
|
+
elasticsearch/_async/client/__init__.py,sha256=KcuZ2owwG-6ohyEZ7t9v7F3KzAOD4eIT_90lHU9SWNc,243443
|
|
14
14
|
elasticsearch/_async/client/_base.py,sha256=wDJIs-4Z_fDBF0_XvfCmfSuyL6Oh8I2nSGDZyP91XCU,15531
|
|
15
15
|
elasticsearch/_async/client/async_search.py,sha256=lxXkg9zN1wABx-yBczMUEkOAzGnfKaPbfwzX-r780Q0,30535
|
|
16
16
|
elasticsearch/_async/client/autoscaling.py,sha256=HCpGPgztl69Aa1GcGjCc1X8UNLEOLEMft8-vvGrFLxk,7741
|
|
@@ -26,9 +26,9 @@ elasticsearch/_async/client/features.py,sha256=Sino6KgXZ7a9qIU27N2jJZ3TW7Fwih-OX
|
|
|
26
26
|
elasticsearch/_async/client/fleet.py,sha256=VR2FuxpXzdusIipHVWA77fWsXsLC0udd8x6A2N_oXtw,31148
|
|
27
27
|
elasticsearch/_async/client/graph.py,sha256=nKsUtmn6S8uY-QGmRJxGPM4iFFCXEmr6uX9T09IzZ1I,4594
|
|
28
28
|
elasticsearch/_async/client/ilm.py,sha256=iUdqC2r6QP4_nWxK6pKbHuLaxsDpNVf90Mv7Ejrpxq8,23968
|
|
29
|
-
elasticsearch/_async/client/indices.py,sha256=
|
|
29
|
+
elasticsearch/_async/client/indices.py,sha256=NSdMw1jRmhNxKdwqr7gxLoh3C9_Q1Jzhrq1qPOTkmXA,217024
|
|
30
30
|
elasticsearch/_async/client/inference.py,sha256=10uV4k_zGrnVclfYCCZjndNCC6pkZHDunRCRLEPaWCA,12260
|
|
31
|
-
elasticsearch/_async/client/ingest.py,sha256=
|
|
31
|
+
elasticsearch/_async/client/ingest.py,sha256=ax6B87Px08tSkUaeNu8N3PJJTdSfDLFGBahBCcbt1Nk,23357
|
|
32
32
|
elasticsearch/_async/client/license.py,sha256=jVnF9pU6F1VIjUdVrJ8S2vs-2ohk1sZ-70RYXCObBJY,12884
|
|
33
33
|
elasticsearch/_async/client/logstash.py,sha256=vscXPt2FeXExBSj-7yghTczVxoQl8nkZ05OdsbYDxyA,6136
|
|
34
34
|
elasticsearch/_async/client/migration.py,sha256=RFeEvSZibAROr3HiheY9XvGyyeLskfImhtPIlnts9c0,5331
|
|
@@ -45,7 +45,7 @@ elasticsearch/_async/client/slm.py,sha256=OsxIVx_MFdegv0-EGBtGJuiKtdSkySmf88Mg-K
|
|
|
45
45
|
elasticsearch/_async/client/snapshot.py,sha256=Fyyx-LjjPqbcJ3CQ_JHqlydrXwUb4clVo7QHbDuMBsk,37029
|
|
46
46
|
elasticsearch/_async/client/sql.py,sha256=_HcuH6cNlaIz0HBqM_eoEQ1gj-e3XXaVhp8_ieNIx7w,17830
|
|
47
47
|
elasticsearch/_async/client/ssl.py,sha256=7CLG1TweMXYj1LCS2HhQgWTB190v4toiykjSVAmblto,2261
|
|
48
|
-
elasticsearch/_async/client/synonyms.py,sha256=
|
|
48
|
+
elasticsearch/_async/client/synonyms.py,sha256=Xp0RJCEU-AcUea2LGMKwQYSCFdyZrbPAaenGWi9yxWU,13851
|
|
49
49
|
elasticsearch/_async/client/tasks.py,sha256=LtoYpPBeYS-ZaIB4YPKqKuQsF6OD7avkTl21-ZKKxyc,9043
|
|
50
50
|
elasticsearch/_async/client/text_structure.py,sha256=Co6Tiso1sa_qJmXfcc3S9h0UcuiUV8VLnvBZHY5D5Vo,12046
|
|
51
51
|
elasticsearch/_async/client/transform.py,sha256=tAy4zfa84f0eqNenN2rQAToDW6ftNydXhXeOjyMjmsU,42181
|
|
@@ -53,7 +53,7 @@ elasticsearch/_async/client/utils.py,sha256=JwFOxo-YrRg4exXlpiUuOG1uNtJKP_VeK0Hg
|
|
|
53
53
|
elasticsearch/_async/client/watcher.py,sha256=Yybc7Kn4Q0qTTf6frYhfhQIDg3-AT8VTWLcu-irFEpQ,26482
|
|
54
54
|
elasticsearch/_async/client/xpack.py,sha256=yyRUufXjg1Yd9ehPPYQpeR2zlUHgUhq0QzJNxyw3CDo,4554
|
|
55
55
|
elasticsearch/_sync/__init__.py,sha256=TZps9WjF-TaSNzBvW5wUCgXRcbHnvE_9xAynBHsMtSo,787
|
|
56
|
-
elasticsearch/_sync/client/__init__.py,sha256=
|
|
56
|
+
elasticsearch/_sync/client/__init__.py,sha256=sLfUdta8NcG4Em4jb-50LVnck4EGL-hnKla2iaJR2vs,242812
|
|
57
57
|
elasticsearch/_sync/client/_base.py,sha256=LesRKQzvgstEPn-hzoY7PBq_4hAyPCzjGiUggGn-fB8,15461
|
|
58
58
|
elasticsearch/_sync/client/async_search.py,sha256=hCWz3xxSoQsYbP-b2j_0mrYcyoVLtdkwY6iR5psn-fU,30487
|
|
59
59
|
elasticsearch/_sync/client/autoscaling.py,sha256=x1aRaOw5ztEYmuzaiTPVyTrgL84eI1ta15MMv_bd2Fk,7693
|
|
@@ -69,9 +69,9 @@ elasticsearch/_sync/client/features.py,sha256=lW1iL9gtjCr9T6CwQftBh2yqlF9RqzD6A7
|
|
|
69
69
|
elasticsearch/_sync/client/fleet.py,sha256=hJU9MNjJL2b_BMVCKRl9vM-_KHV36Wx0wQR_CTcwoPY,31112
|
|
70
70
|
elasticsearch/_sync/client/graph.py,sha256=kcIhR9oUChXv56ZhYi1smf7uqPctw1zVA5HkqHyl1yU,4582
|
|
71
71
|
elasticsearch/_sync/client/ilm.py,sha256=RAqIvqPOAj1j9v6wxJrDu8wlOg6NVC-QV6sZpvZkf2U,23836
|
|
72
|
-
elasticsearch/_sync/client/indices.py,sha256=
|
|
72
|
+
elasticsearch/_sync/client/indices.py,sha256=McDFznsgGQmMhrx71wqvmsCGnKPvlstiGj_w8_z-WBc,216316
|
|
73
73
|
elasticsearch/_sync/client/inference.py,sha256=Du0zu4NLBn5tlrg33yljtPmIKRRmbZ63vfKIKXj0hJc,12212
|
|
74
|
-
elasticsearch/_sync/client/ingest.py,sha256=
|
|
74
|
+
elasticsearch/_sync/client/ingest.py,sha256=AjXXs3gMPz4_8rYFoLsdemXA8YH-vl80e_TtCLQ5WrM,23249
|
|
75
75
|
elasticsearch/_sync/client/license.py,sha256=B_cnopns9c0bEnJeQtIBKaZ79srMfiN206MMw3ibOLE,12800
|
|
76
76
|
elasticsearch/_sync/client/logstash.py,sha256=ClY5jx7UYR5_sdxnanVCxEchUZKqxO6bJDB5JDdWHk0,6100
|
|
77
77
|
elasticsearch/_sync/client/migration.py,sha256=Mq5gzEqTZnyoviosqFuaYQDS6GlCIZP9npcd6T9nIEY,5295
|
|
@@ -88,7 +88,7 @@ elasticsearch/_sync/client/slm.py,sha256=ALtxLp0IuTGdrrW4scuFedEwU_cx4YeblgqMgQG
|
|
|
88
88
|
elasticsearch/_sync/client/snapshot.py,sha256=eToPd2PMiMYArXTRbL61gtC3U36CIZUYp8ci6c0qnvQ,36897
|
|
89
89
|
elasticsearch/_sync/client/sql.py,sha256=JeH49RlmMQXQL3ta4b4dqzwThz4WQn2YBxyHXPf7k1I,17758
|
|
90
90
|
elasticsearch/_sync/client/ssl.py,sha256=nfntq17En9-UbQNIRrahMc2nktOo3AdJfB2FFZwSBRM,2249
|
|
91
|
-
elasticsearch/_sync/client/synonyms.py,sha256=
|
|
91
|
+
elasticsearch/_sync/client/synonyms.py,sha256=cjXwXUNUH4fCDp8j2j1JKDvZN9DAhEf4IXW_ImEWdX0,13767
|
|
92
92
|
elasticsearch/_sync/client/tasks.py,sha256=evkBejBfnn5nDGQoowM1v_DRtbKUNDDkJRD0ATWXJOg,9007
|
|
93
93
|
elasticsearch/_sync/client/text_structure.py,sha256=Kk1XwGBy_9sQmJIqea-GA60xF9XihrQWn57gvZcQzLM,12022
|
|
94
94
|
elasticsearch/_sync/client/transform.py,sha256=NJpbjvuBCz79COAcrLPgNopplVNrAzZgwLsI9Vj8Hcw,42049
|
|
@@ -96,7 +96,7 @@ elasticsearch/_sync/client/utils.py,sha256=QKgoK3f87YPa5R5v7_TN8ib8JircbfI_R5RQX
|
|
|
96
96
|
elasticsearch/_sync/client/watcher.py,sha256=c9vdf8CxpMj1fJtZx1sdDyGHW8COlrwNL6OcyNUmhO8,26350
|
|
97
97
|
elasticsearch/_sync/client/xpack.py,sha256=_vmMqtwkPaSIIef7kxjjL4AsokR_TKTJffGd8OHmxX0,4530
|
|
98
98
|
elasticsearch/helpers/__init__.py,sha256=7X10XwdP_fP1QTHGcOxGbCvl2oBevkz_DjhjXCh_59I,1470
|
|
99
|
-
elasticsearch/helpers/actions.py,sha256=
|
|
99
|
+
elasticsearch/helpers/actions.py,sha256=AytDZ2NXYGkgLdV36D6o38Vo13mGcVLmNpU4EnL3B6s,31860
|
|
100
100
|
elasticsearch/helpers/errors.py,sha256=GKtlM2687mbBC8PjwQGClBFE4sD129Ytb6wkHZveFJw,1213
|
|
101
101
|
elasticsearch/helpers/vectorstore/__init__.py,sha256=znQOANiaSZOJco_dkBf06wpFMKwK0OoDcNkkS8NMWKE,2192
|
|
102
102
|
elasticsearch/helpers/vectorstore/_utils.py,sha256=xJwCFq7sqUBeq143tfnfm3i4e-ta88s85wKZmPZwJWg,3985
|
|
@@ -110,8 +110,8 @@ elasticsearch/helpers/vectorstore/_sync/_utils.py,sha256=5pdvNS5XC3wqShjliW9Njl9
|
|
|
110
110
|
elasticsearch/helpers/vectorstore/_sync/embedding_service.py,sha256=sAw_WKUcmyqOOJRqnNesZCzn7ZyA91v4NvvQszHIWJ8,3582
|
|
111
111
|
elasticsearch/helpers/vectorstore/_sync/strategies.py,sha256=0Q1zoOrO51S6HXjXwkAePPVtCUGQz5lKN9NyRCso-GU,15220
|
|
112
112
|
elasticsearch/helpers/vectorstore/_sync/vectorstore.py,sha256=bTWLhdGkdXHS4SojSFHHAuBTUUC3OBdiyDqgQmHC_sI,16510
|
|
113
|
-
elasticsearch-8.15.
|
|
114
|
-
elasticsearch-8.15.
|
|
115
|
-
elasticsearch-8.15.
|
|
116
|
-
elasticsearch-8.15.
|
|
117
|
-
elasticsearch-8.15.
|
|
113
|
+
elasticsearch-8.15.1.dist-info/METADATA,sha256=kjTAJcsIXQ-AAAmPY1eBW39S_d5-CeSC95MIIiM5zlo,8728
|
|
114
|
+
elasticsearch-8.15.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
115
|
+
elasticsearch-8.15.1.dist-info/licenses/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
|
|
116
|
+
elasticsearch-8.15.1.dist-info/licenses/NOTICE,sha256=t4IjKAJ_G-0hYaL4AH16CVS_xDel8UXrJVK6x7JDaGA,61
|
|
117
|
+
elasticsearch-8.15.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|