atom / fuzzaldrin

Fuzzy filtering and string scoring
MIT License
319 stars 28 forks source link

Can I disable sorting? #31

Closed nwpappas closed 7 years ago

nwpappas commented 7 years ago

Is it possible to disable the sorting of results?

I have a use for fuzzaldrin in which the sorting is not beneficial, but the matching is. Currently I run a set of sorted candidates through the filter and then have to resort them -- not horrible, but still an extra step that would be nice not to do.

I do use both filtering and sorting in other cases. I'd like to use the same fuzzysearch library across all filtering instances.

jeancroy commented 7 years ago

Just looked at source code and both seems tied together.

This project basically does what you want, it's a small snippet but also from a well established maintainer. https://github.com/bevacqua/fuzzysearch

nwpappas commented 7 years ago

Thanks @jeancroy.