mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
disable housenumber-specific search when no address details are provided
This commit is contained in:
@@ -1240,7 +1240,7 @@
|
||||
$aTerms = array();
|
||||
$aOrder = array();
|
||||
|
||||
if ($aSearch['sHouseNumber'])
|
||||
if ($aSearch['sHouseNumber'] && sizeof($aSearch['aAddress']))
|
||||
{
|
||||
$sHouseNumberRegex = '\\\\m'.$aSearch['sHouseNumber'].'\\\\M';
|
||||
$aOrder[] = "exists(select place_id from placex where parent_place_id = search_name.place_id and transliteration(housenumber) ~* E'".$sHouseNumberRegex."' limit 1) desc";
|
||||
|
||||
Reference in New Issue
Block a user