Fuzzy search is really really good.
While implementing mocha search I noticed the results returned by scoop search were in alphabetical order, which doesn’t make a lot of sense. If I do scoop search git the first result should probably be git
As a result my implementation of search uses github.com/sahilm/fuzzy which is a small library which provides a fuzzy search implementation.
Scoop also checks for binary name matches, e.g. package biodiff can provide a binary called git-biodiff and show up in search results. I decided to remove this for now, since I personally find it a bit unnecessary.
scoop search also lists all search results, which is okay when results are sorted alphabetically but doesn’t make sense when searches are relevance based.
Therefore, by default mocha search will list exact matches plus the 20 most relevant search results. This can be overridden by the --count argument, where setting it to 0 displays all results.
A demonstration of mocha search vs scoop search can be seen in the video below.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.