From: Sarah Hoffmann Date: Tue, 9 Oct 2012 21:57:54 +0000 (+0200) Subject: use geometry column for special phrase queries X-Git-Tag: v2.0.0~7 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/a960cf6b719638b5126b00267621363936749725 use geometry column for special phrase queries It has an index, centroid does not. --- diff --git a/website/search.php b/website/search.php index f0325f78..30f7abde 100755 --- a/website/search.php +++ b/website/search.php @@ -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";