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

Allow keys weight. #8

Open
SkyzohKey opened this issue Jan 3, 2018 · 3 comments
Open

Allow keys weight. #8

SkyzohKey opened this issue Jan 3, 2018 · 3 comments

Comments

@SkyzohKey
Copy link

Fuse does supports specifying the keys as an array of objects like the following, would be super nice to have. It permits to sort the results depending on the weight the field that matched has. 😋

const KEYS_TO_FILTER = [
  { name: 'item.title', weight: 1.0 },
  { name: 'item.description', weight: 0.8 },
  { name: 'item.author', weight: 0.4 }
];
@mjsolidarios
Copy link
Owner

Will surely add this one on the next release. Thanks for the suggestion!

@jeremyk
Copy link

jeremyk commented Apr 3, 2018

Just want to +1 this and also mention that it would be really nice to be able to set other Fuse options such as threshold. The default of 0.6 is too permissive for our use case.

@wfried
Copy link

wfried commented Apr 26, 2018

Yes, +1. Thanks for considering this!

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

No branches or pull requests

4 participants