forked from asklyphe-public/asklyphe
whoops
This commit is contained in:
parent
623b068cef
commit
26f5196138
1 changed files with 1 additions and 0 deletions
|
@ -94,6 +94,7 @@ pub fn check(query: &String) -> Option<SpellCheckResults> {
|
|||
|
||||
if closest_match.1 <= MAX_DISTANCE {
|
||||
cache.insert(qword.to_owned(), Some(*closest_match.0));
|
||||
distances.push(SpellCheckResult{orig: qword.to_owned(), correction: *closest_match.0});
|
||||
} else {
|
||||
// even though there is no close enough match, cache it anyway so that it doesn't have to be looked up every time
|
||||
cache.insert(qword.to_owned(), None);
|
||||
|
|
Loading…
Add table
Reference in a new issue