summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-01-09 10:20:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-01-09 13:05:01 +0000
commit5f321f1d1df8da72187a711f9cdc36481dc25cae (patch)
tree5378915b89a25ead8cea4c7678357ec66916b38d /searchcore
parenta9c77576da201d3da009e8f86800d23070284a41 (diff)
Brief implementation skeleton for bool field type.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/document_field_extractor.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/document_field_extractor.cpp b/searchcore/src/vespa/searchcore/proton/attribute/document_field_extractor.cpp
index 64c3455be84..bbd2221f631 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/document_field_extractor.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/document_field_extractor.cpp
@@ -3,6 +3,7 @@
#include "document_field_extractor.h"
#include <vespa/document/datatype/arraydatatype.h>
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
+#include <vespa/document/fieldvalue/boolfieldvalue.h>
#include <vespa/document/fieldvalue/bytefieldvalue.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/fieldvalue/doublefieldvalue.h>
@@ -17,6 +18,7 @@
#include <vespa/vespalib/util/exceptions.h>
using document::FieldValue;
+using document::BoolFieldValue;
using document::ByteFieldValue;
using document::ShortFieldValue;
using document::IntFieldValue;
@@ -45,6 +47,7 @@ class SetUndefinedValueVisitor : public FieldValueVisitor
{
void visit(document::AnnotationReferenceFieldValue &) override { }
void visit(ArrayFieldValue &) override { }
+ void visit(BoolFieldValue &) override { }
void visit(ByteFieldValue &value) override { value = getUndefined<int8_t>(); }
void visit(Document &) override { }
void visit(DoubleFieldValue &value) override { value = getUndefined<double>(); }
@@ -65,6 +68,7 @@ class SetUndefinedValueVisitor : public FieldValueVisitor
SetUndefinedValueVisitor setUndefinedValueVisitor;
const ArrayDataType arrayTypeByte(*DataType::BYTE);
+const ArrayDataType arrayTypeBool(*DataType::BOOL);
const ArrayDataType arrayTypeShort(*DataType::SHORT);
const ArrayDataType arrayTypeInt(*DataType::INT);
const ArrayDataType arrayTypeLong(*DataType::LONG);
@@ -78,6 +82,8 @@ getArrayType(const DataType &fieldType)
switch (fieldType.getId()) {
case DataType::Type::T_BYTE:
return &arrayTypeByte;
+ case DataType::Type::T_BOOL:
+ return &arrayTypeByte;
case DataType::Type::T_SHORT:
return &arrayTypeShort;
case DataType::Type::T_INT: