summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/attribute/searchcontext
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-22 15:47:11 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-22 15:47:11 +0200
commit4e931de605a3813221357ff8b1c1715fc8d8082e (patch)
tree593c85e1ff1c45555f4ec70904d9e71c47ad4484 /searchlib/src/tests/attribute/searchcontext
parent541ef10095dd40c3f9fee45abb53df5e3cbcef32 (diff)
init correct range on attribute iterators.
Diffstat (limited to 'searchlib/src/tests/attribute/searchcontext')
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
index a79c35632be..20e5b592501 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
@@ -432,7 +432,7 @@ ResultSetPtr
SearchContextTest::performSearch(SearchIterator & sb, uint32_t numDocs)
{
HitCollector hc(numDocs, numDocs, 0);
- sb.initFullRange();
+ sb.initRange(1, numDocs);
// assume strict toplevel search object located at start
for (sb.seek(1u); ! sb.isAtEnd(); sb.seek(sb.getDocId() + 1)) {
hc.addHit(sb.getDocId(), 0.0);
@@ -723,7 +723,7 @@ SearchContextTest::testStrictSearchIterator(SearchContext & threeHits,
{ // search for value with 3 hits
threeHits.fetchPostings(true);
SearchBasePtr sb = threeHits.createIterator(&dummy, true);
- sb->initFullRange();
+ sb->initRange(1, threeHits.attribute().getCommittedDocIdLimit());
EXPECT_TRUE(typeTester.matches(*sb));
EXPECT_TRUE(sb->getDocId() == sb->beginId() ||
sb->getDocId() == 1u);
@@ -744,7 +744,7 @@ SearchContextTest::testStrictSearchIterator(SearchContext & threeHits,
{ // search for value with no hits
noHits.fetchPostings(true);
SearchBasePtr sb = noHits.createIterator(&dummy, true);
- sb->initFullRange();
+ sb->initRange(1, noHits.attribute().getCommittedDocIdLimit());
ASSERT_TRUE(typeTester.matches(*sb));
EXPECT_TRUE(sb->getDocId() == sb->beginId() ||
sb->isAtEnd());