pub struct TombstoneFilter { /* private fields */ }Expand description
Filter for vector search results that excludes deleted IDs
Implementations§
Source§impl TombstoneFilter
impl TombstoneFilter
Sourcepub fn new(manager: Arc<TombstoneManager>) -> Self
pub fn new(manager: Arc<TombstoneManager>) -> Self
Create a new tombstone filter
Sourcepub fn with_overfetch(self, factor: f32) -> Self
pub fn with_overfetch(self, factor: f32) -> Self
Set the over-fetch factor
Sourcepub fn effective_k(&self, k: usize) -> usize
pub fn effective_k(&self, k: usize) -> usize
Calculate how many candidates to fetch given the target K
Sourcepub fn filter<T>(
&self,
results: Vec<(InternalId, T)>,
limit: usize,
) -> Vec<(InternalId, T)>
pub fn filter<T>( &self, results: Vec<(InternalId, T)>, limit: usize, ) -> Vec<(InternalId, T)>
Filter search results, removing deleted IDs
Sourcepub fn filter_with_continuation<T>(
&self,
results: Vec<(InternalId, T)>,
limit: usize,
) -> (Vec<(InternalId, T)>, bool)
pub fn filter_with_continuation<T>( &self, results: Vec<(InternalId, T)>, limit: usize, ) -> (Vec<(InternalId, T)>, bool)
Filter and check if we need more candidates
Auto Trait Implementations§
impl !RefUnwindSafe for TombstoneFilter
impl !UnwindSafe for TombstoneFilter
impl Freeze for TombstoneFilter
impl Send for TombstoneFilter
impl Sync for TombstoneFilter
impl Unpin for TombstoneFilter
impl UnsafeUnpin for TombstoneFilter
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> 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