Skip all derived words when too short

This commit is contained in:
Kerollmops 2020-06-19 18:56:07 +02:00
parent 736f0f7560
commit 63cbeca64e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -87,7 +87,7 @@ impl Index {
let number_of_words = words.len();
let dfas = words.into_iter().enumerate().map(|(i, word)| {
let (word, quoted) = match word {
QueryToken::Free(word) => (word.cow_to_lowercase(), false),
QueryToken::Free(word) => (word.cow_to_lowercase(), word.len() <= 3),
QueryToken::Quoted(word) => (Cow::Borrowed(word), true),
};
let is_last = i + 1 == number_of_words;