summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
index 2f819905492..77504c4ab3c 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
@@ -204,6 +204,7 @@ private:
// test search iterator unpacking
void fillForSearchIteratorUnpackingTest(IntegerAttribute * ia, bool extra);
void testSearchIteratorUnpacking(const AttributePtr & ptr, SearchContext & sc, bool extra, bool strict) {
+ sc.fetchPostings(strict);
for (bool withElementId : {false, true}) {
testSearchIteratorUnpacking(ptr, sc, extra, strict, withElementId);
}
@@ -951,7 +952,6 @@ SearchContextTest::testSearchIteratorUnpacking(const AttributePtr & attr, Search
pos.setElementWeight(100);
md.appendPosition(pos);
- sc.fetchPostings(strict);
SearchBasePtr sb = sc.createIterator(&md, strict);
if (withElementId) {
sb = std::make_unique<attribute::ElementIterator>(std::move(sb), sc, md);
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
index 15c6b1933ee..7793af8f510 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.hpp
@@ -113,7 +113,7 @@ template <typename DataT>
void
PostingListSearchContextT<DataT>::fetchPostings(bool strict)
{
- if (_fetchPostingsDone) return;
+ assert (! _fetchPostingsDone);
_fetchPostingsDone = true;
if (_uniqueValues < 2u) {