aboutsummaryrefslogtreecommitdiffstats
path: root/streamingvisitors
diff options
context:
space:
mode:
Diffstat (limited to 'streamingvisitors')
-rw-r--r--streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp b/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
index c1311a80c7a..78229f401ad 100644
--- a/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
+++ b/streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp
@@ -6,8 +6,8 @@ using namespace search::streaming;
namespace streaming {
-QueryWrapper::PhraseList::PhraseList(Query & query) :
- _phrases()
+QueryWrapper::PhraseList::PhraseList(Query & query)
+ : _phrases()
{
QueryNodeRefList phrases;
query.getPhrases(phrases);
@@ -20,8 +20,9 @@ PhraseQueryNode *
QueryWrapper::PhraseList::findPhrase(QueryTerm * term, size_t & index)
{
for (size_t i = 0; i < _phrases.size(); ++i) {
- for (size_t j = 0; j < _phrases[i]->size(); ++j) {
- if ((*_phrases[i])[j].get() == term) {
+ auto& terms = _phrases[i]->get_terms();
+ for (size_t j = 0; j < terms.size(); ++j) {
+ if (terms[j].get() == term) {
index = j;
return _phrases[i];
}