summaryrefslogtreecommitdiffstats
path: root/searchcommon
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-04-03 12:28:39 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-04-03 12:28:39 +0000
commite3df3f7eef112f0dc991d670029d4b900750c48e (patch)
treea2a08e931b17ffce5e1faddf479baa8a8c14ed11 /searchcommon
parentcaede4c2bc8596eebd0cfb58ba24c23aa86edc28 (diff)
Add REFERENCE to schema data types.
Diffstat (limited to 'searchcommon')
-rw-r--r--searchcommon/src/vespa/searchcommon/common/datatype.cpp4
-rw-r--r--searchcommon/src/vespa/searchcommon/common/datatype.h3
-rw-r--r--searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp2
3 files changed, 7 insertions, 2 deletions
diff --git a/searchcommon/src/vespa/searchcommon/common/datatype.cpp b/searchcommon/src/vespa/searchcommon/common/datatype.cpp
index f5aa9e50f3a..b28fc06b3fd 100644
--- a/searchcommon/src/vespa/searchcommon/common/datatype.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/datatype.cpp
@@ -26,6 +26,7 @@ dataTypeFromName(const vespalib::stringref &name) {
else if (name == "RAW") { return RAW; }
else if (name == "BOOLEANTREE") { return BOOLEANTREE; }
else if (name == "TENSOR") { return TENSOR; }
+ else if (name == "REFERENCE") { return REFERENCE; }
else {
throw InvalidConfigException("Illegal enum value '" + name + "'");
}
@@ -44,7 +45,8 @@ const char *datatype_str[] = { "UINT1",
"RAW",
"FEATURE_NOTUSED",
"BOOLEANTREE",
- "TENSOR" };
+ "TENSOR",
+ "REFERENCE"};
vespalib::string
getTypeName(DataType type) {
diff --git a/searchcommon/src/vespa/searchcommon/common/datatype.h b/searchcommon/src/vespa/searchcommon/common/datatype.h
index de442e139db..f73274d58c0 100644
--- a/searchcommon/src/vespa/searchcommon/common/datatype.h
+++ b/searchcommon/src/vespa/searchcommon/common/datatype.h
@@ -24,7 +24,8 @@ enum DataType { UINT1 = 0,
RAW = 10,
//FEATURE = 11,
BOOLEANTREE = 12,
- TENSOR = 13
+ TENSOR = 13,
+ REFERENCE = 14
};
/**
diff --git a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
index 647a23a8db8..195483855cd 100644
--- a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
@@ -71,6 +71,8 @@ SchemaBuilder::convert(const AttributesConfig::Attribute::Datatype &type)
return schema::BOOLEANTREE;
case AttributesConfig::Attribute::TENSOR:
return schema::TENSOR;
+ case AttributesConfig::Attribute::REFERENCE:
+ return schema::REFERENCE;
default:
break;
}