mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
remove suggestion code, no longer works
This commit is contained in:
14
lib/lib.php
14
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();
|
||||
|
||||
Reference in New Issue
Block a user