summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2017-09-20 09:31:26 +0000
committerHåvard Pettersen <havardpe@oath.com>2017-09-20 09:31:26 +0000
commitadfff19ca8e57163fe1b4741ce1461b45a0f1df3 (patch)
tree00b457568c7f5baed08882cb378167ee57524eb2 /searchcore
parent07145ad5ee9cc0f6d1bef0c76fd93a1053d9dde2 (diff)
optimized blacklist search can not be used with ranking
(since the iterator fast-path does not track its own docid)
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp6
1 files changed, 3 insertions, 3 deletions
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<OptimizedAndNotForBlackListing *>(&search) != nullptr));
}
static uint32_t seek_next(SearchIterator &search, uint32_t docid) {
@@ -200,7 +200,7 @@ template <bool do_rank, bool do_limit, bool do_share>
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<FastBlackListingStrategy, do_rank, do_limit, do_share>(tools, hits);
} else {
match_loop<SimpleStrategy, do_rank, do_limit, do_share>(tools, hits);