X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/72b01148d2d12f71c12440c15fa078b55e1c8f86..8d8b1d4307f7f56c249a4b64b3943e67765d06ee:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index b475add2..f638af9a 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -779,7 +779,8 @@ class Geocode $aSplitResults = Result::splitResults($aResults); Debug::printVar('Split results', $aSplitResults); if ($iGroupLoop <= 4 - && reset($aSplitResults['head'])->iResultRank > 0) { + && reset($aSplitResults['head'])->iResultRank > 0 + && $iGroupedRank !== array_key_last($aGroupedSearches)) { // Haven't found an exact match for the query yet. // Therefore add result from the next group level. $aNextResults = $aSplitResults['head'];