Expand description
Vector storage layer for RAGFS.
This crate provides storage backends for RAGFS, implementing the
VectorStore trait.
§Cargo Features
lancedb(default): Enables theLanceDBbackend for production use- Without
lancedb: OnlyMemoryStoreis available (for testing/development)
§Backends
| Backend | Description |
|---|---|
LanceStore | Production backend using LanceDB (requires lancedb feature) |
MemoryStore | In-memory backend for testing (always available) |
§LanceDB Features
When the lancedb feature is enabled:
- Vector Search: Fast approximate nearest neighbor search using HNSW
- Hybrid Search: Combined FTS and vector search for better relevance
- Full CRUD: Create, read, update, delete operations for chunks and files
- Automatic Indexing: Creates vector and FTS indices automatically
§Example
ⓘ
use ragfs_store::LanceStore;
use ragfs_core::VectorStore;
// Create and initialize store
let store = LanceStore::new("path/to/db.lance".into(), 384);
store.init().await?;
// Store chunks
store.upsert_chunks(&chunks).await?;
// Search
let results = store.search(query).await?;Re-exports§
pub use lancedb::LanceStore;pub use memory::MemoryStore;