]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
use geometry column for special phrase queries
[nominatim.git] / website / search.php
index f0325f78d1ab1ff440b085ec563670c396acb63a..30f7abde0e47ea2e49ef6199e039ec3e85c9f612 100755 (executable)
                                                        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";