summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-06 14:39:44 +0100
committerGitHub <noreply@github.com>2023-03-06 14:39:44 +0100
commit2df0671d3ca160ea164b0c9069ec904538f0f8ec (patch)
treecb06ecca4f8bef7c5e4fe3389538f6f0652d456f
parent5174b4d24b540268d351327d82929cc912161f91 (diff)
parent38ae7636a97d3d2731b711dfc0e43c3e43e686cb (diff)
Merge pull request #26312 from vespa-engine/toregge/add-raw-as-attribute-basic-type
Add raw as attribute vector basic type.
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/cachedselect.cpp2
-rw-r--r--searchlib/src/vespa/searchcommon/attribute/basictype.cpp3
-rw-r--r--searchlib/src/vespa/searchcommon/attribute/basictype.h1
4 files changed, 5 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index 7d9b1b3b06a..e412dabc7c1 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -83,6 +83,7 @@ getValue(const Context &context) const
case BasicType::PREDICATE:
case BasicType::TENSOR:
case BasicType::REFERENCE:
+ case BasicType::RAW:
throw IllegalArgumentException(make_string("Attribute '%s' of type '%s' can not be used for selection",
v.getName().c_str(), BasicType(v.getBasicType()).asString()));
case BasicType::MAX_TYPE:
diff --git a/searchcore/src/vespa/searchcore/proton/common/cachedselect.cpp b/searchcore/src/vespa/searchcore/proton/common/cachedselect.cpp
index c51771df265..2235f16ae94 100644
--- a/searchcore/src/vespa/searchcore/proton/common/cachedselect.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/cachedselect.cpp
@@ -65,7 +65,7 @@ AttrVisitor::AttrVisitor(const search::IAttributeManager &amgr, CachedSelect::At
AttrVisitor::~AttrVisitor() = default;
bool isSingleValueThatWeHandle(BasicType type) {
- return (type != BasicType::PREDICATE) && (type != BasicType::TENSOR) && (type != BasicType::REFERENCE);
+ return (type != BasicType::PREDICATE) && (type != BasicType::TENSOR) && (type != BasicType::REFERENCE) && (type != BasicType::RAW);
}
void
diff --git a/searchlib/src/vespa/searchcommon/attribute/basictype.cpp b/searchlib/src/vespa/searchcommon/attribute/basictype.cpp
index d0d90d1c9d5..41221457400 100644
--- a/searchlib/src/vespa/searchcommon/attribute/basictype.cpp
+++ b/searchlib/src/vespa/searchcommon/attribute/basictype.cpp
@@ -19,7 +19,8 @@ const BasicType::TypeInfo BasicType::_typeTable[BasicType::MAX_TYPE] = {
{ BasicType::DOUBLE, sizeof(double), "double" },
{ BasicType::PREDICATE, 0, "predicate" },
{ BasicType::TENSOR, 0, "tensor" },
- { BasicType::REFERENCE, 12, "reference" }
+ { BasicType::REFERENCE, 12, "reference" },
+ { BasicType::RAW, 0, "raw" }
};
BasicType::Type
diff --git a/searchlib/src/vespa/searchcommon/attribute/basictype.h b/searchlib/src/vespa/searchcommon/attribute/basictype.h
index bd7b4a2b4bc..46387dd2738 100644
--- a/searchlib/src/vespa/searchcommon/attribute/basictype.h
+++ b/searchlib/src/vespa/searchcommon/attribute/basictype.h
@@ -24,6 +24,7 @@ class BasicType
PREDICATE = 11,
TENSOR = 12,
REFERENCE = 13,
+ RAW = 14,
MAX_TYPE
};