pub struct SynapseStore {
pub store: Store,
pub namespace: String,
pub storage_path: PathBuf,
pub id_to_uri: RwLock<HashMap<u32, String>>,
pub uri_to_id: RwLock<HashMap<String, u32>>,
pub next_id: AtomicU32,
pub vector_store: Option<Arc<VectorStore>>,
}Fields§
§store: Store§namespace: String§storage_path: PathBuf§id_to_uri: RwLock<HashMap<u32, String>>§uri_to_id: RwLock<HashMap<String, u32>>§next_id: AtomicU32§vector_store: Option<Arc<VectorStore>>Implementations§
Source§impl SynapseStore
impl SynapseStore
pub fn open(namespace: &str, storage_path: &str) -> Result<Self>
pub fn get_or_create_id(&self, uri: &str) -> u32
pub fn get_uri(&self, id: u32) -> Option<String>
pub async fn ingest_triples( &self, triples: Vec<(String, String, String)>, ) -> Result<(u32, u32)>
Sourcepub async fn hybrid_search(
&self,
query: &str,
vector_k: usize,
graph_depth: u32,
) -> Result<Vec<(String, f32)>>
pub async fn hybrid_search( &self, query: &str, vector_k: usize, graph_depth: u32, ) -> Result<Vec<(String, f32)>>
Hybrid search: vector similarity + graph expansion
pub fn query_sparql(&self, query: &str) -> Result<String>
Auto Trait Implementations§
impl !Freeze for SynapseStore
impl !RefUnwindSafe for SynapseStore
impl Send for SynapseStore
impl Sync for SynapseStore
impl Unpin for SynapseStore
impl !UnwindSafe for SynapseStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request