awesomplete icon indicating copy to clipboard operation
awesomplete copied to clipboard

Feature: FuzzySearch

Open marcobiedermann opened this issue 7 years ago • 6 comments

It would be great if there would be an option to support fuzzy matching. Maybe this library by @bevacqua will help: https://github.com/bevacqua/fuzzysearch

marcobiedermann avatar Jul 06 '16 10:07 marcobiedermann

@marcobiedermann you can implement this in awesomplete's current form using the filter option

Secretmapper avatar Nov 09 '16 16:11 Secretmapper

I think the question was about providing support out of the box, which we shouldn't probably do despite https://github.com/bevacqua/fuzzysearch being excellent.

As @Secretmapper mentioned we can use filter. Sadly the arguments order in filter and fuzzysearch is reversed, so:

filter: function (text, input) {
    return fuzzysearch(input, text);
}

vlazar avatar Nov 10 '16 07:11 vlazar

Would it be possible to post a demo link with the filter code and fuzzysearch?

akcode47 avatar Apr 06 '18 23:04 akcode47

What is the case against providing it out of the box? Just a matter of avoiding a dependency?

hoclun-rigsep avatar Apr 09 '23 14:04 hoclun-rigsep

Also, what does fuzzysearch do that isn't already being done in awesomplete?

hoclun-rigsep avatar Apr 09 '23 14:04 hoclun-rigsep

At this point the last commit in fuzzysearch was in 2016, so even if this becomes baked in, perhaps another library would be more suitable? Though I do think it's better suited as a(n official) plugin.

LeaVerou avatar Apr 10 '23 11:04 LeaVerou