diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index 7514a2a68..9989a4060 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -277,6 +277,9 @@ pub struct IndexSchedulerOptions { /// Structure which holds meilisearch's indexes and schedules the tasks /// to be performed on them. pub struct IndexScheduler { + /// A String representing the name of the index + pub(crate) name: String, + /// The LMDB environment which the DBs are associated with. pub(crate) env: Env, diff --git a/milli/src/index.rs b/milli/src/index.rs index 12206ff5a..6df7ea748 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -100,8 +100,6 @@ pub mod db_name { #[derive(Clone)] pub struct Index { - pub name: Option, - /// The LMDB environment which this index is associated with. pub(crate) env: heed::Env, @@ -173,7 +171,6 @@ pub struct Index { impl Index { pub fn new_with_creation_dates>( - name: Option, mut options: heed::EnvOpenOptions, path: P, created_at: OffsetDateTime, @@ -232,7 +229,6 @@ impl Index { Index::set_creation_dates(&env, main, created_at, updated_at)?; Ok(Index { - name, env, main, external_documents_ids, @@ -262,13 +258,9 @@ impl Index { }) } - pub fn new>( - name: Option, - options: heed::EnvOpenOptions, - path: P, - ) -> Result { + pub fn new>(options: heed::EnvOpenOptions, path: P) -> Result { 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(