Skip to content

Commit b0e490b

Browse files
MrPresent-HanMrPresent-Han
andauthored
fix: Group value is nil(#45418) (#45421)
related: #45418 pr: #45422 Signed-off-by: MrPresent-Han <[email protected]> Co-authored-by: MrPresent-Han <[email protected]>
1 parent 8a23cdb commit b0e490b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

internal/proxy/search_reduce_util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ func reduceResults(ctx context.Context, toReduceResults []*internalpb.SearchResu
514514
}
515515

516516
if len(validSearchResults) <= 0 {
517+
log.Debug("reduced search results is empty, fill in empty result")
517518
return fillInEmptyResult(nq), nil
518519
}
519520

internal/util/function/rerank/util.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"strings"
2626

2727
"github.com/milvus-io/milvus-proto/go-api/v2/schemapb"
28+
"github.com/milvus-io/milvus/pkg/v2/log"
2829
"github.com/milvus-io/milvus/pkg/v2/util/merr"
2930
"github.com/milvus-io/milvus/pkg/v2/util/metric"
3031
"github.com/milvus-io/milvus/pkg/v2/util/typeutil"
@@ -516,7 +517,8 @@ func genIdGroupingMap(multipSearchResultData []*schemapb.SearchResultData) (map[
516517
idGroupValue := map[any]any{}
517518
for _, result := range multipSearchResultData {
518519
if result.GetGroupByFieldValue() == nil {
519-
return nil, fmt.Errorf("Group value is nil")
520+
log.Warn("Group value is nil, this is due to empty results in search reduce phase")
521+
continue
520522
}
521523
size := typeutil.GetSizeOfIDs(result.Ids)
522524
groupIter := typeutil.GetDataIterator(result.GetGroupByFieldValue())

0 commit comments

Comments
 (0)