Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node.js support? #2

Open
djMax opened this issue Jun 6, 2016 · 5 comments
Open

Node.js support? #2

djMax opened this issue Jun 6, 2016 · 5 comments

Comments

@djMax
Copy link

djMax commented Jun 6, 2016

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?

@jeancroy
Copy link
Owner

jeancroy commented Jun 7, 2016

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.

@ammojamo
Copy link

@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.

  1. Use of window.performance: it looks like this has already been addressed in the code (
    var clock = (window.performance && window.performance.now) ? window.performance : Date;
    )
  2. Publishing to npm: I don't have any experience with this but it looks like 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?

@jeancroy
Copy link
Owner

jeancroy commented Sep 21, 2016

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 ?

@ammojamo
Copy link

FastComplete, FastSuggest, CleverMatch, LightingSearch

Or something a bit more abstract:

Frenetic (I dunno - just sounds good)
Completic (Portmanteau with Complete)

This is hard!

@aguynamedben
Copy link
Contributor

+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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants