From 43c17e44d7bac60301e36a0211e6bed0421580eb Mon Sep 17 00:00:00 2001 From: smellthemoon <64083300+smellthemoon@users.noreply.github.com> Date: Thu, 2 Jan 2025 11:04:46 +0800 Subject: [PATCH] fix: get get param from wrong dict (#2537) Signed-off-by: lixinguo Co-authored-by: lixinguo --- pymilvus/client/prepare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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