mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
load snapshot
This commit is contained in:
parent
46293546f3
commit
eb53ed4cc1
3 changed files with 41 additions and 8 deletions
|
@ -20,10 +20,11 @@ use tokio::time::sleep;
|
|||
use crate::index::{Document, SearchQuery, SearchResult};
|
||||
use crate::index::{Facets, Settings, UpdateResult};
|
||||
use crate::option::Opt;
|
||||
use crate::helpers::compression;
|
||||
|
||||
use index_actor::IndexActorHandle;
|
||||
use update_actor::UpdateActorHandle;
|
||||
use uuid_resolver::UuidResolverHandle;
|
||||
use snapshot::load_snapshot;
|
||||
|
||||
use snapshot::SnapshotService;
|
||||
pub use updates::{Failed, Processed, Processing};
|
||||
|
@ -71,7 +72,12 @@ impl IndexController {
|
|||
let update_store_size = options.max_udb_size.get_bytes() as usize;
|
||||
|
||||
if let Some(ref path) = options.import_snapshot {
|
||||
compression::from_tar_gz(path, &options.db_path)?;
|
||||
load_snapshot(
|
||||
&options.db_path,
|
||||
path,
|
||||
options.ignore_snapshot_if_db_exists,
|
||||
options.ignore_missing_snapshot,
|
||||
)?;
|
||||
}
|
||||
|
||||
let uuid_resolver = uuid_resolver::UuidResolverHandleImpl::new(&path)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue