milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
29.89k stars 2.87k forks source link

[Bug]: [group size] Milvus should report error if setting group_size to 0 or negative #36146

Open yanliang567 opened 1 month ago

yanliang567 commented 1 month ago

Is there an existing issue for this?

Environment

- Milvus version: master-20240906-21b135c7-amd64
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):pymilvus 2.5.0rc75

Current Behavior

not report error

Expected Behavior

report an error with meaningful msg

Steps To Reproduce

1. create a collection with some data
2. build index and load
3. search with group by a field, and group_size=-1

Milvus Log

No response

Anything else?

No response

yanliang567 commented 1 month ago

BTW, we also need a max value checking for group size.

yanliang567 commented 1 month ago

/assign @MrPresent-Han /unassign

xiaofan-luan commented 1 month ago

let's set min group size to 1 and max to 10

xiaofan-luan commented 1 month ago

just some rough numbers