rljacobson / Levenshtein

A Blazingly Fast Damerau–Levenshtein Edit Distance Function (UDF) for MySQL
MIT License
24 stars 3 forks source link

Implement DAMLEVBEST #3

Open rljacobson opened 5 years ago

rljacobson commented 5 years ago

A typical use case is to query a database for the best match, that is, for the match with minimum edit distance. In such a case, the maximum edit distance k used for early bailout can decrease to the minimum edit distance seen so far as the query is running. If the provided maximum distance is k=7 and the minimum edit distance seen so far is 2, there is no point in computing distances up to k=7 for the next 98,000 rows.