results aren't 100% accurate, this is a small step to improving. if someone who's familiar with fuzzy matching wants to tweak the algorithm for even better results, then a contribution will be welcome, but i spent a little time trying to tweak with mixed results.
What changed
if the crate is built with debug mode enabled, include the fuzzy score in the json output
if there's an exact result, return i64::MAX as the fuzzy score
Test plan
run against some index, see the exact match being the top result (in my case, this was zsh)
Why
results aren't 100% accurate, this is a small step to improving. if someone who's familiar with fuzzy matching wants to tweak the algorithm for even better results, then a contribution will be welcome, but i spent a little time trying to tweak with mixed results.
What changed
i64::MAX
as the fuzzy scoreTest plan
run against some index, see the exact match being the top result (in my case, this was
zsh
)