summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/queryeval/fake_searchable
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2019-11-01 08:48:06 +0000
committerGeir Storli <geirst@verizonmedia.com>2019-11-01 09:26:50 +0000
commita98348f736f16506a9e7d5fa80ddb029fd2162c8 (patch)
tree5e10a92b623a5f154715dd68d05d45d59bb1453d /searchlib/src/tests/queryeval/fake_searchable
parent7274edd73bcbc1956b9956b6d15743a77dae53e9 (diff)
Fix setup of same element iterator to use the attribute search context from the child blueprint instead of the child search iterator.
This fixes a bug that occurs if the search iterator from a fast-search attribute is a bit vector iterator. The bit vector iterator doesn't expose the attribute search context, so the setup of the same element iterator doesn't wrap it into an attribute element iterator that handles finding which elements that match. The result is that the same element iterator will not match any documents.
Diffstat (limited to 'searchlib/src/tests/queryeval/fake_searchable')
-rw-r--r--searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp b/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
index 6cef4479439..6fc75c8e696 100644
--- a/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
+++ b/searchlib/src/tests/queryeval/fake_searchable/fake_searchable_test.cpp
@@ -371,7 +371,7 @@ TEST_F(FakeSearchableTest, require_that_relevant_data_can_be_obtained_from_fake_
MatchData::UP md = MatchData::makeTestInstance(100, 10);
bp->fetchPostings(false);
SearchIterator::UP search = bp->createSearch(*md, false);
- EXPECT_EQ(bp->get_attribute_search_context(), search->getAttributeSearchContext());
+ EXPECT_TRUE(bp->get_attribute_search_context() != nullptr);
const auto *attr_ctx = bp->get_attribute_search_context();
ASSERT_TRUE(attr_ctx);
EXPECT_EQ(attr_ctx->attributeName(), "attrfoo");