X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1dfa9684b0dbe0d312449fd3041df6ee2bc13616..f5718ed909f1ff93d238f2c3fac2429a420efbfa:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 47676d59..4fafbec2 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -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) {