pub struct Lossless { /* private fields */ }
Expand description
Index which keeps track of all occurrences of all words.
Much (10x) faster than Simple
, but memory usage grows linearly with content added.
Simple
s memory usage grows only with word count & document count.
If you have relatively short documents, this doesn’t take up a lot more memory (only about 2-4x).
Implementations§
source§impl Lossless
impl Lossless
sourcepub fn new(
proximity_threshold: f32,
proximity_algorithm: Algorithm,
word_count_limit: usize,
) -> Self
pub fn new( proximity_threshold: f32, proximity_algorithm: Algorithm, word_count_limit: usize, ) -> Self
proximity_threshold
is the threshold where alike words are also accepted.
It uses the range [0..1], where values nearer 0 allow more words.
The default is 0.9
.
proximity_threshold
is the algorithm used for proximity checking of words.
word_count_limit
is the number of words in this index where only words with the first
character is used for approximate matching.
Default is 2_500
.