diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-06-30 12:56:22 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-06-30 12:56:22 +0200 |
commit | bf046de4b046e590ce34ab16627624bc3cb34371 (patch) | |
tree | fdc8eff8481d202c81690474c0bbac29bf30ba7a /streamingvisitors/src | |
parent | dc1b5d78ca36f10d959cc19469e96c3f719030cf (diff) |
Convert attribute and attribute combiner overrides using different field as source to
copy overrides for streaming search.
Diffstat (limited to 'streamingvisitors/src')
-rw-r--r-- | streamingvisitors/src/vespa/vsm/vsm/docsumconfig.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/streamingvisitors/src/vespa/vsm/vsm/docsumconfig.cpp b/streamingvisitors/src/vespa/vsm/vsm/docsumconfig.cpp index 656e9eed132..ce0706a03fb 100644 --- a/streamingvisitors/src/vespa/vsm/vsm/docsumconfig.cpp +++ b/streamingvisitors/src/vespa/vsm/vsm/docsumconfig.cpp @@ -9,6 +9,7 @@ using search::MatchingElementsFields; using search::docsummary::IDocsumFieldWriter; +using search::docsummary::CopyDFW; using search::docsummary::EmptyDFW; using search::docsummary::MatchedElementsFilterDFW; using search::docsummary::ResultConfig; @@ -55,8 +56,16 @@ DynamicDocsumConfig::createFieldWriter(const string & fieldName, const string & fieldWriter = std::make_unique<EmptyDFW>(); rc = true; } else if ((overrideName == "attribute") || - (overrideName == "attributecombiner") || - (overrideName == "geopos")) { + (overrideName == "attributecombiner")) { + if (!argument.empty() && argument != fieldName) { + auto fw = std::make_unique<CopyDFW>(); + const ResultConfig& resultConfig = getResultConfig(); + if (fw->Init(resultConfig, argument.c_str())) { + fieldWriter = std::move(fw); + } + } + rc = true; + } else if (overrideName == "geopos") { rc = true; } else if ((overrideName == "matchedattributeelementsfilter") || (overrideName == "matchedelementsfilter")) { |