]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 7 May 2018 19:48:29 +0000 (21:48 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 7 May 2018 19:48:29 +0000 (21:48 +0200)
1  2 
lib/Geocode.php

diff --combined lib/Geocode.php
index 1c84f14b86adfe415364076a71be5fac78d44635,68a9a7cb1aced88a11662f4dee533e43661b054e..e9b304d251abbe4c6c7cf6e09c5c130297a27953
@@@ -19,7 -19,7 +19,7 @@@ class Geocod
      protected $bIncludeAddressDetails = false;
  
      protected $aExcludePlaceIDs = array();
 -    protected $bReverseInPlan = false;
 +    protected $bReverseInPlan = true;
  
      protected $iLimit = 20;
      protected $iFinalLimit = 10;
                      $this->oDB->getAll($sSQL),
                      'Could not get word tokens.'
                  );
-                 $aWordFrequencyScores = array();
                  foreach ($aDatabaseWords as $aToken) {
                      // Filter country tokens that do not match restricted countries.
                      if ($this->aCountryCodes
                      } else {
                          $aValidTokens[$aToken['word_token']] = array($aToken);
                      }
-                     $aWordFrequencyScores[$aToken['word_id']] = $aToken['search_name_count'] + 1;
                  }
  
                  // US ZIP+4 codes - if there is no token, merge in the 5-digit ZIP code
  
                      $aResults += $oSearch->query(
                          $this->oDB,
-                         $aWordFrequencyScores,
                          $this->iMinAddressRank,
                          $this->iMaxAddressRank,
                          $this->iLimit