X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b4c87a09a194a7d966724ce48ba2d8ef0d044ca0..7ca4259866625413a2f2a9112bc3b756a3fa3299:/lib/lib.php?ds=sidebyside diff --git a/lib/lib.php b/lib/lib.php index 96d2c048..1517b317 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -785,20 +785,6 @@ } - function getWordSuggestions(&$oDB, $sWord) - { - $sWordQuoted = getDBQuoted(trim($sWord)); - $sSQL = "select *,levenshtein($sWordQuoted,word) from test_token "; - $sSQL .= "where (metaphone = dmetaphone($sWordQuoted) or metaphonealt = dmetaphone($sWordQuoted) or "; - $sSQL .= "metaphone = dmetaphone_alt($sWordQuoted) or metaphonealt = dmetaphone_alt($sWordQuoted)) "; - $sSQL .= "and len between length($sWordQuoted)-2 and length($sWordQuoted)+2 "; - $sSQL .= "and levenshtein($sWordQuoted,word) < 3 "; - $sSQL .= "order by levenshtein($sWordQuoted,word) asc, abs(len - length($sWordQuoted)) asc limit 20"; - $aSimilar = $oDB->getAll($sSQL); - return $aSimilar; - } - - function geocodeReverse($fLat, $fLon, $iZoom=18) { $oDB =& getDB();