X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/128ca800cd6962b19d9b07e5f7504496e76e353a..e407558f767d1c3930624d2186c6c9934ab8a26b:/lib-php/ReverseGeocode.php diff --git a/lib-php/ReverseGeocode.php b/lib-php/ReverseGeocode.php index 47e931ef..a670c623 100644 --- a/lib-php/ReverseGeocode.php +++ b/lib-php/ReverseGeocode.php @@ -111,6 +111,7 @@ class ReverseGeocode $sSQL .= ' FROM placex'; $sSQL .= ' WHERE osm_type = \'N\''; $sSQL .= ' AND country_code = \''.$sCountryCode.'\''; + $sSQL .= ' AND rank_search < 26 '; // needed to select right index $sSQL .= ' AND rank_search between 5 and ' .min(25, $iMaxRank); $sSQL .= ' AND class = \'place\' AND type != \'postcode\''; $sSQL .= ' AND name IS NOT NULL '; @@ -206,6 +207,7 @@ class ReverseGeocode // for place nodes at rank_address 16 $sSQL .= ' AND rank_search > '.$iRankSearch; $sSQL .= ' AND rank_search <= '.$iMaxRank; + $sSQL .= ' AND rank_search < 26 '; // needed to select right index $sSQL .= ' AND rank_address > 0'; $sSQL .= ' AND class = \'place\''; $sSQL .= ' AND type != \'postcode\'';