Skip to content

Commit

Permalink
use geometry column for special phrase queries
Browse files Browse the repository at this point in the history
It has an index, centroid does not.
  • Loading branch information
lonvia committed Oct 9, 2012
1 parent c691217 commit a960cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit a960cf6

Please sign in to comment.