summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2019-06-05 06:30:16 +0000
committerHenning Baldersheim <balder@oath.com>2019-06-05 06:30:16 +0000
commitaf7ac97c71e6c026f76a3b1d5e4f44af218571d5 (patch)
treea1f8508a1d4461fb3195854dd36ad05c39d39fe8 /searchlib
parentda9db258815a32cd689fb372a56dc9df07e21742 (diff)
Do not depend on prepareSharedState to be called first.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/features/attributefeature.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/searchlib/src/vespa/searchlib/features/attributefeature.cpp b/searchlib/src/vespa/searchlib/features/attributefeature.cpp
index e1926c74975..baebf6a8877 100644
--- a/searchlib/src/vespa/searchlib/features/attributefeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/attributefeature.cpp
@@ -423,12 +423,13 @@ AttributeBlueprint::prepareSharedState(const fef::IQueryEnvironment & env, fef::
}
fef::FeatureExecutor &
-AttributeBlueprint::createExecutor(const fef::IQueryEnvironment &, vespalib::Stash &stash) const
+AttributeBlueprint::createExecutor(const fef::IQueryEnvironment & env, vespalib::Stash &stash) const
{
+ const IAttributeVector * attribute = (_attribute != nullptr) ? _attribute : env.getAttributeContext().getAttribute(_attrName);
if (_tensorType.is_tensor()) {
- return createTensorAttributeExecutor(_attribute, _attrName, _tensorType, stash);
+ return createTensorAttributeExecutor(attribute, _attrName, _tensorType, stash);
} else {
- return createAttributeExecutor(_attribute, _attrName, _extra, stash);
+ return createAttributeExecutor(attribute, _attrName, _extra, stash);
}
}