aboutsummaryrefslogtreecommitdiffstats
path: root/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2024-02-09 13:12:45 +0100
committerTor Egge <Tor.Egge@online.no>2024-02-09 13:12:45 +0100
commit332bdd44a075c16418b49ddfe66965e5a46e2e8c (patch)
treed1a848f04b0deda0937687a041898faf55f199f8 /streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
parent6e03787d79b327915dff98815db777d879986396 (diff)
Handle search::streaming::EquivQueryNode as a leaf in the query tree.
Diffstat (limited to 'streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp')
-rw-r--r--streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
index 3ae4794e33f..c596b46a774 100644
--- a/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
+++ b/streamingvisitors/src/vespa/vsm/vsm/fieldsearchspec.cpp
@@ -1,6 +1,7 @@
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "fieldsearchspec.h"
+#include <vespa/searchlib/query/streaming/equiv_query_node.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vsm/searcher/boolfieldsearcher.h>
#include <vespa/vsm/searcher/floatfieldsearcher.h>
@@ -222,7 +223,14 @@ FieldSearchSpecMap::buildFieldsInQuery(const Query & query) const
query.getLeaves(qtl);
for (const auto & term : qtl) {
- addFieldsFromIndex(term->index(), fieldsInQuery);
+ auto equiv = term->as_equiv_query_node();
+ if (equiv != nullptr) {
+ for (const auto& subterm : equiv->get_terms()) {
+ addFieldsFromIndex(subterm->index(), fieldsInQuery);
+ }
+ } else {
+ addFieldsFromIndex(term->index(), fieldsInQuery);
+ }
}
return fieldsInQuery;
}