The current fuzzy matching algorithm is not good for efficiency compared to those in helm. Copied from my IRC messages:
- substring-norm is kinda adhoc, and need to type spaces to get
reasonable result - DL-distance is in principle very good, however there’s a fatal
issue: it is a symmetric metric that also allows deletion operation - Seems that command prompt give similar weight to both command name
and docstring, this basically makes any command with (a few)
occurrence of “buffer” in docstring outscores switch-buffer
and because DL distance allow deletion, not mentioning “switch” at all
doesn’t really hurt their score that much.
I think fuzzy search as typically used in search engines and used
in Emacs is fundamentally different – the former is expected to
correct error (like single character substitution), while the latter
is expected to improve efficiency.
I posted a simple fuzzy match algorithm at simple flex score function for nyxt · GitHub
According to feedback I received currently, it’s better than the current default.
Should we provide it as the new default for Nyxt? We can also purge the mk-string-metrics dependency if we do so.