X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6511ec3aa8d02645d8fbcdd133a93a58d72f388b..c61b5219f9eeb48b09d5e74e1f5afc5a955682b9:/lib/PlaceLookup.php?ds=inline diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index fce49701..9f4f143e 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -215,7 +215,7 @@ class PlaceLookup 'ST_Collect(centroid)', 'min(CASE WHEN placex.rank_search < 28 THEN placex.place_id ELSE placex.parent_place_id END)' ); - $sSQL .= " (extratags->'place') AS extra_place "; + $sSQL .= " COALESCE(extratags->'place', extratags->'linked_place') AS extra_place "; $sSQL .= ' FROM placex'; $sSQL .= " WHERE place_id in ($sPlaceIDs) "; $sSQL .= ' AND ('; @@ -248,7 +248,7 @@ class PlaceLookup $sSQL .= ' ref, '; if ($this->bExtraTags) $sSQL .= 'extratags, '; if ($this->bNameDetails) $sSQL .= 'name, '; - $sSQL .= " extratags->'place' "; + $sSQL .= ' extra_place '; $aSubSelects[] = $sSQL; }