Merge pull request #2565 from lonvia/swap-wordset-order

Swap order of query interpretation
This commit is contained in:
Sarah Hoffmann
2022-01-06 09:02:46 +01:00
committed by GitHub

View File

@@ -617,16 +617,15 @@ class Geocode
} }
$aReverseGroupedSearches = $this->getGroupedSearches($aSearches, $aPhrases, $oValidTokens); $aReverseGroupedSearches = $this->getGroupedSearches($aSearches, $aPhrases, $oValidTokens);
foreach ($aGroupedSearches as $aSearches) { foreach ($aReverseGroupedSearches as $aSearches) {
foreach ($aSearches as $aSearch) { foreach ($aSearches as $aSearch) {
if (!isset($aReverseGroupedSearches[$aSearch->getRank()])) { if (!isset($aGroupedSearches[$aSearch->getRank()])) {
$aReverseGroupedSearches[$aSearch->getRank()] = array(); $aGroupedSearches[$aSearch->getRank()] = array();
} }
$aReverseGroupedSearches[$aSearch->getRank()][] = $aSearch; $aGroupedSearches[$aSearch->getRank()][] = $aSearch;
} }
} }
$aGroupedSearches = $aReverseGroupedSearches;
ksort($aGroupedSearches); ksort($aGroupedSearches);
} }
} else { } else {