X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/eb79e655e638a4345a130ceef6b0d31a1ab5b1f9..d93209ee4831d2b32ea743fc2ec0a5feba238dcb:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index a8e4083b..7ea39e49 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -477,12 +477,13 @@ class Geocode $sHousenumbers .= "(".$placeID.", ".$housenumber.")"; if ($i<$length) $sHousenumbers .= ", "; } + if (CONST_Use_US_Tiger_Data) { // Tiger search only if a housenumber was searched and if it was found (i.e. aPlaceIDs[placeID] = housenumber != -1) (realized through a join) $sSQL .= " union"; $sSQL .= " SELECT "; $sSQL .= " 'T' AS osm_type, "; - $sSQL .= " place_id AS osm_id, "; + $sSQL .= " (SELECT osm_id from placex p WHERE p.place_id=min(blub.parent_place_id)) as osm_id, "; $sSQL .= " 'place' AS class, "; $sSQL .= " 'house' AS type, "; $sSQL .= " null AS admin_level, ";