diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-04 20:17:17 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-07-04 20:17:17 +0000 |
commit | 607d5047f69a7e7c5700fc0352de6f811098b763 (patch) | |
tree | d105b4bb9ea15f6bec8005eab1e0a4b4653204bb | |
parent | 5c9eafb455d9d9f012d2cbad1eb023e141364e93 (diff) |
Sample totalHits before modifying the overflow bitvector.
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 3 |
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()); |