mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix:fix empty search result bug (#36582)
#36450 Signed-off-by: luzhang <luzhang@zilliz.com> Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
parent
80f25d497f
commit
9e3efa06be
@ -65,7 +65,7 @@ class ExecPlanNodeVisitor : PlanNodeVisitor {
|
||||
} // namespace impl
|
||||
|
||||
static SearchResult
|
||||
empty_search_result(int64_t num_queries, SearchInfo& search_info) {
|
||||
empty_search_result(int64_t num_queries) {
|
||||
SearchResult final_result;
|
||||
final_result.total_nq_ = num_queries;
|
||||
final_result.unity_topK_ = 0; // no result
|
||||
@ -119,7 +119,8 @@ ExecPlanNodeVisitor::VectorVisitorImpl(VectorPlanNode& node) {
|
||||
|
||||
// PreExecute: skip all calculation
|
||||
if (active_count == 0) {
|
||||
search_result_opt_ = std::move(SearchResult());
|
||||
search_result_opt_ = std::move(
|
||||
empty_search_result(placeholder_group_->at(0).num_of_queries_));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user