]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / SearchDescription.php
index 47676d5952e7c677a0d18b92301162a9813b8cea..4fafbec2b21c9899fb1e35c51ac8241647876b58 100644 (file)
@@ -187,7 +187,7 @@ class SearchDescription
         ) {
             if (!$this->sCountryCode) {
                 $oSearch = clone $this;
-                $oSearch->iSearchRank += 2;
+                $oSearch->iSearchRank++;
                 $oSearch->sCountryCode = $oSearchTerm->sCountryCode;
                 // Country is almost always at the end of the string
                 // - increase score for finding it anywhere else (optimisation)
@@ -447,8 +447,8 @@ class SearchDescription
                 $iLimit
             );
 
-            //now search for housenumber, if housenumber provided
-            if ($this->sHouseNumber && !empty($aResults)) {
+            // Now search for housenumber, if housenumber provided. Can be zero.
+            if (($this->sHouseNumber || $this->sHouseNumber === '0') && !empty($aResults)) {
                 // Downgrade the rank of the street results, they are missing
                 // the housenumber.
                 foreach ($aResults as $oRes) {