summaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-06-11 12:53:23 +0000
committerTor Egge <Tor.Egge@oath.com>2018-06-11 12:53:23 +0000
commited18a8941f589367d57bfb590735a42938f0b724 (patch)
treebe1ef9879e1ba1891c0e3318cbee16f18aadd48e /searchsummary
parent673d1bba562da999ea3c92327a0504e0a9691e35 (diff)
Wire in AttributeCombinerDFW.
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
index 11ba90a8583..b95591546b5 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
@@ -8,6 +8,7 @@
#include "geoposdfw.h"
#include "positionsdfw.h"
#include "juniperdfw.h"
+#include "attribute_combiner_dfw.h"
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/vespalib/util/exceptions.h>
@@ -91,6 +92,11 @@ DynamicDocsumConfig::createFieldWriter(const string & fieldName, const string &
fieldWriter.reset(fw);
rc = fw != NULL;
}
+ } else if (overrideName == "attributecombiner") {
+ if (getEnvironment() && getEnvironment()->getAttributeManager()) {
+ fieldWriter = AttributeCombinerDFW::create(fieldName, *getEnvironment()->getAttributeManager());
+ rc = static_cast<bool>(fieldWriter);
+ }
} else {
throw IllegalArgumentException("unknown override operation '" + overrideName + "' for field '" + fieldName + "'.");
}
@@ -106,10 +112,6 @@ DynamicDocsumConfig::configure(const vespa::config::search::SummarymapConfig &cf
}
for (size_t i = 0; i < cfg.override.size(); ++i) {
const vespa::config::search::SummarymapConfig::Override & o = cfg.override[i];
- if (o.command == "attributecombiner") {
- // TODO: Remove this when support has been added
- continue;
- }
bool rc(false);
IDocsumFieldWriter::UP fieldWriter = createFieldWriter(o.field, o.command, o.arguments, rc);
if (rc && fieldWriter.get() != NULL) {