diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-02-02 14:20:03 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-02-02 14:20:03 +0100 |
commit | 41502ddacbfc64c2ef883f8be16b88d80a8f33c8 (patch) | |
tree | 393f8f3ede3ad501583ca1dbfa9464b632d00bfa /streamingvisitors | |
parent | d005a092da0e5f352a9ede03ab48989a1d5dbb2b (diff) |
Change parent class of search::streaming::PhraseQueryNode from
search::streaming::AndQueryNode to search::streaming::MultiTerm.
Diffstat (limited to 'streamingvisitors')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/querywrapper.cpp | 9 |
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]; } |