Compress much more the documents database

This commit is contained in:
Kerollmops 2020-08-17 21:08:01 +02:00 committed by Clément Renault
parent 962bad3cea
commit e55a569629
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -494,7 +494,7 @@ fn main() -> anyhow::Result<()> {
}, || { }, || {
// We also merge the documents into its own MTBL store. // We also merge the documents into its own MTBL store.
let file = OpenOptions::new().create(true).truncate(true).write(true).read(true).open(documents_path)?; let file = OpenOptions::new().create(true).truncate(true).write(true).read(true).open(documents_path)?;
let mut writer = Writer::builder().compression_type(CompressionType::Snappy).build(file); let mut writer = Writer::builder().compression_type(CompressionType::Zlib).compression_level(9).build(file);
let mut builder = Merger::builder(docs_merge); let mut builder = Merger::builder(docs_merge);
builder.extend(docs_stores); builder.extend(docs_stores);
builder.build().write_into(&mut writer)?; builder.build().write_into(&mut writer)?;