Skip to content

Commit

Permalink
enhance: simplify the structure of search_params
Browse files Browse the repository at this point in the history
Signed-off-by: lixinguo <[email protected]>
  • Loading branch information
lixinguo committed Dec 24, 2024
1 parent ebcb546 commit 074223e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pymilvus/client/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,15 @@ def search_requests_with_expr(

if param.get(HINTS) is not None:
search_params[HINTS] = param[HINTS]


# after 2.5.1, all parameters of search_params can be written into one layer
# 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():
if key != "params":
params[key] = value

req_params = [
common_types.KeyValuePair(key=str(key), value=utils.dumps(value))
for key, value in search_params.items()
Expand Down

0 comments on commit 074223e

Please sign in to comment.