X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5864fddb537a845e0281a433f00413dde9d70a08..b955883a5bff28acbc6c5c62254cf6d479d8c111:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 8616be13..5451c382 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1351,8 +1351,8 @@ $sPlaceIDs = join(',',$aPlaceIDs); // Now they are indexed look for a house attached to a street we found - $sHouseNumberRegex = '\\\\m'.str_replace(' ','[-,/ ]',$aSearch['sHouseNumber']).'\\\\M'; - $sSQL = "select place_id from placex where parent_place_id in (".$sPlaceIDs.") and housenumber ~* E'".$sHouseNumberRegex."'"; + $sHouseNumberRegex = '\\\\m'.$aSearch['sHouseNumber'].'\\\\M'; + $sSQL = "select place_id from placex where parent_place_id in (".$sPlaceIDs.") and transliteration(housenumber) ~* E'".$sHouseNumberRegex."'"; if (sizeof($this->aExcludePlaceIDs)) { $sSQL .= " and place_id not in (".join(',',$this->aExcludePlaceIDs).")";