diff --git a/pymilvus/client/prepare.py b/pymilvus/client/prepare.py index cebcb27ea..8c4e6666a 100644 --- a/pymilvus/client/prepare.py +++ b/pymilvus/client/prepare.py @@ -1002,13 +1002,13 @@ def search_requests_with_expr( # no more parameters will be written searchParams.params # to ensure compatibility and milvus can still get a json format parameter # try to write all the parameters under searchParams into searchParams.Params - for key, value in search_params.items(): + for key, value in param.items(): if key in params: if params[key] != value: raise ParamError( message=f"ambiguous parameter: {key}, in search_param: {value}, in search_param.params: {params[key]}" ) - else: + elif key != "params": params[key] = value search_params["params"] = params