X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ec2d491dc8939ecf28ab84e26955bc7189618096..59303834041279d8df0d8c779d454bd95df684bd:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 9e02150c..7a9f5ad4 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -348,10 +348,7 @@ class Geocode $aNewPhraseSearches = array(); $sPhraseType = $bIsStructured ? $oPhrase->getPhraseType() : ''; - foreach ($oPhrase->getWordSets() as $iWordSet => $aWordset) { - // Too many permutations - too expensive - if ($iWordSet > 120) break; - + foreach ($oPhrase->getWordSets() as $aWordset) { $aWordsetSearches = $aSearches; // Add all words from this wordset @@ -641,7 +638,6 @@ class Geocode } } - Debug::printDebugTable('Phrases', $aPhrases); Debug::printVar('Tokens', $aTokens); $oValidTokens = new TokenList(); @@ -686,6 +682,11 @@ class Geocode Debug::printGroupTable('Valid Tokens', $oValidTokens->debugInfo()); + foreach ($aPhrases as $oPhrase) { + $oPhrase->computeWordSets($oValidTokens); + } + Debug::printDebugTable('Phrases', $aPhrases); + Debug::newSection('Search candidates'); $aGroupedSearches = $this->getGroupedSearches($aSearches, $aPhrases, $oValidTokens, $bStructuredPhrases);