diff options
Diffstat (limited to 'searchlib/src/tests/features/prod_features_attributematch.cpp')
-rw-r--r-- | searchlib/src/tests/features/prod_features_attributematch.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/searchlib/src/tests/features/prod_features_attributematch.cpp b/searchlib/src/tests/features/prod_features_attributematch.cpp index 8dcceec9a22..cab9c66a95b 100644 --- a/searchlib/src/tests/features/prod_features_attributematch.cpp +++ b/searchlib/src/tests/features/prod_features_attributematch.cpp @@ -18,6 +18,7 @@ using AVC = search::attribute::Config; using AVBT = search::attribute::BasicType; using AVCT = search::attribute::CollectionType; using CollectionType = FieldInfo::CollectionType; +using DataType = FieldInfo::DataType; void Test::testAttributeMatch() @@ -303,4 +304,13 @@ Test::testAttributeMatch() addScore("attributeMatch(wint).fieldCompleteness", 0); ASSERT_TRUE(ft.execute(exp)); } + { // tensor attribute is not allowed + FtFeatureTest ft(_factory, "attributeMatch(tensor)"); + ft.getIndexEnv().getBuilder().addField(FieldType::ATTRIBUTE, CollectionType::SINGLE, DataType::TENSOR, "tensor"); + AttributePtr tensorAttr = AttributeFactory::createAttribute("tensor", AVC (AVBT::TENSOR, AVCT::SINGLE)); + tensorAttr->addReservedDoc(); + ft.getIndexEnv().getAttributeMap().add(tensorAttr); + ASSERT_TRUE(ft.getQueryEnv().getBuilder().addAttributeNode("tensor") != nullptr); + ASSERT_TRUE(!ft.setup()); + } } |