summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-02-13 12:31:58 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-02-13 12:34:18 +0100
commite6935ceb834b912a0b63b4e7fb9e1c5bceadaab0 (patch)
tree6bb285c89a183e5aefa0fa911d3de6eba213fb5a /searchlib
parentb9869d95dd4d80e23f15d610756924aaa12ea28b (diff)
Prepare for tracking tensor type in document module (C++), aligning
with java implementation.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/index/doctypebuilder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp b/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
index 836d16825f5..aabb2f3c296 100644
--- a/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
+++ b/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
@@ -2,6 +2,7 @@
#include "doctypebuilder.h"
#include <vespa/document/datatype/urldatatype.h>
+#include <vespa/document/datatype/tensor_data_type.h>
#include <vespa/document/repo/configbuilder.h>
using namespace document;
@@ -9,6 +10,8 @@ using namespace document;
namespace search::index {
namespace {
+TensorDataType tensorDataType;
+
const DataType *convert(Schema::DataType type) {
switch (type) {
case schema::DataType::BOOL:
@@ -33,7 +36,7 @@ const DataType *convert(Schema::DataType type) {
case schema::DataType::BOOLEANTREE:
return DataType::PREDICATE;
case schema::DataType::TENSOR:
- return DataType::TENSOR;
+ return &tensorDataType;
default:
break;
}