krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
17.89k stars 759 forks source link

Use Bitap to search approximate substring? #241

Closed janga1997 closed 4 years ago

janga1997 commented 6 years ago

I need to use the Bitap's implementation in this module on its own, without relying on Fuse. Or with. However I can. Is there a way to reference Bitaps' functions implemented in this library?

janga1997 commented 6 years ago

ahh. Never Mind. Spoke too soon.

janga1997 commented 6 years ago

Sorry, reopening as my issue wasn't solved. Its my understanding that Bitap is primarily used to approximately search a string in a larger string, forming the basis for agrep.

But Fuse.js' functionality primarily is to find approx. matches in an array of strings.

Could I use the existing module's Fuse/Bitap functions for the approximate substring search problem?

krisk commented 6 years ago

You would have to import the bitap implementation directly

That is:

let bitap = require('fuse.js/bitap')

or something to that effect.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days