summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/basictype.cpp4
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/basictype.h3
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/iattributevector.h2
-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
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/document_field_retriever.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp2
-rw-r--r--searchlib/src/tests/attribute/attribute_test.cpp12
-rw-r--r--searchlib/src/tests/attribute/searchcontext/searchcontext.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributefile.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/configconverter.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createarraystd.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsetstd.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/fef/parameterdescriptions.h2
-rw-r--r--searchlib/src/vespa/searchlib/index/doctypebuilder.cpp10
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp2
22 files changed, 35 insertions, 38 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/basictype.cpp b/searchcommon/src/vespa/searchcommon/attribute/basictype.cpp
index 67093c686b5..b3137181ce1 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/basictype.cpp
+++ b/searchcommon/src/vespa/searchcommon/attribute/basictype.cpp
@@ -8,7 +8,7 @@ namespace search::attribute {
const BasicType::TypeInfo BasicType::_typeTable[BasicType::MAX_TYPE] = {
{ BasicType::NONE, 0, "none" },
{ BasicType::STRING, 0, "string" },
- { BasicType::UINT1, sizeof(int8_t), "uint1" },
+ { BasicType::BOOL, sizeof(int8_t), "bool" },
{ BasicType::UINT2, sizeof(int8_t), "uint2" },
{ BasicType::UINT4, sizeof(int8_t), "uint4" },
{ BasicType::INT8, sizeof(int8_t), "int8" },
@@ -18,7 +18,7 @@ const BasicType::TypeInfo BasicType::_typeTable[BasicType::MAX_TYPE] = {
{ BasicType::FLOAT, sizeof(float), "float" },
{ BasicType::DOUBLE, sizeof(double), "double" },
{ BasicType::PREDICATE, 0, "predicate" },
- { BasicType::TENSOR, 0, "tensor" },
+ { BasicType::TENSOR, 0, "tensor" },
{ BasicType::REFERENCE, 12, "reference" }
};
diff --git a/searchcommon/src/vespa/searchcommon/attribute/basictype.h b/searchcommon/src/vespa/searchcommon/attribute/basictype.h
index 5bc51cdbea8..9be26b0816b 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/basictype.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/basictype.h
@@ -12,7 +12,7 @@ class BasicType
enum Type {
NONE = 0,
STRING = 1,
- UINT1 = 2,
+ BOOL = 2,
UINT2 = 3,
UINT4 = 4,
INT8 = 5,
@@ -36,6 +36,7 @@ class BasicType
const char * asString() const { return asString(_type); }
bool isUnsigned() const { return isUnsigned(_type); }
size_t fixedSize() const { return fixedSize(_type); }
+ static BasicType fromType(bool) { return BOOL; }
static BasicType fromType(int8_t) { return INT8; }
static BasicType fromType(int16_t) { return INT16; }
static BasicType fromType(int32_t) { return INT32; }
diff --git a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
index 0d3e58331c6..7ac2e701717 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/iattributevector.h
@@ -322,7 +322,7 @@ public:
**/
virtual bool isIntegerType() const {
BasicType::Type t = getBasicType();
- return t == BasicType::UINT1 ||
+ return t == BasicType::BOOL ||
t == BasicType::UINT2 ||
t == BasicType::UINT4 ||
t == BasicType::INT8 ||
diff --git a/searchcommon/src/vespa/searchcommon/common/datatype.cpp b/searchcommon/src/vespa/searchcommon/common/datatype.cpp
index f3b2099294e..be4ed5c3715 100644
--- a/searchcommon/src/vespa/searchcommon/common/datatype.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/datatype.cpp
@@ -11,7 +11,7 @@ using config::InvalidConfigException;
DataType
dataTypeFromName(vespalib::stringref name) {
- if (name == "UINT1") { return DataType::UINT1; }
+ if (name == "BOOL") { return DataType::BOOL; }
else if (name == "UINT2") { return DataType::UINT2; }
else if (name == "UINT4") { return DataType::UINT4; }
else if (name == "INT8") { return DataType::INT8; }
@@ -30,7 +30,7 @@ dataTypeFromName(vespalib::stringref name) {
}
}
-const char *datatype_str[] = { "UINT1",
+const char *datatype_str[] = { "BOOL",
"UINT2",
"UINT4",
"INT8",
diff --git a/searchcommon/src/vespa/searchcommon/common/datatype.h b/searchcommon/src/vespa/searchcommon/common/datatype.h
index f21b6b9d5e9..35f885aee53 100644
--- a/searchcommon/src/vespa/searchcommon/common/datatype.h
+++ b/searchcommon/src/vespa/searchcommon/common/datatype.h
@@ -9,7 +9,8 @@ namespace search::index::schema {
/**
* Basic data type for a field.
**/
-enum class DataType { UINT1 = 0,
+enum class DataType {
+ BOOL = 0,
UINT2 = 1,
UINT4 = 2,
INT8 = 3,
diff --git a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
index e7f103f0ebb..401003cb74b 100644
--- a/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
+++ b/searchcommon/src/vespa/searchcommon/common/schemaconfigurer.cpp
@@ -61,7 +61,7 @@ convertDataType(const ConfigType &type)
case ConfigType::STRING:
return DataType::STRING;
case ConfigType::BOOL:
- return DataType::UINT1;
+ return DataType::BOOL;
case ConfigType::UINT2:
return DataType::UINT2;
case ConfigType::UINT4:
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/document_field_retriever.cpp b/searchcore/src/vespa/searchcore/proton/attribute/document_field_retriever.cpp
index d05fc98f152..3ce54b790c1 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/document_field_retriever.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/document_field_retriever.cpp
@@ -110,15 +110,14 @@ DocumentFieldRetriever::populate(DocumentIdT lid,
bool isIndexField)
{
switch (attr.getBasicType()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
case BasicType::INT8:
case BasicType::INT16:
case BasicType::INT32:
case BasicType::INT64:
- setValue<IAttributeVector::largeint_t>(
- lid, doc, fieldName, attr);
+ setValue<IAttributeVector::largeint_t>(lid, doc, fieldName, attr);
break;
case BasicType::FLOAT:
case BasicType::DOUBLE:
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index b76451b377d..21789364442 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -58,7 +58,7 @@ getValue(const Context &context) const
return Value::UP(new StringValue(content[0]));
} while (0);
break;
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
case BasicType::INT8:
diff --git a/searchlib/src/tests/attribute/attribute_test.cpp b/searchlib/src/tests/attribute/attribute_test.cpp
index d4f716acb7a..8637a230bf5 100644
--- a/searchlib/src/tests/attribute/attribute_test.cpp
+++ b/searchlib/src/tests/attribute/attribute_test.cpp
@@ -45,7 +45,7 @@ bool
isUnsignedSmallIntAttribute(const BasicType::Type &type)
{
switch (type) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
return true;
@@ -531,9 +531,9 @@ void AttributeTest::testReload()
testReloadInt(iv1, iv2, iv3, 100);
}
{
- AttributePtr iv1 = createAttribute("suint1_1", Config(BasicType::UINT1, CollectionType::SINGLE));
- AttributePtr iv2 = createAttribute("suint1_2", Config(BasicType::UINT1, CollectionType::SINGLE));
- AttributePtr iv3 = createAttribute("suint1_3", Config(BasicType::UINT1, CollectionType::SINGLE));
+ AttributePtr iv1 = createAttribute("suint1_1", Config(BasicType::BOOL, CollectionType::SINGLE));
+ AttributePtr iv2 = createAttribute("suint1_2", Config(BasicType::BOOL, CollectionType::SINGLE));
+ AttributePtr iv3 = createAttribute("suint1_3", Config(BasicType::BOOL, CollectionType::SINGLE));
testReloadInt(iv1, iv2, iv3, 0);
testReloadInt(iv1, iv2, iv3, 100);
}
@@ -2038,7 +2038,7 @@ void
AttributeTest::testCompactLidSpace(const Config &config)
{
switch (config.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
case BasicType::INT8:
@@ -2074,7 +2074,7 @@ AttributeTest::testCompactLidSpace(const Config &config)
void
AttributeTest::testCompactLidSpace()
{
- TEST_DO(testCompactLidSpace(Config(BasicType::UINT1, CollectionType::SINGLE)));
+ TEST_DO(testCompactLidSpace(Config(BasicType::BOOL, CollectionType::SINGLE)));
TEST_DO(testCompactLidSpace(Config(BasicType::UINT2, CollectionType::SINGLE)));
TEST_DO(testCompactLidSpace(Config(BasicType::UINT4, CollectionType::SINGLE)));
TEST_DO(testCompactLidSpace(Config(BasicType::INT8, CollectionType::SINGLE)));
diff --git a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
index 29849139fc5..d0dc7044fb5 100644
--- a/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
+++ b/searchlib/src/tests/attribute/searchcontext/searchcontext.cpp
@@ -31,7 +31,7 @@ isUnsignedSmallIntAttribute(const AttributeVector &a)
{
switch (a.getBasicType())
{
- case attribute::BasicType::UINT1:
+ case attribute::BasicType::BOOL:
case attribute::BasicType::UINT2:
case attribute::BasicType::UINT4:
return true;
diff --git a/searchlib/src/vespa/searchlib/attribute/attributefile.cpp b/searchlib/src/vespa/searchlib/attribute/attributefile.cpp
index cf3ed0957b3..8e65942f60c 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributefile.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributefile.cpp
@@ -319,7 +319,7 @@ AttributeFile::getRecord()
{
std::unique_ptr<Record> record;
switch (_config.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
case BasicType::INT8:
diff --git a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
index 963d7bf5ae9..ae08204f5bc 100644
--- a/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/configconverter.cpp
@@ -20,7 +20,7 @@ getDataTypeMap()
{
DataTypeMap map;
map[AttributesConfig::Attribute::STRING] = BasicType::STRING;
- map[AttributesConfig::Attribute::BOOL] = BasicType::UINT1;
+ map[AttributesConfig::Attribute::BOOL] = BasicType::BOOL;
map[AttributesConfig::Attribute::UINT2] = BasicType::UINT2;
map[AttributesConfig::Attribute::UINT4] = BasicType::UINT4;
map[AttributesConfig::Attribute::INT8] = BasicType::INT8;
diff --git a/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
index 17e6c91daba..0f74cfc7612 100644
--- a/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createarrayfastsearch.cpp
@@ -34,7 +34,7 @@ AttributeFactory::createArrayFastSearch(stringref name, const Config & info)
assert(info.fastSearch());
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
index ac82e4ba27a..f6b37658645 100644
--- a/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createarraystd.cpp
@@ -27,7 +27,7 @@ AttributeFactory::createArrayStd(stringref name, const Config & info)
assert(info.collectionType().type() == attribute::CollectionType::ARRAY);
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
index 323d073589f..d8bc65bce78 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsetfastsearch.cpp
@@ -35,7 +35,7 @@ AttributeFactory::createSetFastSearch(stringref name, const Config & info)
assert(info.fastSearch());
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
index 74e478c67b8..2c8636cb756 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsetstd.cpp
@@ -26,7 +26,7 @@ AttributeFactory::createSetStd(stringref name, const Config & info)
assert(info.collectionType().type() == attribute::CollectionType::WSET);
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
index f3dd642828e..cdb7e1807ba 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsinglefastsearch.cpp
@@ -29,7 +29,7 @@ AttributeFactory::createSingleFastSearch(stringref name, const Config & info)
assert(info.fastSearch());
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
break;
diff --git a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
index cc3d9fe4b37..8ea41a9dab0 100644
--- a/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/createsinglestd.cpp
@@ -23,7 +23,7 @@ AttributeFactory::createSingleStd(stringref name, const Config & info)
assert(info.collectionType().type() == attribute::CollectionType::SINGLE);
AttributeVector::SP ret;
switch(info.basicType().type()) {
- case BasicType::UINT1:
+ case BasicType::BOOL:
ret.reset(new SingleValueBitNumericAttribute(name, info.getGrowStrategy()));
break;
case BasicType::UINT2:
diff --git a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
index 5100e2e5546..2d6e1e57806 100644
--- a/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/singlesmallnumericattribute.cpp
@@ -284,7 +284,7 @@ createConfig(BasicType bt, CollectionType ct, const GrowStrategy & grow) {
SingleValueBitNumericAttribute::
SingleValueBitNumericAttribute(const vespalib::string &baseFileName, const GrowStrategy & grow)
: SingleValueSmallNumericAttribute(baseFileName,
- createConfig(BasicType::UINT1, CollectionType::SINGLE, grow),
+ createConfig(BasicType::BOOL, CollectionType::SINGLE, grow),
0x01u /* valueMask */,
0x00u /* valueShiftShift */,
8 * sizeof(Word) - 1 /* valueShiftMask */,
@@ -308,7 +308,7 @@ SingleValueSemiNibbleNumericAttribute(const vespalib::string &baseFileName, cons
SingleValueNibbleNumericAttribute::
SingleValueNibbleNumericAttribute(const vespalib::string &baseFileName, const search::GrowStrategy & grow)
: SingleValueSmallNumericAttribute(baseFileName,
- createConfig(BasicType::UINT1, CollectionType::SINGLE, grow),
+ createConfig(BasicType::BOOL, CollectionType::SINGLE, grow),
0x0fu /* valueMask */,
0x02u /* valueShiftShift */,
2 * sizeof(Word) - 1 /* valueShiftMask */,
diff --git a/searchlib/src/vespa/searchlib/fef/parameterdescriptions.h b/searchlib/src/vespa/searchlib/fef/parameterdescriptions.h
index 4c5d2c785cb..c91d85c1a83 100644
--- a/searchlib/src/vespa/searchlib/fef/parameterdescriptions.h
+++ b/searchlib/src/vespa/searchlib/fef/parameterdescriptions.h
@@ -53,7 +53,7 @@ private:
return (1u << static_cast<unsigned int>(dataType));
}
static uint32_t normalTypesMask() {
- return (asMask(DataType::UINT1) |
+ return (asMask(DataType::BOOL) |
asMask(DataType::UINT2) |
asMask(DataType::UINT4) |
asMask(DataType::INT8) |
diff --git a/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp b/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
index 71b83cc005c..836d16825f5 100644
--- a/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
+++ b/searchlib/src/vespa/searchlib/index/doctypebuilder.cpp
@@ -5,15 +5,13 @@
#include <vespa/document/repo/configbuilder.h>
using namespace document;
-using namespace search::index;
-namespace search {
-namespace index {
+namespace search::index {
namespace {
const DataType *convert(Schema::DataType type) {
switch (type) {
- case schema::DataType::UINT1:
+ case schema::DataType::BOOL:
case schema::DataType::UINT2:
case schema::DataType::UINT4:
case schema::DataType::INT8:
@@ -340,6 +338,4 @@ DocTypeBuilder::makeConfig(const DocumentType &docType)
return cfg;
}
-
-} // namespace search::index
-} // namespace search
+}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
index fccfe0e73c8..ee2e9d9fa92 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp
@@ -181,7 +181,7 @@ MultiAttrDFW::insertField(uint32_t docid,
}
}
return; }
- case BasicType::UINT1:
+ case BasicType::BOOL:
case BasicType::UINT2:
case BasicType::UINT4:
case BasicType::INT8: