From: Sarah Hoffmann Date: Fri, 6 Oct 2017 19:36:28 +0000 (+0200) Subject: further restrict use of partial terms in names X-Git-Tag: v3.1.0~51 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/5029101048109f3cc6789483dc9d5d8405546059 further restrict use of partial terms in names --- diff --git a/lib/Geocode.php b/lib/Geocode.php index d221e672..f282e265 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -859,7 +859,8 @@ class Geocode } } - if (!sizeof($aCurrentSearch['aName']) || $aCurrentSearch['iNamePhrase'] == $iPhrase) { + if ((!$aCurrentSearch['sPostcode'] && !$aSearch['aAddress'] && !$aSearch['aAddressNonSearch']) + && (!sizeof($aCurrentSearch['aName']) || $aCurrentSearch['iNamePhrase'] == $iPhrase)) { $aSearch = $aCurrentSearch; $aSearch['iSearchRank'] += 1; if (!sizeof($aCurrentSearch['aName'])) $aSearch['iSearchRank'] += 1;