X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b121da0ca35c2ff08ecd5a02dd4eb5d4a9dcc3b1..4c2fa68c552e2a32a63ea2d9f141dbcaeebec4d1:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index d96b6cb8..11e47d9a 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -611,7 +611,10 @@ } } } - if (isset($aValidTokens[$sToken])) + // Look for partial matches. + // Note that there is no point in adding country terms here + // because country are omitted in the address. + if (isset($aValidTokens[$sToken]) && $sPhraseType != 'country') { // Allow searching for a word - but at extra cost foreach($aValidTokens[$sToken] as $aSearchTerm)