Improve results a bit

This commit is contained in:
Guillaume Gomez 2017-12-15 15:42:38 +01:00
parent 6351ebb7e5
commit 97c18f420e

View File

@ -926,8 +926,12 @@
}
lev += lev_add;
if (searchWords[j].startsWith(val)) {
lev -= 1;
if (lev > 0 && val.length > 3 && searchWords[j].startsWith(val)) {
if (val.length < 6) {
lev -= 1;
} else {
lev = 0;
}
}
if (in_args <= MAX_LEV_DISTANCE) {
if (results_in_args[fullId] === undefined) {