further restrict use of partial terms in names

This commit is contained in:
Sarah Hoffmann 2017-10-06 21:36:28 +02:00
parent 0c9a241487
commit 5029101048

View File

@ -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;