Skip to content

Commit

Permalink
fix:fix empty search result bug (#36582)
Browse files Browse the repository at this point in the history
#36450

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
  • Loading branch information
zhagnlu and luzhang authored Sep 28, 2024
1 parent 80f25d4 commit 9e3efa0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/core/src/query/ExecPlanNodeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9e3efa0

Please # to comment.