]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ReverseGeocode.php
Merge pull request #1963 from lonvia/remove-postcodes-from-search-index
[nominatim.git] / lib / ReverseGeocode.php
index 50060ee00e91ba7dc4b05ca149af25c38ecfe5b2..56596b032936ffef30b94941d2a40a0c9ef76961 100644 (file)
@@ -193,6 +193,7 @@ class ReverseGeocode
                 // for place nodes at rank_address 16
                 $sSQL .= ' AND rank_search > '.$iRankSearch;
                 $sSQL .= ' AND rank_search <= '.$iMaxRank;
+                $sSQL .= ' AND rank_address > 0';
                 $sSQL .= ' AND class = \'place\'';
                 $sSQL .= ' AND type != \'postcode\'';
                 $sSQL .= ' AND name IS NOT NULL ';
@@ -299,7 +300,7 @@ class ReverseGeocode
                     // radius ?
                     $sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', geometry, 0.001)';
                     $sSQL .= ' AND parent_place_id = '.$iPlaceID;
-                    $sSQL .= ' and rank_address != 28';
+                    $sSQL .= ' and rank_address > 28';
                     $sSQL .= ' and ST_GeometryType(geometry) != \'ST_LineString\'';
                     $sSQL .= ' and (name is not null or housenumber is not null)';
                     $sSQL .= ' and class not in (\'boundary\')';