Use CaseInsensitiveFuzzySearch for repos with less than 80k files
Created by: olafurpg
Previously, WordSensitiveFuzzySearch
was used by default for all repos.
The benefit of WordSensitiveFuzzySearch
is that it supports low-latency
fuzzy filtering even for large repos with >100k source files. However,
WordSensitiveFuzzySearch
is probably more strict with
capitalization than what most people expect from a fuzzy finder.
This commit adds a new fuzzy finder called CaseInsensitiveFuzzySearch
that is enabled by
default for all repos with less than 80k source files. This fuzzy finder
is more relaxed with capitalization compared to
WordSensitiveFuzzySearch
. However, it has worse performance in very
large repositories (example chromium/chromium) so it's only enabled for
repos with fewer than 80k source files.
Demo: relaxed capitalization. The new case-insensitive search doesn't require you to capitalize the query or insert /
characters to split up file parts.
Demo: refine the search with space characters. The new case-insensitive returns results that score best against all parts of the space-separated query. The word-sensitive filter would have returned 0 results after the first space character.
Big thanks to @mrnugget for suggesting the idea to use space characters to refine the fuzzy search. I really like this behavior!