From adfff19ca8e57163fe1b4741ce1461b45a0f1df3 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Wed, 20 Sep 2017 09:31:26 +0000 Subject: optimized blacklist search can not be used with ranking (since the iterator fast-path does not track its own docid) --- searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'searchcore') diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp index 73cd5ffca06..bd6a06ac4f1 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp @@ -49,8 +49,8 @@ struct SimpleStrategy { // seek_next maps to OptimizedAndNotForBlackListing::seekFast struct FastBlackListingStrategy { - static bool can_use(bool do_limit, SearchIterator &search) { - return (!do_limit && + static bool can_use(bool do_rank, bool do_limit, SearchIterator &search) { + return (!do_rank && !do_limit && (dynamic_cast(&search) != nullptr)); } static uint32_t seek_next(SearchIterator &search, uint32_t docid) { @@ -200,7 +200,7 @@ template void MatchThread::match_loop_helper_rank_limit_share(MatchTools &tools, HitCollector &hits) { - if (FastBlackListingStrategy::can_use(do_limit, tools.search())) { + if (FastBlackListingStrategy::can_use(do_rank, do_limit, tools.search())) { match_loop(tools, hits); } else { match_loop(tools, hits); -- cgit v1.2.3