From f498e4020839019770adf4a68bb2ab793ae1e27b Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 11 Mar 2021 17:14:46 +0100 Subject: [PATCH] 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. --- lib-php/Geocode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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']; -- 2.39.5