Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of PR:
Breaking changes:
Details
This PR brings the plugin to a much needed alignment with the latest version of Fuse.js (v6 at time of writing). As of v6, the lib has improved significantly concerning performance and additions for extensive search capability.
Breaking Changes
Fuse v6 does introduces breaking changes, most notably the formatting of search results which now incorporate a search score, character matches, etc.
We can alleviate these by continuing to return a model collection. That being said, the raw search results are still accessible, should they be needed for the additional metadata, on the query instance the search modifier was applied:
To mitigate any migration complications, much of the refactoring takes legacy input into consideration. For example, array inputs are still a valid form of expression:
Various options have been removed including, but not limited to, tokenization options,
maxPatternLength
,matchAllTokens
andid
. These aren't considering breaking changes per-se, but can have an impact on expectations.See the library CHANGELOG for more information.
TODO