]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge pull request #969 from mtmail/update-vagrant-md
[nominatim.git] / lib / Geocode.php
index d5647c761edbc90a7a575edf17227eb8789f1710..26fafb734fa93d2d0beddbff4e52557537d3fad4 100644 (file)
@@ -921,12 +921,12 @@ class Geocode
                 $aResult['importance'] = 0.001;
                 $aResult['foundorder'] = $aResult['addressimportance'];
             } else {
-                // Adjust importance for the number of exact string matches in the result
+                $aResult['importance'] = max(0.001, $aResult['importance']);
                 $aResult['importance'] *= $this->viewboxImportanceFactor(
                     $aResult['lon'],
                     $aResult['lat']
                 );
-                $aResult['importance'] = max(0.001, $aResult['importance']);
+                // Adjust importance for the number of exact string matches in the result
                 $iCountWords = 0;
                 $sAddress = $aResult['langaddress'];
                 foreach ($aRecheckWords as $i => $sWord) {