Fuse icon indicating copy to clipboard operation
Fuse copied to clipboard

Is it possible to disable transposition?

Open v4lenz opened this issue 5 months ago • 2 comments

Is there an existing issue or pull request for this?

  • [X] I have searched the existing issues and pull requests. I found this: https://github.com/krisk/Fuse/issues/41 but it does not seem to solve my specific problem

Feature description

I'm a bit frustrated by the fact that the searched term metric matches the term cluster, because of the letters ter which yes, are in the metric word, but not in the original order.

According to this SO thread, https://stackoverflow.com/questions/68037392/why-do-items-match-in-fuse-js-if-the-pattern-contians-a-letter-that-doesnt-exis, Fuse uses Levenshtein distance, and it is not possible to achieve what I want.

Do you guys confirm? Am I the only one frustrated by this behavior? Thank you

Desired solution

I'd like Fuse to always respect the order of the letters in the searched term. For my specific example, the searched word metric should not return as a match the word cluster.

Alternatives considered

According to the mentioned thread, a different library (not sure I can mention here, but it's in the link) would solve the problem. I found this thread that seems to discuss a similar topic, but with no actual solution to my specific problem: https://github.com/krisk/Fuse/issues/41

Additional context

No response

v4lenz avatar Sep 02 '24 15:09 v4lenz