diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-17 20:26:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-17 20:26:58 +0000 |
commit | 2974fb58ddc245e94f325eb6b1407c16bd6887bc (patch) | |
tree | 6c80d1d1e35151c7b460d0ecd157c91b9af09836 /streamingvisitors | |
parent | f5d308f5cb8bd1f5a4d7daaac18ed1aaa8e8778e (diff) |
Implement className on document::FieldValue
Diffstat (limited to 'streamingvisitors')
-rw-r--r-- | streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp index 80cf0ebc73d..1e091d9a6d8 100644 --- a/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp +++ b/streamingvisitors/src/vespa/searchvisitor/searchvisitor.cpp @@ -16,7 +16,6 @@ #include <vespa/vespalib/objects/nbostream.h> #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/size_literals.h> -#include <vespa/vespalib/util/classname.h> #include <vespa/fnet/databuffer.h> #include "matching_elements_filler.h" @@ -73,7 +72,7 @@ createMultiValueAttribute(const vespalib::string & name, const document::FieldVa ndt = &cdt->getNestedType(); } LOG(debug, "Create %s attribute '%s' with data type '%s' (%s)", - arrayType ? "array" : "weighted set", name.c_str(), ndt->getName().c_str(), vespalib::getClassName(fv).c_str()); + arrayType ? "array" : "weighted set", name.c_str(), ndt->getName().c_str(), fv.className()); if (ndt->getId() == DataType::T_BYTE || ndt->getId() == DataType::T_INT || ndt->getId() == DataType::T_LONG) @@ -90,7 +89,7 @@ createMultiValueAttribute(const vespalib::string & name, const document::FieldVa : std::make_shared<search::WeightedSetStringExtAttribute>(name); } else { LOG(debug, "Can not make an multivalue attribute out of %s with data type '%s' (%s)", - name.c_str(), ndt->getName().c_str(), vespalib::getClassName(fv).c_str()); + name.c_str(), ndt->getName().c_str(), fv.className()); } return AttributeVector::SP(); } @@ -98,7 +97,7 @@ createMultiValueAttribute(const vespalib::string & name, const document::FieldVa AttributeVector::SP createAttribute(const vespalib::string & name, const document::FieldValue & fv) { - LOG(debug, "Create single value attribute '%s' with value type '%s'", name.c_str(), vespalib::getClassName(fv).c_str()); + LOG(debug, "Create single value attribute '%s' with value type '%s'", name.c_str(), fv.className()); if (fv.isA(document::FieldValue::Type::BYTE) || fv.isA(document::FieldValue::Type::INT) || fv.isA(document::FieldValue::Type::LONG)) { return std::make_shared<search::SingleIntegerExtAttribute>(name); } else if (fv.isA(document::FieldValue::Type::DOUBLE) || fv.isA(document::FieldValue::Type::FLOAT)) { @@ -106,7 +105,7 @@ createAttribute(const vespalib::string & name, const document::FieldValue & fv) } else if (fv.isA(document::FieldValue::Type::STRING)) { return std::make_shared<search::SingleStringExtAttribute>(name); } else { - LOG(debug, "Can not make an attribute out of %s of type '%s'.", name.c_str(), vespalib::getClassName(fv).c_str()); + LOG(debug, "Can not make an attribute out of %s of type '%s'.", name.c_str(), fv.className()); } return AttributeVector::SP(); } @@ -762,14 +761,14 @@ void SearchVisitor::setupAttributeVector(const FieldPath &fieldPath) { if (attr) { LOG(debug, "Adding attribute '%s' for field '%s' with data type '%s' (%s)", - attr->getName().c_str(), attrName.c_str(), fv.getDataType()->getName().c_str(), vespalib::getClassName(fv).c_str()); + attr->getName().c_str(), attrName.c_str(), fv.getDataType()->getName().c_str(), fv.className()); if ( ! _attrMan.add(attr) ) { LOG(warning, "Failed adding attribute '%s' for field '%s' with data type '%s' (%s)", - attr->getName().c_str(), attrName.c_str(), fv.getDataType()->getName().c_str(), vespalib::getClassName(fv).c_str()); + attr->getName().c_str(), attrName.c_str(), fv.getDataType()->getName().c_str(), fv.className()); } } else { LOG(debug, "Cannot setup attribute for field '%s' with data type '%s' (%s). Aggregation and sorting will not work for this field", - attrName.c_str(), fv.getDataType()->getName().c_str(), vespalib::getClassName(fv).c_str()); + attrName.c_str(), fv.getDataType()->getName().c_str(), fv.className()); } } |