diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-05-31 14:43:04 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-05-31 14:43:04 +0200 |
commit | fd2bb5ed6791986cb25cbdf6dd68d02ed5c65fe9 (patch) | |
tree | f7c003fe57534ad22bc77a51183898f8b94c26df /searchcore | |
parent | e06242c5d5e8ec7e85e25e1c21354d8c6776e2f6 (diff) |
Deduce default value in hit collector.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_params.h | 2 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_params.h b/searchcore/src/vespa/searchcore/proton/matching/match_params.h index 5b58c11b7e1..f9dd55e7bb1 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_params.h +++ b/searchcore/src/vespa/searchcore/proton/matching/match_params.h @@ -27,7 +27,7 @@ struct MatchParams { uint32_t hits_in, bool hasFinalRank, bool needRanking=true); - bool save_rank_scores() const { return ((heapSize + arraySize) != 0); } + bool save_rank_scores() const noexcept { return (arraySize != 0); } bool has_rank_drop_limit() const; }; diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp index 211e67f1e2b..6b443231c0a 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp @@ -367,7 +367,7 @@ MatchThread::findMatches(MatchTools &tools) tools.give_back_search(ProfiledIterator::profile(*match_profiler, tools.borrow_search())); tools.tag_search_as_changed(); } - HitCollector hits(matchParams.numDocs, matchParams.arraySize); + HitCollector hits(matchParams.numDocs, match_with_ranking ? matchParams.arraySize : 0); trace->addEvent(4, "Start match and first phase rank"); /** * All, or none of the threads in the bundle must execute the match loop. @@ -380,7 +380,7 @@ MatchThread::findMatches(MatchTools &tools) secondPhase(tools, hits); } trace->addEvent(4, "Create result set"); - return hits.getResultSet(fallback_rank_value()); + return hits.getResultSet(); } void |