Skip to content

Commit ed38768

Browse files
authored
Update APIs to 8.4
1 parent ce42d68 commit ed38768

File tree

14 files changed

+72
-240
lines changed

14 files changed

+72
-240
lines changed

elasticsearch/_async/client/__init__.py

+21-36
Original file line numberDiff line numberDiff line change
@@ -1766,18 +1766,7 @@ async def field_caps(
17661766
include_unmapped: t.Optional[bool] = None,
17671767
index_filter: t.Optional[t.Mapping[str, t.Any]] = None,
17681768
pretty: t.Optional[bool] = None,
1769-
runtime_mappings: t.Optional[
1770-
t.Mapping[
1771-
str,
1772-
t.Union[
1773-
t.Mapping[str, t.Any],
1774-
t.Union[
1775-
t.List[t.Mapping[str, t.Any]],
1776-
t.Tuple[t.Mapping[str, t.Any], ...],
1777-
],
1778-
],
1779-
]
1780-
] = None,
1769+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
17811770
types: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
17821771
) -> ObjectApiResponse[t.Any]:
17831772
"""
@@ -2075,7 +2064,13 @@ async def get_source(
20752064
*,
20762065
index: str,
20772066
id: str,
2067+
error_trace: t.Optional[bool] = None,
2068+
filter_path: t.Optional[
2069+
t.Union[str, t.Union[t.List[str], t.Tuple[str, ...]]]
2070+
] = None,
2071+
human: t.Optional[bool] = None,
20782072
preference: t.Optional[str] = None,
2073+
pretty: t.Optional[bool] = None,
20792074
realtime: t.Optional[bool] = None,
20802075
refresh: t.Optional[bool] = None,
20812076
routing: t.Optional[str] = None,
@@ -2127,8 +2122,16 @@ async def get_source(
21272122
raise ValueError("Empty value passed for parameter 'id'")
21282123
__path = f"/{_quote(index)}/_source/{_quote(id)}"
21292124
__query: t.Dict[str, t.Any] = {}
2125+
if error_trace is not None:
2126+
__query["error_trace"] = error_trace
2127+
if filter_path is not None:
2128+
__query["filter_path"] = filter_path
2129+
if human is not None:
2130+
__query["human"] = human
21302131
if preference is not None:
21312132
__query["preference"] = preference
2133+
if pretty is not None:
2134+
__query["pretty"] = pretty
21322135
if realtime is not None:
21332136
__query["realtime"] = realtime
21342137
if refresh is not None:
@@ -3395,6 +3398,7 @@ async def search(
33953398
]
33963399
] = None,
33973400
explain: t.Optional[bool] = None,
3401+
ext: t.Optional[t.Mapping[str, t.Any]] = None,
33983402
fields: t.Optional[
33993403
t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]]
34003404
] = None,
@@ -3433,18 +3437,7 @@ async def search(
34333437
] = None,
34343438
rest_total_hits_as_int: t.Optional[bool] = None,
34353439
routing: t.Optional[str] = None,
3436-
runtime_mappings: t.Optional[
3437-
t.Mapping[
3438-
str,
3439-
t.Union[
3440-
t.Mapping[str, t.Any],
3441-
t.Union[
3442-
t.List[t.Mapping[str, t.Any]],
3443-
t.Tuple[t.Mapping[str, t.Any], ...],
3444-
],
3445-
],
3446-
]
3447-
] = None,
3440+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
34483441
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
34493442
scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
34503443
search_after: t.Optional[
@@ -3528,6 +3521,7 @@ async def search(
35283521
that are open, closed or both.
35293522
:param explain: If true, returns detailed information about score computation
35303523
as part of a hit.
3524+
:param ext: Configuration of search extensions defined by Elasticsearch plugins.
35313525
:param fields: Array of wildcard (*) patterns. The request returns values for
35323526
field names matching these patterns in the hits.fields property of the response.
35333527
:param from_: Starting document offset. By default, you cannot page through more
@@ -3668,6 +3662,8 @@ async def search(
36683662
__query["expand_wildcards"] = expand_wildcards
36693663
if explain is not None:
36703664
__body["explain"] = explain
3665+
if ext is not None:
3666+
__body["ext"] = ext
36713667
if fields is not None:
36723668
__body["fields"] = fields
36733669
if filter_path is not None:
@@ -3805,18 +3801,7 @@ async def search_mvt(
38053801
human: t.Optional[bool] = None,
38063802
pretty: t.Optional[bool] = None,
38073803
query: t.Optional[t.Mapping[str, t.Any]] = None,
3808-
runtime_mappings: t.Optional[
3809-
t.Mapping[
3810-
str,
3811-
t.Union[
3812-
t.Mapping[str, t.Any],
3813-
t.Union[
3814-
t.List[t.Mapping[str, t.Any]],
3815-
t.Tuple[t.Mapping[str, t.Any], ...],
3816-
],
3817-
],
3818-
]
3819-
] = None,
3804+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
38203805
size: t.Optional[int] = None,
38213806
sort: t.Optional[
38223807
t.Union[

elasticsearch/_async/client/async_search.py

+5-12
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ async def submit(
199199
]
200200
] = None,
201201
explain: t.Optional[bool] = None,
202+
ext: t.Optional[t.Mapping[str, t.Any]] = None,
202203
fields: t.Optional[
203204
t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]]
204205
] = None,
@@ -239,18 +240,7 @@ async def submit(
239240
] = None,
240241
rest_total_hits_as_int: t.Optional[bool] = None,
241242
routing: t.Optional[str] = None,
242-
runtime_mappings: t.Optional[
243-
t.Mapping[
244-
str,
245-
t.Union[
246-
t.Mapping[str, t.Any],
247-
t.Union[
248-
t.List[t.Mapping[str, t.Any]],
249-
t.Tuple[t.Mapping[str, t.Any], ...],
250-
],
251-
],
252-
]
253-
] = None,
243+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
254244
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
255245
scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
256246
search_after: t.Optional[
@@ -335,6 +325,7 @@ async def submit(
335325
that are open, closed or both.
336326
:param explain: If true, returns detailed information about score computation
337327
as part of a hit.
328+
:param ext: Configuration of search extensions defined by Elasticsearch plugins.
338329
:param fields: Array of wildcard (*) patterns. The request returns values for
339330
field names matching these patterns in the hits.fields property of the response.
340331
:param from_: Starting document offset. By default, you cannot page through more
@@ -474,6 +465,8 @@ async def submit(
474465
__query["expand_wildcards"] = expand_wildcards
475466
if explain is not None:
476467
__body["explain"] = explain
468+
if ext is not None:
469+
__body["ext"] = ext
477470
if fields is not None:
478471
__body["fields"] = fields
479472
if filter_path is not None:

elasticsearch/_async/client/eql.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,7 @@ async def search(
204204
keep_on_completion: t.Optional[bool] = None,
205205
pretty: t.Optional[bool] = None,
206206
result_position: t.Optional[t.Union["t.Literal['head', 'tail']", str]] = None,
207-
runtime_mappings: t.Optional[
208-
t.Mapping[
209-
str,
210-
t.Union[
211-
t.Mapping[str, t.Any],
212-
t.Union[
213-
t.List[t.Mapping[str, t.Any]],
214-
t.Tuple[t.Mapping[str, t.Any], ...],
215-
],
216-
],
217-
]
218-
] = None,
207+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
219208
size: t.Optional[int] = None,
220209
tiebreaker_field: t.Optional[str] = None,
221210
timestamp_field: t.Optional[str] = None,

elasticsearch/_async/client/fleet.py

+5-12
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ async def search(
280280
]
281281
] = None,
282282
explain: t.Optional[bool] = None,
283+
ext: t.Optional[t.Mapping[str, t.Any]] = None,
283284
fields: t.Optional[
284285
t.Union[t.List[t.Mapping[str, t.Any]], t.Tuple[t.Mapping[str, t.Any], ...]]
285286
] = None,
@@ -317,18 +318,7 @@ async def search(
317318
] = None,
318319
rest_total_hits_as_int: t.Optional[bool] = None,
319320
routing: t.Optional[str] = None,
320-
runtime_mappings: t.Optional[
321-
t.Mapping[
322-
str,
323-
t.Union[
324-
t.Mapping[str, t.Any],
325-
t.Union[
326-
t.List[t.Mapping[str, t.Any]],
327-
t.Tuple[t.Mapping[str, t.Any], ...],
328-
],
329-
],
330-
]
331-
] = None,
321+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
332322
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
333323
scroll: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
334324
search_after: t.Optional[
@@ -407,6 +397,7 @@ async def search(
407397
:param expand_wildcards:
408398
:param explain: If true, returns detailed information about score computation
409399
as part of a hit.
400+
:param ext: Configuration of search extensions defined by Elasticsearch plugins.
410401
:param fields: Array of wildcard (*) patterns. The request returns values for
411402
field names matching these patterns in the hits.fields property of the response.
412403
:param from_: Starting document offset. By default, you cannot page through more
@@ -530,6 +521,8 @@ async def search(
530521
__query["expand_wildcards"] = expand_wildcards
531522
if explain is not None:
532523
__body["explain"] = explain
524+
if ext is not None:
525+
__body["ext"] = ext
533526
if fields is not None:
534527
__body["fields"] = fields
535528
if filter_path is not None:

elasticsearch/_async/client/indices.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -2564,18 +2564,7 @@ async def put_mapping(
25642564
pretty: t.Optional[bool] = None,
25652565
properties: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
25662566
routing: t.Optional[t.Mapping[str, t.Any]] = None,
2567-
runtime: t.Optional[
2568-
t.Mapping[
2569-
str,
2570-
t.Union[
2571-
t.Mapping[str, t.Any],
2572-
t.Union[
2573-
t.List[t.Mapping[str, t.Any]],
2574-
t.Tuple[t.Mapping[str, t.Any], ...],
2575-
],
2576-
],
2577-
]
2578-
] = None,
2567+
runtime: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
25792568
source: t.Optional[t.Mapping[str, t.Any]] = None,
25802569
timeout: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
25812570
write_index_only: t.Optional[bool] = None,

elasticsearch/_async/client/ml.py

+2-24
Original file line numberDiff line numberDiff line change
@@ -2815,18 +2815,7 @@ async def put_datafeed(
28152815
pretty: t.Optional[bool] = None,
28162816
query: t.Optional[t.Mapping[str, t.Any]] = None,
28172817
query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
2818-
runtime_mappings: t.Optional[
2819-
t.Mapping[
2820-
str,
2821-
t.Union[
2822-
t.Mapping[str, t.Any],
2823-
t.Union[
2824-
t.List[t.Mapping[str, t.Any]],
2825-
t.Tuple[t.Mapping[str, t.Any], ...],
2826-
],
2827-
],
2828-
]
2829-
] = None,
2818+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
28302819
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
28312820
scroll_size: t.Optional[int] = None,
28322821
) -> ObjectApiResponse[t.Any]:
@@ -4023,18 +4012,7 @@ async def update_datafeed(
40234012
pretty: t.Optional[bool] = None,
40244013
query: t.Optional[t.Mapping[str, t.Any]] = None,
40254014
query_delay: t.Optional[t.Union["t.Literal[-1]", "t.Literal[0]", str]] = None,
4026-
runtime_mappings: t.Optional[
4027-
t.Mapping[
4028-
str,
4029-
t.Union[
4030-
t.Mapping[str, t.Any],
4031-
t.Union[
4032-
t.List[t.Mapping[str, t.Any]],
4033-
t.Tuple[t.Mapping[str, t.Any], ...],
4034-
],
4035-
],
4036-
]
4037-
] = None,
4015+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
40384016
script_fields: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
40394017
scroll_size: t.Optional[int] = None,
40404018
) -> ObjectApiResponse[t.Any]:

elasticsearch/_async/client/sql.py

+1-12
Original file line numberDiff line numberDiff line change
@@ -228,18 +228,7 @@ async def query(
228228
request_timeout: t.Optional[
229229
t.Union["t.Literal[-1]", "t.Literal[0]", str]
230230
] = None,
231-
runtime_mappings: t.Optional[
232-
t.Mapping[
233-
str,
234-
t.Union[
235-
t.Mapping[str, t.Any],
236-
t.Union[
237-
t.List[t.Mapping[str, t.Any]],
238-
t.Tuple[t.Mapping[str, t.Any], ...],
239-
],
240-
],
241-
]
242-
] = None,
231+
runtime_mappings: t.Optional[t.Mapping[str, t.Mapping[str, t.Any]]] = None,
243232
time_zone: t.Optional[str] = None,
244233
wait_for_completion_timeout: t.Optional[
245234
t.Union["t.Literal[-1]", "t.Literal[0]", str]

0 commit comments

Comments
 (0)