]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
do not use artificial housenumbers as names
[nominatim.git] / lib / SearchDescription.php
index c339b108e749953636736bff2a7e1e2aacfe4ae5..d8c541dbc8f8514d04a5f297d5681c4fb6e8ab54 100644 (file)
@@ -249,7 +249,10 @@ class SearchDescription
                 $aNewSearches[] = $oSearch;
                 // Housenumbers may appear in the name when the place has its own
                 // address terms.
-                if (($this->iNamePhrase >= 0 || empty($this->aName)) && empty($this->aAddress)) {
+                if ($oSearchTerm->iId !== null
+                    && ($this->iNamePhrase >= 0 || empty($this->aName))
+                    && empty($this->aAddress)
+                   ) {
                     $oSearch = clone $this;
                     $oSearch->iSearchRank++;
                     $oSearch->aAddress = $this->aName;