mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
clean index actor unwraps
This commit is contained in:
parent
2f93cce7aa
commit
06403a5708
4 changed files with 113 additions and 97 deletions
|
@ -69,11 +69,11 @@ enum IndexControllerMsg {
|
|||
}
|
||||
|
||||
impl IndexController {
|
||||
pub fn new(path: impl AsRef<Path>) -> Self {
|
||||
pub fn new(path: impl AsRef<Path>) -> anyhow::Result<Self> {
|
||||
let uuid_resolver = uuid_resolver::UuidResolverHandle::new();
|
||||
let index_actor = index_actor::IndexActorHandle::new(&path);
|
||||
let index_actor = index_actor::IndexActorHandle::new(&path)?;
|
||||
let update_handle = update_actor::UpdateActorHandle::new(index_actor.clone(), &path);
|
||||
Self { uuid_resolver, index_handle: index_actor, update_handle }
|
||||
Ok(Self { uuid_resolver, index_handle: index_actor, update_handle })
|
||||
}
|
||||
|
||||
pub async fn add_documents(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue