mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
fix: Fix requery without limit during HybridSearch (#30220)
issue: #29990 /kind bug Signed-off-by: xige-16 <xi.ge@zilliz.com> Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
parent
da749c0df2
commit
4f25066aa7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user