summaryrefslogtreecommitdiffstats
path: root/searchlib/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-27 17:05:15 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-07-25 12:21:31 +0200
commitc68edd6ab19dfff26561abf8f73ac192122de136 (patch)
tree142ba59e31fad17126a7d64eb48addee2c4ba801 /searchlib/src
parent6a10521232276152f7ec6989330312ac6fae645d (diff)
Call setDocId explicit in test instead.
Diffstat (limited to 'searchlib/src')
-rw-r--r--searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
index 5e1882e2156..db6df2d1140 100644
--- a/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp
@@ -112,6 +112,8 @@ bool Test::search(const string &term, IAttributeManager &attribute_manager) {
return ret;
}
+constexpr uint32_t DOCID_LIMIT = 3;
+
bool Test::search(const Node &node, IAttributeManager &attribute_manager) {
AttributeContext ac(attribute_manager);
FakeRequestContext requestContext(&ac);
@@ -122,6 +124,7 @@ bool Test::search(const Node &node, IAttributeManager &attribute_manager) {
EXPECT_TRUE(!result->getState().estimate().empty);
EXPECT_EQUAL(3u, result->getState().estimate().estHits);
result->fetchPostings(true);
+ result->setDocIdLimit(DOCID_LIMIT);
SearchIterator::UP iterator = result->createSearch(*md, true);
ASSERT_TRUE((bool)iterator);
iterator->initRange(1, 3);
@@ -149,7 +152,7 @@ MyAttributeManager fill(typename AT::Type * attr, T value) {
attr->addDoc(docid);
attr->addDoc(docid);
attr->addDoc(docid);
- assert(2u == docid);
+ assert(DOCID_LIMIT-1 == docid);
AT::add(*attr, value);
return MyAttributeManager(attr);
}