pub struct SearchParameters {
pub batch_size: usize,
pub n_full_scores: usize,
pub top_k: usize,
pub n_ivf_probe: usize,
pub centroid_batch_size: usize,
pub centroid_score_threshold: Option<f32>,
}Expand description
Search parameters
Fields§
§batch_size: usizeNumber of queries per batch
n_full_scores: usizeNumber of documents to re-rank with exact scores
top_k: usizeNumber of final results to return per query
n_ivf_probe: usizeNumber of IVF cells to probe during search
centroid_batch_size: usizeBatch size for centroid scoring during IVF probing (0 = exhaustive). Lower values use less memory but are slower. Default 100_000. Only used when num_centroids > centroid_batch_size.
centroid_score_threshold: Option<f32>Centroid score threshold (t_cs) for centroid pruning. A centroid is only included if its maximum score across all query tokens meets or exceeds this threshold. Set to None to disable pruning. Default: Some(0.4)
Trait Implementations§
Source§impl Clone for SearchParameters
impl Clone for SearchParameters
Source§fn clone(&self) -> SearchParameters
fn clone(&self) -> SearchParameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchParameters
impl Debug for SearchParameters
Source§impl Default for SearchParameters
impl Default for SearchParameters
Source§impl<'de> Deserialize<'de> for SearchParameters
impl<'de> Deserialize<'de> for SearchParameters
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchParameters
impl RefUnwindSafe for SearchParameters
impl Send for SearchParameters
impl Sync for SearchParameters
impl Unpin for SearchParameters
impl UnwindSafe for SearchParameters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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