summaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2018-11-26 11:26:06 +0100
committerTor Egge <Tor.Egge@broadpark.no>2018-11-26 11:30:50 +0100
commit166133665465ccb257b0a6a67dc1f33828fcbeec (patch)
tree01bb0334e9568b0009d681ce2e17d432e6f5b601 /searchsummary
parent04cc3c48130b8397c04335948e5971914b2eaf22 (diff)
Handle imported attributes in AttributeCombinerDFW.
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp
index e72caf9405b..015eb70c74a 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/attribute_combiner_dfw.cpp
@@ -44,18 +44,18 @@ StructFields::StructFields(const vespalib::string &fieldName, const IAttributeMa
_hasMapKey(false),
_error(false)
{
- // Note: Doesn't handle imported attributes
- std::vector<AttributeGuard> attrs;
- attrMgr.getAttributeList(attrs);
+ std::vector<const search::attribute::IAttributeVector *> attrs;
+ auto attrCtx = attrMgr.createContext();
+ attrCtx->getAttributeList(attrs);
vespalib::string prefix = fieldName + ".";
vespalib::string keyName = prefix + "key";
vespalib::string valuePrefix = prefix + "value.";
- for (const auto &guard : attrs) {
- vespalib::string name = guard->getName();
+ for (const auto attr : attrs) {
+ vespalib::string name = attr->getName();
if (name.substr(0, prefix.size()) != prefix) {
continue;
}
- auto collType = guard->getCollectionType();
+ auto collType = attr->getCollectionType();
if (collType != CollectionType::Type::ARRAY) {
LOG(warning, "Attribute %s is not an array attribute", name.c_str());
_error = true;