summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2023-03-17 13:35:38 +0100
committerGitHub <noreply@github.com>2023-03-17 13:35:38 +0100
commit0ee0a814b61bb356a8ee526189bcdb57cda003f2 (patch)
treebb4278fe9880f8eaddda168f3dc0aaf56c3533bf
parent9eb4065004fffbf9e47860cc3bbc43bcd60cc5b1 (diff)
parenta368bd354c07b1eb3f3531da43b783eadaf64589 (diff)
Merge pull request #26476 from vespa-engine/toregge/extend-attributes-def-with-raw-data-type
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;
}