forked from hans/Nominatim
also update wikipedia from linked places
This commit is contained in:
@@ -328,6 +328,7 @@ if ($aResult['recompute-importance']) {
|
||||
|
||||
$sSQL = 'ALTER TABLE placex DISABLE TRIGGER ALL;';
|
||||
$sSQL .= 'UPDATE placex SET (wikipedia, importance) = (SELECT wikipedia, importance FROM compute_importance(extratags, country_code, osm_type, osm_id));';
|
||||
$sSQL .= 'UPDATE placex s SET wikipedia = d.wikipedia, importance = d.importance FROM placex d WHERE s.place_id = d.linked_place_id and d.wikipedia is not null and (s.wikipedia is null or s.importance < d.importance);';
|
||||
$sSQL .= 'ALTER TABLE placex ENABLE TRIGGER ALL;';
|
||||
$oDB->exec($sSQL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user