mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-09 11:34:07 +00:00
disable housenumber-specific search when no address details are provided
This commit is contained in:
@@ -1240,7 +1240,7 @@
|
|||||||
$aTerms = array();
|
$aTerms = array();
|
||||||
$aOrder = array();
|
$aOrder = array();
|
||||||
|
|
||||||
if ($aSearch['sHouseNumber'])
|
if ($aSearch['sHouseNumber'] && sizeof($aSearch['aAddress']))
|
||||||
{
|
{
|
||||||
$sHouseNumberRegex = '\\\\m'.$aSearch['sHouseNumber'].'\\\\M';
|
$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";
|
$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