mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-04 10:35:46 +01:00
Merge
This commit is contained in:
parent
5d82155060
commit
e6b7031988
@ -277,6 +277,9 @@ pub struct IndexSchedulerOptions {
|
|||||||
/// Structure which holds meilisearch's indexes and schedules the tasks
|
/// Structure which holds meilisearch's indexes and schedules the tasks
|
||||||
/// to be performed on them.
|
/// to be performed on them.
|
||||||
pub struct IndexScheduler {
|
pub struct IndexScheduler {
|
||||||
|
/// A String representing the name of the index
|
||||||
|
pub(crate) name: String,
|
||||||
|
|
||||||
/// The LMDB environment which the DBs are associated with.
|
/// The LMDB environment which the DBs are associated with.
|
||||||
pub(crate) env: Env,
|
pub(crate) env: Env,
|
||||||
|
|
||||||
|
@ -100,8 +100,6 @@ pub mod db_name {
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Index {
|
pub struct Index {
|
||||||
pub name: Option<String>,
|
|
||||||
|
|
||||||
/// The LMDB environment which this index is associated with.
|
/// The LMDB environment which this index is associated with.
|
||||||
pub(crate) env: heed::Env,
|
pub(crate) env: heed::Env,
|
||||||
|
|
||||||
@ -173,7 +171,6 @@ pub struct Index {
|
|||||||
|
|
||||||
impl Index {
|
impl Index {
|
||||||
pub fn new_with_creation_dates<P: AsRef<Path>>(
|
pub fn new_with_creation_dates<P: AsRef<Path>>(
|
||||||
name: Option<String>,
|
|
||||||
mut options: heed::EnvOpenOptions,
|
mut options: heed::EnvOpenOptions,
|
||||||
path: P,
|
path: P,
|
||||||
created_at: OffsetDateTime,
|
created_at: OffsetDateTime,
|
||||||
@ -232,7 +229,6 @@ impl Index {
|
|||||||
Index::set_creation_dates(&env, main, created_at, updated_at)?;
|
Index::set_creation_dates(&env, main, created_at, updated_at)?;
|
||||||
|
|
||||||
Ok(Index {
|
Ok(Index {
|
||||||
name,
|
|
||||||
env,
|
env,
|
||||||
main,
|
main,
|
||||||
external_documents_ids,
|
external_documents_ids,
|
||||||
@ -262,13 +258,9 @@ impl Index {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new<P: AsRef<Path>>(
|
pub fn new<P: AsRef<Path>>(options: heed::EnvOpenOptions, path: P) -> Result<Index> {
|
||||||
name: Option<String>,
|
|
||||||
options: heed::EnvOpenOptions,
|
|
||||||
path: P,
|
|
||||||
) -> Result<Index> {
|
|
||||||
let now = OffsetDateTime::now_utc();
|
let now = OffsetDateTime::now_utc();
|
||||||
Self::new_with_creation_dates(name, options, path, now, now)
|
Self::new_with_creation_dates(options, path, now, now)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_creation_dates(
|
fn set_creation_dates(
|
||||||
|
Loading…
Reference in New Issue
Block a user