From e2c778f1f53b8f60e6bd0b5260ce672e8bd1a062 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 7 Mar 2023 11:00:25 +0000 Subject: Add unit test for string attribute get_raw --- searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'searchsummary/src') diff --git a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp index 74d67aabe88..e606c6f08bb 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/attributedfw.cpp @@ -97,8 +97,8 @@ SingleAttrDFW::insertField(uint32_t docid, GetDocsumsState& state, Inserter &tar break; } case BasicType::STRING: { - const char *s = v.getString(docid, nullptr, 0); // no need to pass in a buffer, this attribute has a string storage. - target.insertString(vespalib::Memory(s)); + auto s = v.get_raw(docid); + target.insertString(vespalib::Memory(s.data(), s.size())); break; } case BasicType::REFERENCE: -- cgit v1.2.3