summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index 52d7d906d4c..b57346611f1 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -374,6 +374,7 @@ MatchThread::processResult(const Doom & doom, search::ResultSet::UP result, Resu
result->mergeWithBitOverflow(fallback_rank_value());
}
if (doom.hard_doom()) return;
+ size_t totalHits = result->getNumHits(); // Must be done before modifying overflow
const search::RankedHit *hits = result->getArray();
size_t numHits = result->getArrayUsed();
search::BitVector *bits = result->getBitOverflow();
@@ -394,7 +395,7 @@ MatchThread::processResult(const Doom & doom, search::ResultSet::UP result, Resu
man.groupInRelevanceOrder(hits, numHits);
}
if (doom.hard_doom()) return;
- fillPartialResult(context, result->getNumHits(), numHits, hits, bits);
+ fillPartialResult(context, totalHits, numHits, hits, bits);
if (auto task = matchToolsFactory.createOnMatchTask()) {
task->run(result->copyResult());