diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2019-09-25 17:45:46 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2019-09-25 17:45:46 +0200 |
commit | 83c97aaad8bdfd6cc11b49be4a542e179cda1b4f (patch) | |
tree | ef0c1e62f31f255ed3ec8fcb59f8bd3d43827386 /searchcore | |
parent | 1801eb4421d5ea80b6cd881755ba140d5bb76d22 (diff) |
Add filtering support to attribute combiner dynamic field writer.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp | 11 | ||||
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp index edb91787214..f3559b54eb4 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp @@ -4,6 +4,7 @@ #include <vespa/searchlib/queryeval/begin_and_end_id.h> #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/common/location.h> +#include <vespa/searchlib/common/matching_elements.h> #include <vespa/searchlib/common/transport.h> #include <vespa/vespalib/data/slime/slime.h> #include <vespa/vespalib/util/stringfmt.h> @@ -146,7 +147,8 @@ DocsumContext::DocsumContext(const DocsumRequest & request, IDocsumWriter & docs _attrCtx(attrCtx), _attrMgr(attrMgr), _docsumState(*this), - _sessionMgr(sessionMgr) + _sessionMgr(sessionMgr), + _matching_elements() { initState(); } @@ -213,4 +215,11 @@ DocsumContext::ParseLocation(search::docsummary::GetDocsumsState *state) state->_parsedLocation.reset(getLocation(_request.location, _attrMgr)); } +const MatchingElements& +DocsumContext::fill_matching_elements() +{ + _matching_elements = std::make_unique<MatchingElements>(); + return *_matching_elements; +} + } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h index 45f3ca8e44f..ec03efdd650 100644 --- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h +++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.h @@ -25,6 +25,7 @@ private: search::IAttributeManager & _attrMgr; search::docsummary::GetDocsumsState _docsumState; matching::SessionManager & _sessionMgr; + std::unique_ptr<search::MatchingElements> _matching_elements; void initState(); search::engine::DocsumReply::UP createReply(); @@ -48,6 +49,7 @@ public: void FillSummaryFeatures(search::docsummary::GetDocsumsState * state, search::docsummary::IDocsumEnvironment * env) override; void FillRankFeatures(search::docsummary::GetDocsumsState * state, search::docsummary::IDocsumEnvironment * env) override; void ParseLocation(search::docsummary::GetDocsumsState * state) override; + const search::MatchingElements& fill_matching_elements() override; }; } // namespace proton |