semtree_store/lib.rs
1//! **Vector-store abstraction for semtree.**
2//!
3//! One trait - [`VectorStore`] - with swappable backends behind feature flags:
4//!
5//! | Backend | Feature | Type |
6//! |---------|---------|------|
7//! | usearch (local HNSW, default) | `usearch-backend` | [`usearch::UsearchStore`] |
8//! | Qdrant | `qdrant-backend` | `qdrant::QdrantStore` |
9//!
10//! [`search`](VectorStore::search) returns ranked [`Hit`]s (id + score); the
11//! caller resolves ids back to chunks via the registry in `semtree-rag`.
12//! Implement [`VectorStore`] to target any other index or database.
13
14mod error;
15mod store;
16
17#[cfg(feature = "usearch-backend")]
18pub mod usearch;
19
20#[cfg(feature = "qdrant-backend")]
21pub mod qdrant;
22
23pub use error::StoreError;
24pub use store::{Hit, VectorStore};