Open djMax opened 8 years ago
I notice there's at least one place the library uses window.performance, which fails in node.
There would not be much complication to replace that call to performance, or choose depending of node.js VS browser.
Any reason it doesn't support node and/or isn't published?
None, I extracted this from another web based project then continued development, could add npm package.
for autocompletion amongst other things
Have you checked out fuzzaldrin-plus ? It's published to npm and is used for auto-completion in the atom text editor.
This one module is more geared for finding stuff across multiple fields / complex object, and with natural language query. The other do sublime text like fuzzy searching.
@jeancroy First of all - congratulations on a fantastic library, I'm surprised it hasn't received more attention! I took a look at your bit vector LCS implementation and read some of the referenced papers and I'm really impressed.
I thought I would try and pick up this issue.
window.performance
: it looks like this has already been addressed in the code (https://github.com/jeancroy/FuzzySearch/blob/d76d2ef4b3037e22ae1a7317147c73a03cc66f26/src/search.js#L15)package.json
is already good to go? The only thing I picked up is that perhaps the grunt
packages should be moved from dependencies
to devDependencies
. Also the name FuzzySearch
is already quite overused in npm (https://www.npmjs.com/search?q=FuzzySearch) - not sure how you feel about a different name?Yeah this library need some love. For example one demo is broken I beleive. I'll try to find the time to fix and publish this weekend. You are right that, as a name, "FuzzySearch" is almost non descriptive, this library is a bit lost in a sea of basic levenshtein distance based libraries.
As for window.performance it can be completely removed. It's only used to try to compute an adaptative debounce time, because choosing a constant that work on every machine is hard. We don't really need the extra resolution of that counter.
For the name, do you have anything to suggest ?
FastComplete, FastSuggest, CleverMatch, LightingSearch
Or something a bit more abstract:
Frenetic (I dunno - just sounds good) Completic (Portmanteau with Complete)
This is hard!
+1, I'll send beer money. This library looks awesome. I'm digging into the performance right now. I started to use buzzaldrin-plus (thanks for that, too!), but my data is document titles, not file paths, and I want to support out-of-order queries, so this looks more promising if I can get it working.
Once I get the basics working I'll check back in, I might be down to help out if it can handle 1mm documents as well as fuzzaldrin-plus does with maxInners
tuned properly.
I notice there's at least one place the library uses window.performance, which fails in node. It's also not published to npm... But it sure looks like a very nice module for autocompletion amongst other things. Any reason it doesn't support node and/or isn't published?