diff options
-rw-r--r-- | searchlib/src/vespa/searchlib/docstore/documentstore.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/docstore/documentstore.cpp b/searchlib/src/vespa/searchlib/docstore/documentstore.cpp index 42920a093eb..6345e414b99 100644 --- a/searchlib/src/vespa/searchlib/docstore/documentstore.cpp +++ b/searchlib/src/vespa/searchlib/docstore/documentstore.cpp @@ -88,6 +88,8 @@ public: * value along with compression config. */ void set(vespalib::DataBuffer &&buf, ssize_t len, const CompressionConfig &compression); + // Keep buffer uncompressed + void set(vespalib::DataBuffer &&buf, ssize_t len); /** * Decompress value into temporary buffer and deserialize document from @@ -125,6 +127,12 @@ private: CompressionConfig _compression; }; + +void +Value::set(vespalib::DataBuffer &&buf, ssize_t len) { + set(std::move(buf), len, CompressionConfig()); +} + void Value::set(vespalib::DataBuffer &&buf, ssize_t len, const CompressionConfig &compression) { //Underlying buffer must be identical to allow swap. @@ -436,7 +444,7 @@ DocumentStore::WrapVisitor<Visitor>::visit(uint32_t lid, buf.writeBytes(buffer, sz); ssize_t len = sz; if (len > 0) { - value.set(std::move(buf), len, _compression); + value.set(std::move(buf), len); } if (! value.empty()) { document::Document::UP doc(value.deserializeDocument(_repo)); |