summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-06-21 21:45:41 +0200
committerTor Egge <Tor.Egge@broadpark.no>2019-06-21 21:57:16 +0200
commitc5a339d82ddfeea8b4421e3994f272c23ac29af4 (patch)
tree78256f832cf2ab05ea8c2c5f3f2f68d07b38f062 /searchlib
parente6ffcc205f280c8c4bb317de64682d9d73cf939f (diff)
Tag match data for children of near search as needing
unpack of normal features.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp28
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h2
2 files changed, 30 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
index 0a11203c390..bf7b659dea7 100644
--- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.cpp
@@ -68,6 +68,20 @@ void optimize_source_blenders(IntermediateBlueprint &self, size_t begin_idx) {
}
}
+void
+need_normal_features_for_children(const IntermediateBlueprint &blueprint, fef::MatchData &md)
+{
+ for (size_t i = 0; i < blueprint.childCnt(); ++i) {
+ const Blueprint::State &cs = blueprint.getChild(i).getState();
+ for (size_t j = 0; j < cs.numFields(); ++j) {
+ auto *tfmd = cs.field(j).resolve(md);
+ if (tfmd != nullptr) {
+ tfmd->setNeedNormalFeatures(true);
+ }
+ }
+ }
+}
+
} // namespace search::queryeval::<unnamed>
//-----------------------------------------------------------------------------
@@ -375,6 +389,13 @@ NearBlueprint::inheritStrict(size_t i) const
}
SearchIterator::UP
+NearBlueprint::createSearch(fef::MatchData &md, bool strict) const
+{
+ need_normal_features_for_children(*this, md);
+ return IntermediateBlueprint::createSearch(md, strict);
+}
+
+SearchIterator::UP
NearBlueprint::createIntermediateSearch(const MultiSearch::Children &subSearches,
bool strict, search::fef::MatchData &md) const
{
@@ -416,6 +437,13 @@ ONearBlueprint::inheritStrict(size_t i) const
}
SearchIterator::UP
+ONearBlueprint::createSearch(fef::MatchData &md, bool strict) const
+{
+ need_normal_features_for_children(*this, md);
+ return IntermediateBlueprint::createSearch(md, strict);
+}
+
+SearchIterator::UP
ONearBlueprint::createIntermediateSearch(const MultiSearch::Children &subSearches,
bool strict, search::fef::MatchData &md) const
{
diff --git a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
index 440794c25d8..a217c8f303d 100644
--- a/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
+++ b/searchlib/src/vespa/searchlib/queryeval/intermediate_blueprints.h
@@ -102,6 +102,7 @@ public:
bool should_optimize_children() const override { return false; }
void sort(std::vector<Blueprint*> &children) const override;
bool inheritStrict(size_t i) const override;
+ SearchIteratorUP createSearch(fef::MatchData &md, bool strict) const override;
SearchIterator::UP
createIntermediateSearch(const MultiSearch::Children &subSearches,
bool strict, fef::MatchData &md) const override;
@@ -122,6 +123,7 @@ public:
bool should_optimize_children() const override { return false; }
void sort(std::vector<Blueprint*> &children) const override;
bool inheritStrict(size_t i) const override;
+ SearchIteratorUP createSearch(fef::MatchData &md, bool strict) const override;
SearchIterator::UP
createIntermediateSearch(const MultiSearch::Children &subSearches,
bool strict, fef::MatchData &md) const override;