diff options
author | HÃ¥vard Pettersen <havardpe@gmail.com> | 2017-08-07 12:30:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 12:30:48 +0200 |
commit | 0428c9e03e534b7f6d6cff3ae0746d21de690c98 (patch) | |
tree | e991bb096dddcba6353d46421cc29c0b1b1738c9 /searchlib | |
parent | fc9d090fb349a69f1a025b9b808f1ade2ef6247a (diff) | |
parent | c68edd6ab19dfff26561abf8f73ac192122de136 (diff) |
Merge pull request #3011 from yahoo/balder/do-not-set-docid-in-blueprint-construction
Balder/do not set docid in blueprint construction
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/tests/attribute/searchable/attributeblueprint_test.cpp | 5 |
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); } |