]> git.openstreetmap.org Git - nominatim.git/commitdiff
use geometry column for special phrase queries
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 9 Oct 2012 21:57:54 +0000 (23:57 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 9 Oct 2012 21:57:54 +0000 (23:57 +0200)
It has an index, centroid does not.

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";