]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
add testing for rank adaption while linking
[nominatim.git] / lib / Geocode.php
index f45b2caae3349fa256a114dd61a501e0c2778bba..ab9446e0ebd757837d819a706f250b5a3c1ac408 100644 (file)
@@ -808,9 +808,7 @@ class Geocode
                         $sSQL .= 'WHERE place_id in ('.$sPlaceIds.') ';
                         $sSQL .= '  AND (';
                         $sSQL .= "         placex.rank_address between $this->iMinAddressRank and $this->iMaxAddressRank ";
-                        if (14 >= $this->iMinAddressRank && 14 <= $this->iMaxAddressRank) {
-                            $sSQL .= "     OR (extratags->'place') = 'city'";
-                        }
+                        $sSQL .= "         OR placex.rank_search between $this->iMinAddressRank and $this->iMaxAddressRank ";
                         if ($this->aAddressRankList) {
                             $sSQL .= '     OR placex.rank_address in ('.join(',', $this->aAddressRankList).')';
                         }