diff options
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 2 |
1 files changed, 1 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 4822dc57669..c1c4387cf41 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp @@ -180,7 +180,7 @@ MatchThread::match_loop(MatchTools &tools, HitCollector &hits) { uint32_t lastCovered = inner_match_loop<Strategy, do_rank, do_limit, do_share_work>(context, tools, docid_range); softDoomed = (lastCovered < docid_range.end); - docsCovered += lastCovered - docid_range.begin; + docsCovered += std::min(lastCovered, docid_range.end) - docid_range.begin; } uint32_t matches = context.matches; if (do_limit && context.isBelowLimit()) { |