diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-12-06 13:16:35 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-12-06 13:18:27 +0000 |
commit | 35e9b1e56e26a2194b535be3ed652a0f6803490d (patch) | |
tree | c8dc34710a8dca95d27e78fbb0114faebc217bbd /searchlib | |
parent | 04421ae2aec87d9a4e3cd6bb2445e0ce5c20f558 (diff) |
Allow repeated fetchPostings calls
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp index cf9450cbcca..15ff9c1ea7a 100644 --- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp +++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp @@ -113,12 +113,12 @@ template <typename DataT> void PostingListSearchContextT<DataT>::fetchPostings(bool strict) { - assert (! _fetchPostingsDone); + if (_fetchPostingsDone) return; _fetchPostingsDone = true; - if (_uniqueValues < 2u) { - return; - } + + if (_uniqueValues < 2u) return; + if (strict && !fallbackToFiltering()) { size_t sum(countHits()); if (sum < _docIdLimit / 64) { |