mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
fix update files created in the wrong place
This commit is contained in:
parent
e285404c3e
commit
3cd799a744
4 changed files with 11 additions and 6 deletions
|
@ -196,10 +196,10 @@ pub struct IndexActorHandle {
|
|||
}
|
||||
|
||||
impl IndexActorHandle {
|
||||
pub fn new() -> Self {
|
||||
pub fn new(path: impl AsRef<Path>) -> Self {
|
||||
let (sender, receiver) = mpsc::channel(100);
|
||||
|
||||
let store = MapIndexStore::new("data.ms");
|
||||
let store = MapIndexStore::new(path);
|
||||
let actor = IndexActor::new(receiver, store);
|
||||
tokio::task::spawn(actor.run());
|
||||
Self { sender }
|
||||
|
|
|
@ -33,7 +33,7 @@ enum IndexControllerMsg {
|
|||
impl IndexController {
|
||||
pub fn new(path: impl AsRef<Path>) -> Self {
|
||||
let uuid_resolver = uuid_resolver::UuidResolverHandle::new();
|
||||
let index_actor = index_actor::IndexActorHandle::new();
|
||||
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 }
|
||||
}
|
||||
|
|
|
@ -112,9 +112,12 @@ where D: AsRef<[u8]> + Sized + 'static,
|
|||
let (sender, receiver) = mpsc::channel(100);
|
||||
let mut options = heed::EnvOpenOptions::new();
|
||||
options.map_size(4096 * 100_000);
|
||||
let mut path = PathBuf::new();
|
||||
path.push("data.ms");
|
||||
path.push("updates");
|
||||
|
||||
let path = path
|
||||
.as_ref()
|
||||
.to_owned()
|
||||
.join("updates");
|
||||
|
||||
create_dir_all(&path).unwrap();
|
||||
let index_handle_clone = index_handle.clone();
|
||||
let store = UpdateStore::open(options, &path, move |meta, file| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue