summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 19:32:12 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-16 19:32:12 +0100
commit0dfbe3b1eca88eec32aab422b845344077bb83a9 (patch)
tree4fd00731db2dd90b6d1127eda9ab3aa6f3660174
parent3b8b26c38e535aa2c0c82702fc1c0d2aff558cd4 (diff)
Unify some more on hard versus soft doom.
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp7
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/result_processor.h2
5 files changed, 8 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index 1bb0893fbaa..58473080b00 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -176,7 +176,7 @@ MatchThread::inner_match_loop(Context & context, IteratorT & search, DocidRange
{
search->initRange(docid_range.begin, docid_range.end);
uint32_t docId = search->seekFirst(docid_range.begin);
- while ((docId < docid_range.end) && !context.getSoftDoom()) {
+ while ((docId < docid_range.end) && !context.atSoftDoom()) {
if (do_rank) {
search->unpack(docId);
context.rankHit(docId);
@@ -251,7 +251,6 @@ MatchThread::match_loop_helper(MatchTools &matchTools, IteratorT search,
search::ResultSet::UP
MatchThread::findMatches(MatchTools &matchTools)
{
- const Doom & hardDoom = matchTools.getHardDoom();
RankProgram::UP ranking = matchTools.first_phase_program();
SearchIterator::UP search = matchTools.createSearch(ranking->match_data());
LOG(debug, "SearchIterator: %s", search->asString().c_str());
@@ -280,7 +279,7 @@ MatchThread::findMatches(MatchTools &matchTools)
size_t useHits = communicator.selectBest(sorted_scores);
select_best_timer.done();
DocumentScorer scorer(*ranking, *search);
- uint32_t reRanked = hits.reRank(scorer, hardDoom.doom() ? 0 : useHits);
+ uint32_t reRanked = hits.reRank(scorer, matchTools.getHardDoom().doom() ? 0 : useHits);
thread_stats.docsReRanked(reRanked);
}
{ // rank scaling
@@ -392,7 +391,7 @@ MatchThread::run()
search::ResultSet::UP result = findMatches(*matchTools);
match_time.stop();
match_time_s = match_time.elapsed().sec();
- resultContext = resultProcessor.createThreadContext(matchTools->getSoftDoom(), thread_id);
+ resultContext = resultProcessor.createThreadContext(matchTools->getHardDoom(), thread_id);
{
WaitTimer get_token_timer(wait_time_s);
QueryLimiter::Token::UP processToken(
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
index 74315aa810b..014d935ba00 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.h
@@ -56,7 +56,7 @@ private:
void addHit(uint32_t docId) { _hits.addHit(docId, 0.0); }
bool isBelowLimit() const { return matches < _matches_limit; }
bool isAtLimit() const { return matches == _matches_limit; }
- bool getSoftDoom() const { return _softDoom.doom(); }
+ bool atSoftDoom() const { return _softDoom.doom(); }
MaybeMatchPhaseLimiter & limiter() { return _limiter; }
uint32_t matches;
private:
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
index 54fb00fd5b0..5cf5900567f 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.h
@@ -81,7 +81,7 @@ public:
MatchToolsFactory(QueryLimiter & queryLimiter,
const vespalib::Doom & softDoom,
- const vespalib::Doom & doom,
+ const vespalib::Doom & hardDoom,
ISearchContext &searchContext,
search::attribute::IAttributeContext &attributeContext,
const vespalib::stringref &queryStack,
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
index f09f88a5bad..cfe3d8fa74b 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.cpp
@@ -57,9 +57,9 @@ ResultProcessor::prepareThreadContextCreation(size_t num_threads)
}
ResultProcessor::Context::UP
-ResultProcessor::createThreadContext(const vespalib::Doom & doom, size_t thread_id)
+ResultProcessor::createThreadContext(const vespalib::Doom & hardDoom, size_t thread_id)
{
- Sort::UP sort(new Sort(doom, _attrContext, _sortSpec));
+ Sort::UP sort(new Sort(hardDoom, _attrContext, _sortSpec));
PartialResult::LP result(new PartialResult((_offset + _hits), sort->hasSortData()));
if (thread_id == 0) {
_result = result;
diff --git a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
index 42af6bad65f..4fa581a872d 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/result_processor.h
@@ -100,7 +100,7 @@ public:
size_t countFS4Hits();
void prepareThreadContextCreation(size_t num_threads);
- Context::UP createThreadContext(const vespalib::Doom & doom, size_t thread_id);
+ Context::UP createThreadContext(const vespalib::Doom & hardDoom, size_t thread_id);
Result::UP makeReply();
};