mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
use geometry column for special phrase queries
It has an index, centroid does not.
This commit is contained in:
@@ -729,7 +729,7 @@
|
||||
else
|
||||
{
|
||||
$sSQL = "select place_id from placex where class='".$aSearch['sClass']."' and type='".$aSearch['sType']."'";
|
||||
$sSQL .= " and st_contains($sViewboxSmallSQL, centroid)";
|
||||
$sSQL .= " and st_contains($sViewboxSmallSQL, geometry)";
|
||||
if ($sCountryCodesSQL) $sSQL .= " and country_code in ($sCountryCodesSQL)";
|
||||
if ($sViewboxCentreSQL) $sSQL .= " order by st_distance($sViewboxCentreSQL, centroid) asc";
|
||||
$sSQL .= " limit $iLimit";
|
||||
|
||||
Reference in New Issue
Block a user