In most cases the fuzzy search seems to be working. However in the case of searching for Hawk it is retuning a lot of results, including Hulk and others. I see why it's doing this, because the spelling is quite similar. But that does pose an issue.
One solution to this might be a "nickname" mapping? We could give cards nicknames to map to them, to allow searching for something like Hawk and match that to Snowguard Hawk card (which poses it's own problem as it is just called Snowguard).
Another addition is we could search inside the card description too, since Snowguard does actually include Hawk in the description.
I'm currently uncertain how to resolve this. A few ideas to investigate:
Could have it require an "exact" match if the search string is 4 characters or smaller (currently set to 3)
Could have it match split-text at a higher value. So whole name matches would be weighted higher
Could try other fuzzy match algorithms to see how they perform
Could limit (or even reject) searches that have too many matches, so in a case like above where a single search matches 12 things, we could just reject the search all together (possibly 4 matches at most?)
In most cases the fuzzy search seems to be working. However in the case of searching for
Hawk
it is retuning a lot of results, includingHulk
and others. I see why it's doing this, because the spelling is quite similar. But that does pose an issue.One solution to this might be a "nickname" mapping? We could give cards nicknames to map to them, to allow searching for something like
Hawk
and match that toSnowguard Hawk
card (which poses it's own problem as it is just calledSnowguard
).Another addition is we could search inside the card description too, since
Snowguard
does actually includeHawk
in the description.