diff --git a/internal/proxy/task_hybrid_search.go b/internal/proxy/task_hybrid_search.go index 7090bbdfb8..05f1fd76e2 100644 --- a/internal/proxy/task_hybrid_search.go +++ b/internal/proxy/task_hybrid_search.go @@ -51,6 +51,7 @@ type hybridSearchTask struct { multipleRecallResults *typeutil.ConcurrentSet[*milvuspb.SearchResults] reScorers []reScorer + rankParams *rankParams } func (t *hybridSearchTask) PreExecute(ctx context.Context) error { @@ -250,13 +251,13 @@ func (t *hybridSearchTask) PostExecute(ctx context.Context) error { return err } - rankParams, err := parseRankParams(t.request.GetRankParams()) + t.rankParams, err = parseRankParams(t.request.GetRankParams()) if err != nil { return err } t.result, err = rankSearchResultData(ctx, 1, - rankParams, + t.rankParams, primaryFieldSchema.GetDataType(), t.multipleRecallResults.Collect()) if err != nil { @@ -295,6 +296,12 @@ func (t *hybridSearchTask) Requery() error { NotReturnAllMeta: t.request.GetNotReturnAllMeta(), ConsistencyLevel: t.request.GetConsistencyLevel(), UseDefaultConsistency: t.request.GetUseDefaultConsistency(), + QueryParams: []*commonpb.KeyValuePair{ + { + Key: LimitKey, + Value: strconv.FormatInt(t.rankParams.limit, 10), + }, + }, } // TODO:Xige-16 refine the mvcc functionality of hybrid search