Skip to content

Commit 1541964

Browse files
committed
refactor(fuzzy): Decrease fuzziness
1 parent a8726ad commit 1541964

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

frontend/src/lib/utils/fuzzy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export function fuzzyMatch(str1, str2) {
99

1010
const distance = levenshteinDistance(str1.toLowerCase(), str2.toLowerCase());
1111

12-
// Allow for 1 character difference for strings up to 4 characters,
13-
// 2 characters for strings up to 8 characters,
12+
// Allow for 1 character difference for strings up to 5 characters,
13+
// 2 characters for strings up to 10 characters,
1414
// and 3 characters for longer strings
15-
const maxDistance = Math.min(3, Math.ceil(str1.length / 3));
15+
const maxDistance = Math.min(3, Math.ceil(str1.length / 4));
1616

1717
return distance <= maxDistance;
1818
}

0 commit comments

Comments
 (0)