pub struct RerankExecutor { /* private fields */ }Expand description
Executes SSD-based reranking with IO coalescing
Implementations§
Source§impl RerankExecutor
impl RerankExecutor
Sourcepub fn new<D, R>(
config: RerankConfig,
distance_fn: D,
reader: R,
dim: usize,
) -> Self
pub fn new<D, R>( config: RerankConfig, distance_fn: D, reader: R, dim: usize, ) -> Self
Create new executor with custom storage reader
Sourcepub fn rerank(
&self,
candidates: &[RerankCandidate],
query: &[f32],
k: usize,
) -> (Vec<RerankResult>, RerankStats)
pub fn rerank( &self, candidates: &[RerankCandidate], query: &[f32], k: usize, ) -> (Vec<RerankResult>, RerankStats)
Rerank candidates against query
Sourcepub fn rerank_with_tracker(
&self,
candidates: &[RerankCandidate],
query: &[f32],
k: usize,
cost_tracker: Option<&CostTracker>,
) -> (Vec<RerankResult>, RerankStats)
pub fn rerank_with_tracker( &self, candidates: &[RerankCandidate], query: &[f32], k: usize, cost_tracker: Option<&CostTracker>, ) -> (Vec<RerankResult>, RerankStats)
Rerank with cost tracking
Sourcepub fn config(&self) -> &RerankConfig
pub fn config(&self) -> &RerankConfig
Get configuration
Sourcepub fn cache_stats(&self) -> Option<usize>
pub fn cache_stats(&self) -> Option<usize>
Get cache statistics
Auto Trait Implementations§
impl !Freeze for RerankExecutor
impl !RefUnwindSafe for RerankExecutor
impl !UnwindSafe for RerankExecutor
impl Send for RerankExecutor
impl Sync for RerankExecutor
impl Unpin for RerankExecutor
impl UnsafeUnpin for RerankExecutor
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