mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Insert dump_reader.date() into create_raw_index(_) argument
This commit is contained in:
parent
0893b175dc
commit
df176aaf01
@ -289,8 +289,13 @@ fn import_dump(
|
|||||||
let mut index_reader = index_reader?;
|
let mut index_reader = index_reader?;
|
||||||
let metadata = index_reader.metadata();
|
let metadata = index_reader.metadata();
|
||||||
log::info!("Importing index `{}`.", metadata.uid);
|
log::info!("Importing index `{}`.", metadata.uid);
|
||||||
//let date = Some((time::OffsetDateTime::now_utc(), time::OffsetDateTime::now_utc()));
|
let date;
|
||||||
let date = dump_reader.date();
|
if let Some(dump_reader_date) = dump_reader.date() {
|
||||||
|
date = Some((dump_reader_date, dump_reader_date));
|
||||||
|
} else {
|
||||||
|
date = Some((time::OffsetDateTime::now_utc(), time::OffsetDateTime::now_utc()));
|
||||||
|
}
|
||||||
|
|
||||||
let index = index_scheduler.create_raw_index(&metadata.uid, date)?;
|
let index = index_scheduler.create_raw_index(&metadata.uid, date)?;
|
||||||
|
|
||||||
let mut wtxn = index.write_txn()?;
|
let mut wtxn = index.write_txn()?;
|
||||||
|
Loading…
Reference in New Issue
Block a user