pub struct BruteForceStore { /* private fields */ }Expand description
Pure‑Rust brute‑force vector store backed by MessagePack on disk.
Enabled by the internal feature (on by default).
Implementations§
Source§impl BruteForceStore
impl BruteForceStore
Sourcepub fn open_or_create(folder: &Path) -> Result<BruteForceStore>
pub fn open_or_create(folder: &Path) -> Result<BruteForceStore>
Open an existing store or create a new one with the default RRF ranker.
Sourcepub fn open_or_create_with_ranker(
folder: &Path,
ranker: Box<dyn Ranker>,
) -> Result<BruteForceStore>
pub fn open_or_create_with_ranker( folder: &Path, ranker: Box<dyn Ranker>, ) -> Result<BruteForceStore>
Open an existing store or create a new one with a custom ranker.
Trait Implementations§
Source§impl Clone for BruteForceStore
impl Clone for BruteForceStore
Source§impl Debug for BruteForceStore
impl Debug for BruteForceStore
Source§impl Drop for BruteForceStore
impl Drop for BruteForceStore
Source§impl VectorStore for BruteForceStore
impl VectorStore for BruteForceStore
Source§fn insert<'life0, 'async_trait>(
&'life0 self,
chunks: Vec<StoredChunk>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
chunks: Vec<StoredChunk>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert chunks along with their pre-computed embedding vectors.
Source§fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_vec: &'life1 [f32],
query_text: &'life2 str,
top_k: usize,
threshold: f64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query_vec: &'life1 [f32],
query_text: &'life2 str,
top_k: usize,
threshold: f64,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScoredChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Hybrid search: delegates to the store’s active ranker if supported,
otherwise uses the backend’s built-in ranking.
Source§fn delete_by_source<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_by_source<'life0, 'life1, 'async_trait>(
&'life0 self,
source: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove all chunks belonging to
source_file.Source§fn sources(&self) -> HashSet<SourceFile>
fn sources(&self) -> HashSet<SourceFile>
All unique source file names currently in the store.
Source§fn set_ranker(&self, ranker: Box<dyn Ranker>) -> Result<()>
fn set_ranker(&self, ranker: Box<dyn Ranker>) -> Result<()>
Replace the active ranking strategy. Read more
Source§fn ranker_name(&self) -> Option<String>
fn ranker_name(&self) -> Option<String>
Return the name of the active ranker, if accessible.
Source§fn validate_embedder(&self, meta: &EmbeddingMetadata) -> Result<()>
fn validate_embedder(&self, meta: &EmbeddingMetadata) -> Result<()>
Source§fn manifest(&self) -> Option<IndexManifest>
fn manifest(&self) -> Option<IndexManifest>
Return the reproducibility manifest for this index, if available. Read more
Source§fn record_manifest(&self, manifest: IndexManifest) -> Result<()>
fn record_manifest(&self, manifest: IndexManifest) -> Result<()>
Record an
IndexManifest for reproducibility. Read moreAuto Trait Implementations§
impl !Freeze for BruteForceStore
impl RefUnwindSafe for BruteForceStore
impl Send for BruteForceStore
impl Sync for BruteForceStore
impl Unpin for BruteForceStore
impl UnsafeUnpin for BruteForceStore
impl UnwindSafe for BruteForceStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more