aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-02-06 16:45:29 +0100
committerGitHub <noreply@github.com>2024-02-06 16:45:29 +0100
commited823488582220e3ecb4df5ee56d4442b46c347c (patch)
tree80211d2fda2568d7a3d84a5f7cbd1956893c0d3b
parent01fe1329662203612105bb66cce82956d7e8dbf2 (diff)
parentd7e56ec35cf1e83d0f7a5089a80a01d2918013cb (diff)
Merge pull request #30202 from vespa-engine/toregge/stop-getting-phrase-index-from-subterm-in-streaming-modev8.300.15
Stop getting phrase index from subterm in streaming mode.
-rw-r--r--searchlib/src/vespa/searchlib/query/streaming/querynode.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
index d1f894063f8..0b277dbe221 100644
--- a/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
+++ b/searchlib/src/vespa/searchlib/query/streaming/querynode.cpp
@@ -262,7 +262,11 @@ QueryNode::build_weighted_set_term(const QueryNodeResultFactory& factory, Simple
std::unique_ptr<QueryNode>
QueryNode::build_phrase_term(const QueryNodeResultFactory& factory, SimpleQueryStackDumpIterator& queryRep)
{
- auto phrase = std::make_unique<PhraseQueryNode>(factory.create(), queryRep.getIndexName(), queryRep.getArity());
+ vespalib::string index = queryRep.getIndexName();
+ if (index.empty()) {
+ index = SimpleQueryStackDumpIterator::DEFAULT_INDEX;
+ }
+ auto phrase = std::make_unique<PhraseQueryNode>(factory.create(), index, queryRep.getArity());
auto arity = queryRep.getArity();
phrase->setWeight(queryRep.GetWeight());
phrase->setUniqueId(queryRep.getUniqueId());
@@ -275,10 +279,6 @@ QueryNode::build_phrase_term(const QueryNodeResultFactory& factory, SimpleQueryS
std::unique_ptr<QueryTerm> qt(qtp);
phrase->add_term(std::move(qt));
}
- if (!phrase->get_terms().empty()) {
- auto& first = *phrase->get_terms().front();
- phrase->setIndex(first.getIndex());
- }
return phrase;
}