mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-12-26 06:22:13 +03:00
normalize house numbers in placex when searching
This commit is contained in:
parent
052d219205
commit
defb809b83
@ -1343,8 +1343,8 @@
|
|||||||
$sPlaceIDs = join(',',$aPlaceIDs);
|
$sPlaceIDs = join(',',$aPlaceIDs);
|
||||||
|
|
||||||
// Now they are indexed look for a house attached to a street we found
|
// Now they are indexed look for a house attached to a street we found
|
||||||
$sHouseNumberRegex = '\\\\m'.str_replace(' ','[-,/ ]',$aSearch['sHouseNumber']).'\\\\M';
|
$sHouseNumberRegex = '\\\\m'.$aSearch['sHouseNumber'].'\\\\M';
|
||||||
$sSQL = "select place_id from placex where parent_place_id in (".$sPlaceIDs.") and housenumber ~* E'".$sHouseNumberRegex."'";
|
$sSQL = "select place_id from placex where parent_place_id in (".$sPlaceIDs.") and transliteration(housenumber) ~* E'".$sHouseNumberRegex."'";
|
||||||
if (sizeof($this->aExcludePlaceIDs))
|
if (sizeof($this->aExcludePlaceIDs))
|
||||||
{
|
{
|
||||||
$sSQL .= " and place_id not in (".join(',',$this->aExcludePlaceIDs).")";
|
$sSQL .= " and place_id not in (".join(',',$this->aExcludePlaceIDs).")";
|
||||||
|
Loading…
Reference in New Issue
Block a user