pub struct WarpSearchConfig {
pub k: usize,
pub nprobe: u32,
pub bound: usize,
pub t_prime: Option<usize>,
pub centroid_score_threshold: f32,
}Expand description
Configuration for WARP search.
These parameters control the trade-off between search speed and recall quality. The defaults are tuned for high recall (>95%).
Fields§
§k: usizeNumber of results to return.
nprobe: u32Centroids to probe per query token.
Higher values increase recall but also latency. Default: 4 (provides ~95% recall on most datasets).
bound: usizeMaximum total centroids examined across all tokens.
Acts as an upper bound on computation. Default: 128.
t_prime: Option<usize>Early termination: skip tokens after this many.
For very long queries, processing all tokens may be wasteful. Setting this limits which tokens contribute to scoring.
centroid_score_threshold: f32Skip tokens with centroid score below threshold.
Tokens that don’t match any centroid well are unlikely to contribute meaningful scores. Default: 0.4.
Implementations§
Source§impl WarpSearchConfig
impl WarpSearchConfig
Sourcepub fn centroid_score_threshold(self, threshold: f32) -> Self
pub fn centroid_score_threshold(self, threshold: f32) -> Self
Set centroid score threshold.
Trait Implementations§
Source§impl Clone for WarpSearchConfig
impl Clone for WarpSearchConfig
Source§fn clone(&self) -> WarpSearchConfig
fn clone(&self) -> WarpSearchConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WarpSearchConfig
impl Debug for WarpSearchConfig
Source§impl Default for WarpSearchConfig
impl Default for WarpSearchConfig
Source§impl<'de> Deserialize<'de> for WarpSearchConfig
impl<'de> Deserialize<'de> for WarpSearchConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for WarpSearchConfig
impl RefUnwindSafe for WarpSearchConfig
impl Send for WarpSearchConfig
impl Sync for WarpSearchConfig
impl Unpin for WarpSearchConfig
impl UnsafeUnpin for WarpSearchConfig
impl UnwindSafe for WarpSearchConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().