Make the changes necessary to use milli 0.31.1

This commit is contained in:
Kerollmops 2022-06-22 17:24:25 +02:00
parent 7feb15df28
commit dad86fc3d6
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
11 changed files with 51 additions and 61 deletions

View file

@ -7,6 +7,7 @@ use anyhow::bail;
use fs_extra::dir::{self, CopyOptions};
use log::{info, trace};
use meilisearch_auth::open_auth_store_env;
use milli::heed::CompactionOption;
use tokio::sync::RwLock;
use tokio::time::sleep;
use walkdir::WalkDir;
@ -181,9 +182,7 @@ impl SnapshotJob {
let mut options = milli::heed::EnvOpenOptions::new();
options.map_size(self.index_size);
let index = milli::Index::new(options, entry.path())?;
index
.env
.copy_to_path(dst, milli::heed::CompactionOption::Enabled)?;
index.copy_to_path(dst, CompactionOption::Enabled)?;
}
Ok(())