From: Sarah Hoffmann Date: Thu, 11 Mar 2021 16:14:46 +0000 (+0100) Subject: fix result splitting for last search group X-Git-Tag: v3.7.0~19^2~6 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/f498e4020839019770adf4a68bb2ab793ae1e27b fix result splitting for last search group When we are in the final iteration of the search groups, it is not possible to further delay the results. Unconditionally use the results with the best rank instead. --- 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'];