Open WillBishop opened 4 years ago
Your pattern occurs at the 611th position in content. Using the default distance
of 100
, the score (approximately 611 ÷ 100) will be much too high.
You can either increase location
if you're expecting pattern
to occur far from the beginning, or increase distance
so it has a smaller impact on the score:
Fuse(location: 600).search(pattern, in: content) // score = 0.07
Fuse(distance: 6000).search(pattern, in: content) // score = 0.10
In this operation, Fuse is given a pattern
And a string
However despite there being an exact match, the operation fails.
Fuse().search(pattern, in: content) //Produces nil
I'm using the blocking version of search, and would like to continue to do so if possible.
Appreciate any help, thanks!