You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
In the example below, fuse is used to filter a table and all matches are highlighted. We search for "consequat" and there are matches all over the text. Even though there is an exact match there is a lot of other quite far fetched matches that are highlighted as well.
These are the options set:
Using the matches included in the search result does therefore not work that well for highlighting as it can include matches for every other letter in a text even though there is an exact match as in the example above, and to set the threshold lower won´t affect it much or at all.
Correct me if I am wrong but it doesn´t seem that the matches are affected by the set threshold?
This is brought up in this discussion ticket as well. As one of the comments mention in that ticket, there is a possible solution by filtering the matches and only highlight and "best" ones.
The above mentioned issue is easier seen in longer texts but it is present in other cases as well, like this example:
As we have an exact match the other matches are only disturbing and creates visual excise.
However, is this something that can be improved or is it purposely designed like this? Maybe the root cause of this behavior is the core search algorithm used in fuse?
Same underlying bug. Shipped a fix in v7.4.0-beta.6 (npm install fuse.js@beta), with a bonus ~15% perf win on includeMatches queries. Cross-linking from #792 where I posted the diagnosis and the residual behavior.
Activity
github-actions commentedon Jan 27, 2023
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
krisk commentedon May 14, 2026
Same underlying bug. Shipped a fix in
v7.4.0-beta.6(npm install fuse.js@beta), with a bonus ~15% perf win onincludeMatchesqueries. Cross-linking from #792 where I posted the diagnosis and the residual behavior.