summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-09-09 10:50:07 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-09-09 10:50:07 +0200
commit7950c509e3ca6052cea2a3e6f55f953d83bac9fd (patch)
treeadca32809f70864c6a117503ebbeb1ebbfcc5e0d
parent59c7272fa1a2bc6ca5ad6923889f3f139bb9f1c3 (diff)
Ignore summary override if attribute vector is missing.
-rw-r--r--searchcore/src/tests/proton/docsummary/summarymap.cfg5
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/docsummary/summarymap.cfg b/searchcore/src/tests/proton/docsummary/summarymap.cfg
index f2d429b1412..cb03ce76fd1 100644
--- a/searchcore/src/tests/proton/docsummary/summarymap.cfg
+++ b/searchcore/src/tests/proton/docsummary/summarymap.cfg
@@ -1,4 +1,4 @@
-override[16]
+override[17]
override[0].field "aa"
override[0].command "copy"
override[0].arguments "ab"
@@ -46,3 +46,6 @@ override[14].arguments "wp2"
override[15].field "bj"
override[15].command "attribute"
override[15].arguments "bj"
+override[16].field "missing"
+override[16].command "attribute"
+override[16].arguments "missing"
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
index 1a269e556d6..b9d0c27bd16 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumconfig.cpp
@@ -90,7 +90,7 @@ DynamicDocsumConfig::createFieldWriter(const string & fieldName, const string &
} else if (overrideName == "attribute") {
if (getEnvironment() && getEnvironment()->getAttributeManager()) {
fieldWriter = AttributeDFWFactory::create(*getEnvironment()->getAttributeManager(), argument);
- rc = static_cast<bool>(fieldWriter);
+ rc = true; // Allow missing attribute vector
}
} else if (overrideName == "attributecombiner") {
if (getEnvironment() && getEnvironment()->getAttributeManager()) {