mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Enable create_raw_index(...) to specify time
This commit is contained in:
parent
660be071b5
commit
d3eb8d2d5c
3 changed files with 31 additions and 8 deletions
|
@ -867,7 +867,9 @@ impl IndexScheduler {
|
|||
/// Create a new index without any associated task.
|
||||
pub fn create_raw_index(&self, name: &str) -> Result<Index> {
|
||||
let wtxn = self.env.write_txn()?;
|
||||
let index = self.index_mapper.create_index(wtxn, name)?;
|
||||
let created_at = Some(time::OffsetDateTime::now_utc());
|
||||
let updated_at = Some(time::OffsetDateTime::now_utc());
|
||||
let index = self.index_mapper.create_index(wtxn, name, created_at, updated_at)?;
|
||||
|
||||
Ok(index)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue