pub struct BM25Config {
pub k1: f32,
pub b: f32,
pub min_idf: f32,
}Expand description
BM25 scoring parameters
Fields§
§k1: f32Term frequency saturation parameter (k1) Higher values give more weight to term frequency Typical range: 1.2 - 2.0
b: f32Length normalization parameter (b) 0.0 = no length normalization 1.0 = full length normalization Typical value: 0.75
min_idf: f32Minimum IDF to filter out very common terms
Implementations§
Source§impl BM25Config
impl BM25Config
Sourcepub fn elasticsearch() -> Self
pub fn elasticsearch() -> Self
Elasticsearch-style parameters
Sourcepub fn short_queries() -> Self
pub fn short_queries() -> Self
Parameters optimized for short queries
Trait Implementations§
Source§impl Clone for BM25Config
impl Clone for BM25Config
Source§fn clone(&self) -> BM25Config
fn clone(&self) -> BM25Config
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BM25Config
Source§impl Debug for BM25Config
impl Debug for BM25Config
Auto Trait Implementations§
impl Freeze for BM25Config
impl RefUnwindSafe for BM25Config
impl Send for BM25Config
impl Sync for BM25Config
impl Unpin for BM25Config
impl UnsafeUnpin for BM25Config
impl UnwindSafe for BM25Config
Blanket Implementations§
impl<T> Allocation for T
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> 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>
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