From: Sarah Hoffmann Date: Sun, 30 Jun 2019 08:48:58 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~282 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b8ebc169b104dae171731288a5a8a7b569d22530?hp=-c Merge remote-tracking branch 'upstream/master' --- b8ebc169b104dae171731288a5a8a7b569d22530 diff --combined lib/Geocode.php index e2d67686,7a9f5ad4..12410acc --- a/lib/Geocode.php +++ b/lib/Geocode.php @@@ -18,7 -18,7 +18,7 @@@ class Geocod protected $aLangPrefOrder = array(); protected $aExcludePlaceIDs = array(); - protected $bReverseInPlan = false; + protected $bReverseInPlan = true; protected $iLimit = 20; protected $iFinalLimit = 10; @@@ -348,10 -348,7 +348,7 @@@ $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 +638,6 @@@ } } - Debug::printDebugTable('Phrases', $aPhrases); Debug::printVar('Tokens', $aTokens); $oValidTokens = new TokenList(); @@@ -686,6 -682,11 +682,11 @@@ 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);