Skip to content

Commit

Permalink
fix: [2.5] should not modify users search_param, copy instead (milvus…
Browse files Browse the repository at this point in the history
…-io#2578)

issue: milvus-io#2576 
pr: milvus-io#2577

Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com>
(cherry picked from commit 5050421)
PwzXxm authored Jan 17, 2025
1 parent 28012ec commit dc35ea2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymilvus/client/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime
import importlib.util
from copy import deepcopy
from datetime import timedelta
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple, Union

@@ -277,7 +278,7 @@ def get_params(search_params: Dict):
# 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
params = search_params.get("params", {})
params = deepcopy(search_params.get("params", {}))
for key, value in search_params.items():
if key in params:
if params[key] != value:

0 comments on commit dc35ea2

Please sign in to comment.