krisk / Fuse

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

how to add negative weigth to a property? #641

Closed KutnerUri closed 1 year ago

KutnerUri commented 2 years ago

I'm trying to query a list of items:

[{ name: "hello"}, {name: "helo", deprecated: true}, {name: "world"}]

I want to show items with the deprecated: true property, but lower their score, so for example, "helo" will appear after "hello". I want to assign a negative value to deprecated, or give a positive weight when it is undefined. How do I do that? 🤔

github-actions[bot] commented 1 year ago

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