X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/5864fddb537a845e0281a433f00413dde9d70a08..676f7c86705ae9d1ccdfdef6f6574cb491006e63:/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).")";