Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pymilvus/client/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
DEFAULT_RESOURCE_GROUP = "__default_resource_group"
REDUCE_STOP_FOR_BEST = "reduce_stop_for_best"
GROUP_BY_FIELD = "group_by_field"
GROUP_SIZE = "group_size"
ITERATOR_FIELD = "iterator"

RANKER_TYPE_RRF = "rrf"
Expand Down
5 changes: 5 additions & 0 deletions pymilvus/client/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from .constants import (
DEFAULT_CONSISTENCY_LEVEL,
GROUP_BY_FIELD,
GROUP_SIZE,
ITERATOR_FIELD,
REDUCE_STOP_FOR_BEST,
)
Expand Down Expand Up @@ -667,6 +668,10 @@ def search_requests_with_expr(
if group_by_field is not None:
search_params[GROUP_BY_FIELD] = group_by_field

group_size = kwargs.get(GROUP_SIZE)
if group_size is not None:
search_params[GROUP_SIZE] = group_size

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

Expand Down