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

fix: do not return partial matches for threshold 0 #766

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RomanHotsiy
Copy link

Fixes #762

@RomanHotsiy
Copy link
Author

Hey @krisk 🙌

Thanks for the great lib! I hit one problem and noticed it was already reported #762 so I decided to fix it.

The fix is one-liner and I added a unit test to cover it.

Please, let me know if you want me to adjust something or if you feel this is not a good fit in general (so I will maintain a fork or implement a workaround on top). Thanks in advance!

@swithek
Copy link

swithek commented Jun 24, 2024

@krisk Are there any plans to merge this? The project I'm working on is affected by this problem too.

@NicolasDurant
Copy link

NicolasDurant commented Jun 26, 2024

Having the same issue and this PR fixes it, if changed locally in my node_modules. Would be great, if this could be merged.

Although to my understanding there could be still multiple indices returned as in my case, where I have a very long string that can contain the exact string match multiple times. So, the test of this PR could be updated to reflect that.

@github-actions github-actions bot added the Stale label Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All indices return with threshold = 0 aren't a perfect match
3 participants