krisk / Fuse

Lightweight fuzzy-search, in JavaScript

Home Page:https://fusejs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change defaults to `ignoreLocation: true` and `ignoreFieldNorm: true`

ViktorQvarfordt opened this issue · comments

Is there an existing issue or pull request for this?

  • I have searched the existing issues and pull requests

Feature description

The default is ignoreLocation: false and ignoreFieldNorm: false, this causes basic searches to give very strange results.

Desired solution

Set the default options to ignoreLocation: true and ignoreFieldNorm: true.

Alternatives considered

Make it very clear early in the docs or in the demo that one might want to use these options. I was so close to giving up on this library until I found these options. I just plainly want to fuzzy-search for matches in my strings. I don't expect any location or string length to affect the search by default.

Additional context

No response

ignoreFieldNorm: true

nice, this is one i missed in my comparison [1] that definitely improves Fuse's fuzzy results [2].
(added this change in leeoniya/uFuzzy@ec1c44b)

[1] https://github.com/leeoniya/uFuzzy?tab=readme-ov-file#a-biased-appraisal-of-similar-work
[2] https://leeoniya.github.io/uFuzzy/demos/compare.html?libs=uFuzzy,fuzzysort,QuickScore,Fuse&search=super%20ma

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