pub struct PrecomputedBm25Params<'a> {
pub doc_tf: &'a AHashMap<u8, usize>,
pub doc_len: usize,
pub avgdl: f64,
pub idfs: &'a AHashMap<String, f64>,
pub query_token_map: &'a QueryTokenMap,
pub k1: f64,
pub b: f64,
}Expand description
Parameters for BM25 calculation with precomputed IDF values
Fields§
§doc_tf: &'a AHashMap<u8, usize>Document term frequencies using u8 indices
doc_len: usizeDocument length
avgdl: f64Average document length
idfs: &'a AHashMap<String, f64>Precomputed IDF values for query terms (remains String-based)
query_token_map: &'a QueryTokenMapMap from query term string to u8 index
k1: f64BM25 k1 parameter
b: f64BM25 b parameter
Auto Trait Implementations§
impl<'a> Freeze for PrecomputedBm25Params<'a>
impl<'a> RefUnwindSafe for PrecomputedBm25Params<'a>
impl<'a> Send for PrecomputedBm25Params<'a>
impl<'a> Sync for PrecomputedBm25Params<'a>
impl<'a> Unpin for PrecomputedBm25Params<'a>
impl<'a> UnwindSafe for PrecomputedBm25Params<'a>
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> 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