mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 21:34:06 +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
|
else
|
||||||
{
|
{
|
||||||
$sSQL = "select place_id from placex where class='".$aSearch['sClass']."' and type='".$aSearch['sType']."'";
|
$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 ($sCountryCodesSQL) $sSQL .= " and country_code in ($sCountryCodesSQL)";
|
||||||
if ($sViewboxCentreSQL) $sSQL .= " order by st_distance($sViewboxCentreSQL, centroid) asc";
|
if ($sViewboxCentreSQL) $sSQL .= " order by st_distance($sViewboxCentreSQL, centroid) asc";
|
||||||
$sSQL .= " limit $iLimit";
|
$sSQL .= " limit $iLimit";
|
||||||
|
|||||||
Reference in New Issue
Block a user