Add necessary accessors

This commit is contained in:
Louis Dureuil
2025-10-02 11:12:51 +02:00
parent c29bdcae23
commit 91275adb76
3 changed files with 14 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ impl FileStore {
std::fs::create_dir_all(&path)?;
Ok(FileStore { path })
}
pub fn path(&self) -> &Path {
&self.path
}
}
impl FileStore {

View File

@@ -1,4 +1,4 @@
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::sync::{Arc, RwLock};
use std::time::Duration;
use std::{fs, thread};
@@ -591,4 +591,8 @@ impl IndexMapper {
pub fn set_currently_updating_index(&self, index: Option<(String, Index)>) {
*self.currently_updating_index.write().unwrap() = index;
}
pub fn base_path(&self) -> &Path {
&self.base_path
}
}

View File

@@ -1983,6 +1983,11 @@ impl Index {
Ok(sizes)
}
/// The underlying env for raw access
pub fn raw_env(&self) -> &heed::Env<WithoutTls> {
&self.env
}
}
pub struct EmbeddingsWithMetadata {