Insert dump_reader.date() into create_raw_index(_) argument
@@ -289,8 +289,13 @@ fn import_dump(
let mut index_reader = index_reader?;
let metadata = index_reader.metadata();
log::info!("Importing index `{}`.", metadata.uid);
- //let date = Some((time::OffsetDateTime::now_utc(), time::OffsetDateTime::now_utc()));
- let date = dump_reader.date();
+ let 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 mut wtxn = index.write_txn()?;
