@@ -1735,7 +1735,6 @@ async def explain(
17351735 async def field_caps (
17361736 self ,
17371737 * ,
1738- fields : t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]],
17391738 index : t .Optional [t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]] = None ,
17401739 allow_no_indices : t .Optional [bool ] = None ,
17411740 error_trace : t .Optional [bool ] = None ,
@@ -1757,6 +1756,9 @@ async def field_caps(
17571756 ],
17581757 ]
17591758 ] = None ,
1759+ fields : t .Optional [
1760+ t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
1761+ ] = None ,
17601762 filter_path : t .Optional [
17611763 t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]
17621764 ] = None ,
@@ -1774,8 +1776,6 @@ async def field_caps(
17741776
17751777 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html>`_
17761778
1777- :param fields: Comma-separated list of fields to retrieve capabilities for. Wildcard
1778- (`*`) expressions are supported.
17791779 :param index: Comma-separated list of data streams, indices, and aliases used
17801780 to limit the request. Supports wildcards (*). To target all data streams
17811781 and indices, omit this parameter or use * or _all.
@@ -1788,6 +1788,8 @@ async def field_caps(
17881788 request can target data streams, this argument determines whether wildcard
17891789 expressions match hidden data streams. Supports comma-separated values, such
17901790 as `open,hidden`.
1791+ :param fields: List of fields to retrieve capabilities for. Wildcard (`*`) expressions
1792+ are supported.
17911793 :param filters: An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
17921794 :param ignore_unavailable: If `true`, missing or closed indices are not included
17931795 in the response.
@@ -1801,22 +1803,20 @@ async def field_caps(
18011803 :param types: Only return results for fields that have one of the types in the
18021804 list
18031805 """
1804- if fields is None :
1805- raise ValueError ("Empty value passed for parameter 'fields'" )
18061806 if index not in SKIP_IN_PATH :
18071807 __path = f"/{ _quote (index )} /_field_caps"
18081808 else :
18091809 __path = "/_field_caps"
18101810 __query : t .Dict [str , t .Any ] = {}
18111811 __body : t .Dict [str , t .Any ] = {}
1812- if fields is not None :
1813- __query ["fields" ] = fields
18141812 if allow_no_indices is not None :
18151813 __query ["allow_no_indices" ] = allow_no_indices
18161814 if error_trace is not None :
18171815 __query ["error_trace" ] = error_trace
18181816 if expand_wildcards is not None :
18191817 __query ["expand_wildcards" ] = expand_wildcards
1818+ if fields is not None :
1819+ __body ["fields" ] = fields
18201820 if filter_path is not None :
18211821 __query ["filter_path" ] = filter_path
18221822 if filters is not None :
@@ -3442,8 +3442,8 @@ async def search(
34423442 scroll : t .Optional [t .Union ["t.Literal[-1]" , "t.Literal[0]" , str ]] = None ,
34433443 search_after : t .Optional [
34443444 t .Union [
3445- t .List [t .Union [None , float , int , str ]],
3446- t .Tuple [t .Union [None , float , int , str ], ...],
3445+ t .List [t .Union [None , bool , float , int , str , t . Any ]],
3446+ t .Tuple [t .Union [None , bool , float , int , str , t . Any ], ...],
34473447 ]
34483448 ] = None ,
34493449 search_type : t .Optional [
0 commit comments