Skip to content

Commit

Permalink
modify strict_group_size parameter name(#2328)
Browse files Browse the repository at this point in the history
Signed-off-by: MrPresent-Han <[email protected]>
  • Loading branch information
MrPresent-Han committed Nov 6, 2024
1 parent 23ca4e3 commit 18225a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pymilvus/client/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
GROUP_BY_FIELD = "group_by_field"
GROUP_SIZE = "group_size"
RANK_GROUP_SCORER = "rank_group_scorer"
GROUP_STRICT_SIZE = "group_strict_size"
STRICT_GROUP_SIZE = "strict_group_size"
ITERATOR_FIELD = "iterator"
ITERATOR_SESSION_TS_FIELD = "iterator_session_ts"
PAGE_RETAIN_ORDER_FIELD = "page_retain_order"
Expand Down
12 changes: 6 additions & 6 deletions pymilvus/client/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
DYNAMIC_FIELD_NAME,
GROUP_BY_FIELD,
GROUP_SIZE,
GROUP_STRICT_SIZE,
STRICT_GROUP_SIZE,
ITERATOR_FIELD,
PAGE_RETAIN_ORDER_FIELD,
RANK_GROUP_SCORER,
Expand Down Expand Up @@ -920,9 +920,9 @@ def search_requests_with_expr(
if group_size is not None:
search_params[GROUP_SIZE] = group_size

group_strict_size = kwargs.get(GROUP_STRICT_SIZE)
if group_strict_size is not None:
search_params[GROUP_STRICT_SIZE] = group_strict_size
strict_group_size = kwargs.get(STRICT_GROUP_SIZE)
if strict_group_size is not None:
search_params[STRICT_GROUP_SIZE] = strict_group_size

if param.get("metric_type") is not None:
search_params["metric_type"] = param["metric_type"]
Expand Down Expand Up @@ -1016,11 +1016,11 @@ def hybrid_search_request_with_ranker(
]
)

if kwargs.get(GROUP_STRICT_SIZE) is not None:
if kwargs.get(STRICT_GROUP_SIZE) is not None:
request.rank_params.extend(
[
common_types.KeyValuePair(
key=GROUP_STRICT_SIZE, value=utils.dumps(kwargs.get(GROUP_STRICT_SIZE))
key=STRICT_GROUP_SIZE, value=utils.dumps(kwargs.get(STRICT_GROUP_SIZE))
)
]
)
Expand Down

0 comments on commit 18225a4

Please sign in to comment.