X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/70deb7883e1c4dd4d9e36e8e1552511e9a49a68c..c3dcb6535af4c5c52012daf0201845af30ab972e:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index e1cb9b1a..7563a26d 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1343,8 +1343,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).")";