summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-09-27 15:48:36 +0000
committerTor Egge <Tor.Egge@oath.com>2017-09-27 15:48:36 +0000
commit32436eb845f89647f0c3b93338e81b484b9c86c0 (patch)
tree14880b5f32ccb0a66232742cde4c2f0f1b5ce24a /searchlib
parent3c0a6eeb15b12c8f925fca131849cffa4a386cb1 (diff)
Limit data types allowed for attribute match feature.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/features/attributematchfeature.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/features/attributematchfeature.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp
index 2ff53951d8b..27c7b77ec26 100644
--- a/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.cpp
@@ -6,6 +6,7 @@
#include <vespa/searchlib/fef/featurenamebuilder.h>
#include <vespa/searchlib/fef/fieldinfo.h>
#include <vespa/searchlib/fef/properties.h>
+#include <vespa/searchlib/fef/parameterdescriptions.h>
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/log/log.h>
@@ -271,7 +272,8 @@ AttributeMatchBlueprint::visitDumpFeatures(const IIndexEnvironment &env,
{
for (uint32_t i = 0; i < env.getNumFields(); ++i) {
const FieldInfo * field = env.getField(i);
- if (field->type() == FieldType::ATTRIBUTE) {
+ if (field->type() == FieldType::ATTRIBUTE &&
+ ParameterDataTypeSet::normalTypeSet().allowedType(field->get_data_type())) {
FeatureNameBuilder fnb;
fnb.baseName(getBaseName()).parameter(field->name());
visitor.visitDumpFeature(fnb.buildName());
diff --git a/searchlib/src/vespa/searchlib/features/attributematchfeature.h b/searchlib/src/vespa/searchlib/features/attributematchfeature.h
index 707572abf9e..3cdc6e322a3 100644
--- a/searchlib/src/vespa/searchlib/features/attributematchfeature.h
+++ b/searchlib/src/vespa/searchlib/features/attributematchfeature.h
@@ -98,7 +98,7 @@ public:
void visitDumpFeatures(const fef::IIndexEnvironment & env, fef::IDumpFeatureVisitor & visitor) const override;
fef::Blueprint::UP createInstance() const override;
fef::ParameterDescriptions getDescriptions() const override {
- return fef::ParameterDescriptions().desc().attributeField(fef::ParameterCollection::ANY);
+ return fef::ParameterDescriptions().desc().attributeField(fef::ParameterDataTypeSet::normalTypeSet(), fef::ParameterCollection::ANY);
}
bool setup(const fef::IIndexEnvironment & env, const fef::ParameterList & params) override;