X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/27af9b102c2d6167b9025d594f8cb75e4dd76a03..000d133af64522d65f885bb72d4cd099e69bfa75:/lib-php/Geocode.php diff --git a/lib-php/Geocode.php b/lib-php/Geocode.php index fcbc2f28..ec21a0dc 100644 --- a/lib-php/Geocode.php +++ b/lib-php/Geocode.php @@ -352,14 +352,9 @@ class Geocode // Add all words from this wordset foreach ($aWordset as $iToken => $sToken) { - //echo "
$sToken"; $aNewWordsetSearches = array(); foreach ($aWordsetSearches as $oCurrentSearch) { - //echo ""; - //var_dump($oCurrentSearch); - //echo ""; - // Tokens with full name matches. foreach ($oValidTokens->get(' '.$sToken) as $oSearchTerm) { $aNewSearches = $oCurrentSearch->extendWithFullTerm( @@ -403,7 +398,6 @@ class Geocode usort($aNewWordsetSearches, array('Nominatim\SearchDescription', 'bySearchRank')); $aWordsetSearches = array_slice($aNewWordsetSearches, 0, 50); } - //var_Dump('
',count($aWordsetSearches)); exit; $aNewPhraseSearches = array_merge($aNewPhraseSearches, $aNewWordsetSearches); usort($aNewPhraseSearches, array('Nominatim\SearchDescription', 'bySearchRank')); @@ -817,10 +811,8 @@ class Geocode // No results? Done if (empty($aResults)) { - if ($this->bFallback) { - if ($this->fallbackStructuredQuery()) { - return $this->lookup(); - } + if ($this->bFallback && $this->fallbackStructuredQuery()) { + return $this->lookup(); } return array();