syntax:functions:distance
This is an old revision of the document!
distance(text, text)
The edit distance between two text strings calculated as the Damerau-Levenshtein distance. It shows the degree of variance between the two strings. The bigger is the edit distance, the more different the strings are. The function is case-insensitive.
Example | Result |
---|---|
distance("cat", "cat") | 0 |
distance("cat", "cut") | 1 |
distance("cat", "dog") | 3 |
distance("cat", "Scott") | 3 |
Use cases: fuzzy matching, detection of mistyped words.
syntax/functions/distance.1514039103.txt.gz · Last modified: 2017/12/23 09:25 by dmitry