Open davidefiocco opened 2 years ago
Hi @davidefiocco, apologies for the late response.
Yes, this is currently the intended behavior.
The reason is that once the maximum distance is equal to (or greater than) the length of what you're searching for (query
in your example), even an empty string is a valid match.
However, looking at your example, I can see that this behavior isn't great: There are matches with a lower distance in the text, but these are no longer returned when the max. distance is too large.
I'll think about how this can be improved without complicating things.
To reproduce I am using
fuzzysearch==0.7.3
and runningwith
max_l_dist=2
I get one match withwith
max_l_dist=3
I get the previous one with an additional onebut with
max_l_dist=4
I fail to get previous ones.Is this intended behaviour?