@@ -2948,10 +2948,10 @@ async def put_script(
29482948 async def rank_eval (
29492949 self ,
29502950 * ,
2951- index : t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]],
29522951 requests : t .Union [
29532952 t .List [t .Mapping [str , t .Any ]], t .Tuple [t .Mapping [str , t .Any ], ...]
29542953 ],
2954+ index : t .Optional [t .Union [str , t .Union [t .List [str ], t .Tuple [str , ...]]]] = None ,
29552955 allow_no_indices : t .Optional [bool ] = None ,
29562956 error_trace : t .Optional [bool ] = None ,
29572957 expand_wildcards : t .Optional [
@@ -2987,12 +2987,12 @@ async def rank_eval(
29872987
29882988 `<https://www.elastic.co/guide/en/elasticsearch/reference/master/search-rank-eval.html>`_
29892989
2990+ :param requests: A set of typical search requests, together with their provided
2991+ ratings.
29902992 :param index: Comma-separated list of data streams, indices, and index aliases
29912993 used to limit the request. Wildcard (`*`) expressions are supported. To target
29922994 all data streams and indices in a cluster, omit this parameter or use `_all`
29932995 or `*`.
2994- :param requests: A set of typical search requests, together with their provided
2995- ratings.
29962996 :param allow_no_indices: If `false`, the request returns an error if any wildcard
29972997 expression, index alias, or `_all` value targets only missing or closed indices.
29982998 This behavior applies even if the request targets other open indices. For
@@ -3005,8 +3005,6 @@ async def rank_eval(
30053005 :param metric: Definition of the evaluation metric to calculate.
30063006 :param search_type: Search operation type
30073007 """
3008- if index in SKIP_IN_PATH :
3009- raise ValueError ("Empty value passed for parameter 'index'" )
30103008 if requests is None :
30113009 raise ValueError ("Empty value passed for parameter 'requests'" )
30123010 if index not in SKIP_IN_PATH :
0 commit comments