aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-03-17 12:00:09 +0100
committerTor Egge <Tor.Egge@online.no>2023-03-17 12:00:09 +0100
commita368bd354c07b1eb3f3531da43b783eadaf64589 (patch)
treefda2eb6de892e28059e56cbe5ce817a964e7e71b
parentf734fd1a7e9213f79782567285b5c3d72c5107ab (diff)
Extend attributes.def with raw data type.
-rw-r--r--configdefinitions/src/vespa/attributes.def2
-rw-r--r--searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/configconverter.cpp1
3 files changed, 4 insertions, 1 deletions
diff --git a/configdefinitions/src/vespa/attributes.def b/configdefinitions/src/vespa/attributes.def
index 31f2bfc281d..2810284b3a3 100644
--- a/configdefinitions/src/vespa/attributes.def
+++ b/configdefinitions/src/vespa/attributes.def
@@ -2,7 +2,7 @@
namespace=vespa.config.search
attribute[].name string
-attribute[].datatype enum { STRING, BOOL, UINT2, UINT4, INT8, INT16, INT32, INT64, FLOAT16, FLOAT, DOUBLE, PREDICATE, TENSOR, REFERENCE, NONE } default=NONE
+attribute[].datatype enum { STRING, BOOL, UINT2, UINT4, INT8, INT16, INT32, INT64, FLOAT16, FLOAT, DOUBLE, PREDICATE, TENSOR, REFERENCE, RAW, NONE } default=NONE
attribute[].collectiontype enum { SINGLE, ARRAY, WEIGHTEDSET } default=SINGLE
attribute[].dictionary.type enum { BTREE, HASH, BTREE_AND_HASH } default = BTREE
attribute[].dictionary.match enum { CASE_SENSITIVE, CASE_INSENSITIVE, CASED, UNCASED } default=UNCASED
diff --git a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
index 1d3995bc494..24213c53cbe 100644
--- a/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
+++ b/searchlib/src/tests/attribute/attributemanager/attributemanager_test.cpp
@@ -199,6 +199,8 @@ TEST("require that config can be converted")
EXPECT_TRUE(assertDataType(AVBT::DOUBLE, CACAD::DOUBLE));
EXPECT_TRUE(assertDataType(AVBT::PREDICATE, CACAD::PREDICATE));
EXPECT_TRUE(assertDataType(AVBT::TENSOR, CACAD::TENSOR));
+ EXPECT_TRUE(assertDataType(AVBT::REFERENCE, CACAD::REFERENCE));
+ EXPECT_TRUE(assertDataType(AVBT::RAW, CACAD::RAW));
EXPECT_TRUE(assertDataType(AVBT::NONE, CACAD::NONE));
EXPECT_TRUE(assertCollectionType(AVCT::SINGLE, CACAC::SINGLE));
diff --git a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
index a2079a88ddf..a799abb34c7 100644
--- a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
@@ -32,6 +32,7 @@ getDataTypeMap()
map[AttributesConfig::Attribute::Datatype::PREDICATE] = BasicType::PREDICATE;
map[AttributesConfig::Attribute::Datatype::TENSOR] = BasicType::TENSOR;
map[AttributesConfig::Attribute::Datatype::REFERENCE] = BasicType::REFERENCE;
+ map[AttributesConfig::Attribute::Datatype::RAW] = BasicType::RAW;
map[AttributesConfig::Attribute::Datatype::NONE] = BasicType::NONE;
return map;
}