pub struct RerankerConfig {
pub field: Field,
pub vector: Vec<f32>,
pub binary_vector: Vec<u8>,
pub combiner: MultiValueCombiner,
pub unit_norm: bool,
pub matryoshka_dims: Option<usize>,
pub rrf_k: f32,
}Expand description
Configuration for L2 dense/binary vector reranking
Fields§
§field: FieldVector field (dense or binary dense)
vector: Vec<f32>Query vector (f32, for dense fields)
binary_vector: Vec<u8>Query vector (packed bits, for binary dense fields). When non-empty, Hamming distance scoring is used instead of cosine.
combiner: MultiValueCombinerHow to combine scores for multi-valued documents
unit_norm: boolWhether stored vectors are pre-normalized to unit L2 norm. When true, scoring uses dot-product only (skips per-vector norm — ~40% faster). Ignored for binary fields.
matryoshka_dims: Option<usize>Matryoshka pre-filter: number of leading dimensions to use for cheap approximate scoring before full-dimension exact reranking. Ignored for binary fields.
rrf_k: f32Reciprocal Rank Fusion k parameter. When > 0, fuses L1 (first-stage) and
L2 (reranker) rankings: score(d) = 1/(k + rank_L1) + 1/(k + rank_L2).
Typical value: 60. When 0, RRF is disabled and only L2 scores are used.
Trait Implementations§
Source§impl Clone for RerankerConfig
impl Clone for RerankerConfig
Source§fn clone(&self) -> RerankerConfig
fn clone(&self) -> RerankerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RerankerConfig
impl RefUnwindSafe for RerankerConfig
impl Send for RerankerConfig
impl Sync for RerankerConfig
impl Unpin for RerankerConfig
impl UnsafeUnpin for RerankerConfig
impl UnwindSafe for RerankerConfig
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
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,
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<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.