Skip to content

Returns a similarity score between two strings based on n-gram matching.

func.ngram_search(<str1>, <str2>, <n>)
func.ngram_search('StarRocks', 'Starrocks', 4)
┌─────┐
0.5
└─────┘
NGRAM_SEARCH(<str1>, <str2>, <n>)
SELECT NGRAM_SEARCH('StarRocks', 'Starrocks', 4);
┌─────┐
0.5
└─────┘