diff options
author | Henning Baldersheim <balder@oath.com> | 2018-06-04 17:12:00 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-06-04 17:12:00 +0200 |
commit | 9755590957e73eed2ac6d9cc684a81a8b9bb14b5 (patch) | |
tree | 4d454999e5a6de4102707089edf4882c1debcaab /searchcore | |
parent | 6b00f53ee6a32d6711e1e5d084e5b7efb4a02891 (diff) |
No need for special handling of temporary qrs behavior.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/matching/query_test.cpp | 4 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/sameelementmodifier.cpp | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/searchcore/src/tests/proton/matching/query_test.cpp b/searchcore/src/tests/proton/matching/query_test.cpp index 461d2300843..9adb86147b6 100644 --- a/searchcore/src/tests/proton/matching/query_test.cpp +++ b/searchcore/src/tests/proton/matching/query_test.cpp @@ -911,8 +911,8 @@ Test::requireThatSameElementTermsAreProperlyPrefixed() root = dynamic_cast<search::query::SameElement *>(query.get()); EXPECT_EQUAL(root->getView(), "abc"); EXPECT_EQUAL(root->getChildren().size(), 2u); - EXPECT_EQUAL(dynamic_cast<ProtonStringTerm *>(root->getChildren()[0])->getView(), "abc.f1"); - EXPECT_EQUAL(dynamic_cast<ProtonStringTerm *>(root->getChildren()[1])->getView(), "abc.f2"); + EXPECT_EQUAL(dynamic_cast<ProtonStringTerm *>(root->getChildren()[0])->getView(), "abc.abc.f1"); + EXPECT_EQUAL(dynamic_cast<ProtonStringTerm *>(root->getChildren()[1])->getView(), "abc.abc.f2"); } Test::~Test() = default; diff --git a/searchcore/src/vespa/searchcore/proton/matching/sameelementmodifier.cpp b/searchcore/src/vespa/searchcore/proton/matching/sameelementmodifier.cpp index 55462d6cdf8..da33d444d99 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/sameelementmodifier.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/sameelementmodifier.cpp @@ -15,10 +15,7 @@ SameElementModifier::visit(ProtonNodeTypes::SameElement &n) { for (search::query::Node * child : n.getChildren()) { search::query::TermNode * term = dynamic_cast<search::query::TermNode *>(child); if (term != nullptr) { - const vespalib::string & index = term->getView(); - if (index.find(prefix) != 0) { // This can be removed when qrs does not prefix the sameelemnt children - term->setView(prefix + index); - } + term->setView(prefix + term->getView()); } else { LOG(error, "Required a search::query::TermNode. Got %s", vespalib::getClassName(*child).c_str()); } |