pub struct FullTextConfig {
pub k1: f32,
pub b: f32,
pub min_token_length: usize,
pub max_token_length: usize,
pub lowercase: bool,
pub stop_words: HashSet<String>,
pub stem_language: StemLanguage,
}Expand description
Configuration for full-text search
Fields§
§k1: f32BM25 parameter k1 (term frequency saturation)
b: f32BM25 parameter b (document length normalization)
min_token_length: usizeMinimum token length to index
max_token_length: usizeMaximum token length to index
lowercase: boolWhether to apply lowercase normalization
stop_words: HashSet<String>Stop words to filter out
stem_language: StemLanguageLanguage for stemming (None = no stemming)
Implementations§
Source§impl FullTextConfig
impl FullTextConfig
Sourcepub fn with_english_stemming() -> Self
pub fn with_english_stemming() -> Self
Create config with English stemming enabled
Sourcepub fn with_language(language: StemLanguage) -> Self
pub fn with_language(language: StemLanguage) -> Self
Create config with specified language stemming
Trait Implementations§
Source§impl Clone for FullTextConfig
impl Clone for FullTextConfig
Source§fn clone(&self) -> FullTextConfig
fn clone(&self) -> FullTextConfig
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 FullTextConfig
impl Debug for FullTextConfig
Source§impl Default for FullTextConfig
impl Default for FullTextConfig
Source§impl<'de> Deserialize<'de> for FullTextConfig
impl<'de> Deserialize<'de> for FullTextConfig
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 FullTextConfig
impl RefUnwindSafe for FullTextConfig
impl Send for FullTextConfig
impl Sync for FullTextConfig
impl Unpin for FullTextConfig
impl UnsafeUnpin for FullTextConfig
impl UnwindSafe for FullTextConfig
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> 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