]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge pull request #2074 from lonvia/add-housenumber-to-unknown-places
[nominatim.git] / lib / Geocode.php
index b07d1adebe587d12f01a738cdf8d39ad1ffd2ddd..ed02848eac4c2c846ea1a655089caa75aca879cd 100644 (file)
@@ -650,6 +650,8 @@ class Geocode
                     $this->oNormalizer
                 );
 
                     $this->oNormalizer
                 );
 
+                $oCtx->setFullNameWords($oValidTokens->getFullWordIDs());
+
                 // Try more interpretations for Tokens that could not be matched.
                 foreach ($aTokens as $sToken) {
                     if ($sToken[0] == ' ' && !$oValidTokens->contains($sToken)) {
                 // Try more interpretations for Tokens that could not be matched.
                 foreach ($aTokens as $sToken) {
                     if ($sToken[0] == ' ' && !$oValidTokens->contains($sToken)) {
@@ -934,6 +936,8 @@ class Geocode
                 } else {
                     $aResult['foundorder'] += 0.01;
                 }
                 } else {
                     $aResult['foundorder'] += 0.01;
                 }
+                // - rank
+                $aResult['foundorder'] -= 0.00001 * (30 - $aResult['rank_search']);
 
                 // Adjust importance for the number of exact string matches in the result
                 $iCountWords = 0;
 
                 // Adjust importance for the number of exact string matches in the result
                 $iCountWords = 0;