6 ms·
> Matches should be sorted alphabetically This should only be done in lieu of information about frequencies. If I type "repub" into Google, "republic of korea"
by dlkf 8y ago
> Matches should be sorted alphabetically
This should only be done in lieu of information about frequencies. If I type "repub" into Google, "republic of korea" appears before "republic of ireland" because it's more popular with users in my demographic (and we know that they are not simply doing reverse alphabetization because "republic of gamers" appears after both).
Sorting should happen in this order:
- whether it's a prefix
- empirical frequency
- the number of tokens in suggestion
- alphabetization
With that said, achieving all of this at the same time is pretty difficult - especially within the prescribed sub-100ms response time.
> If there are no subsequence/substring matches, it can optionally fall back to approximate matches. This is rarely necessary to provide.
I completely disagree with this. Fuzzy matching is extremely powerful. People routinely get things wrong, particularly on mobile devices, and you don't want the suggestions to disappear the second I make a mistake.