pub struct TokenizerPolicy {
pub fold_latin_diacritics: bool,
pub fold_russian_yo: bool,
}Expand description
Controls search-specific folding without changing the scanner or its allocation behavior.
The default preserves the tokenizer’s existing index contract: Latin
diacritics are folded for recall and Russian ё is treated as е. Use
TokenizerPolicy::unicode when callers need Unicode lowercase and
normalization without either language/search-specific equivalence.
Fields§
§fold_latin_diacritics: boolFold Latin precomposed diacritics to their ASCII base.
fold_russian_yo: boolTreat Russian small letter ё as е after lowercase.
Implementations§
Source§impl TokenizerPolicy
impl TokenizerPolicy
Sourcepub const fn unicode() -> Self
pub const fn unicode() -> Self
A language-neutral policy: Unicode lowercase and normalization only.
Sourcepub const fn search() -> Self
pub const fn search() -> Self
The search policy used by crate::tokenizer::Tokenizer::new and
existing indexes.
Trait Implementations§
Source§impl Clone for TokenizerPolicy
impl Clone for TokenizerPolicy
Source§fn clone(&self) -> TokenizerPolicy
fn clone(&self) -> TokenizerPolicy
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 TokenizerPolicy
Source§impl Debug for TokenizerPolicy
impl Debug for TokenizerPolicy
Source§impl Default for TokenizerPolicy
impl Default for TokenizerPolicy
impl Eq for TokenizerPolicy
Source§impl PartialEq for TokenizerPolicy
impl PartialEq for TokenizerPolicy
impl StructuralPartialEq for TokenizerPolicy
Auto Trait Implementations§
impl Freeze for TokenizerPolicy
impl RefUnwindSafe for TokenizerPolicy
impl Send for TokenizerPolicy
impl Sync for TokenizerPolicy
impl Unpin for TokenizerPolicy
impl UnsafeUnpin for TokenizerPolicy
impl UnwindSafe for TokenizerPolicy
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