mirror of https://github.com/milvus-io/milvus.git
Forbid counting entities with pagination (#23375)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>pull/23387/head
parent
496f596e92
commit
a940df94c7
|
@ -332,6 +332,11 @@ func (t *queryTask) PreExecute(ctx context.Context) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// count with pagination
|
||||
if t.plan.GetQuery().GetIsCount() && t.queryParams.limit != typeutil.Unlimited {
|
||||
return fmt.Errorf("count entities with pagination is not allowed")
|
||||
}
|
||||
|
||||
if t.plan.GetQuery().GetIsCount() {
|
||||
t.RetrieveRequest.IsCount = true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue