mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
invalidate rank >27 places around roads
Ensures that addresses are correctly reparented if a road is inserted after the address itself was inserted.
This commit is contained in:
@@ -1209,7 +1209,13 @@ BEGIN
|
|||||||
END IF;
|
END IF;
|
||||||
IF diameter > 0 THEN
|
IF diameter > 0 THEN
|
||||||
-- RAISE WARNING 'placex point insert: % % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type,diameter;
|
-- RAISE WARNING 'placex point insert: % % % % %',NEW.osm_type,NEW.osm_id,NEW.class,NEW.type,diameter;
|
||||||
update placex set indexed_status = 2 where indexed_status = 0 and rank_search > NEW.rank_search and ST_DWithin(placex.geometry, NEW.geometry, diameter) and (rank_search < 28 or name is not null);
|
IF NEW.rank_search >= 26 THEN
|
||||||
|
-- roads may cause reparenting for >27 rank places
|
||||||
|
update placex set indexed_status = 2 where indexed_status = 0 and rank_search > NEW.rank_search and ST_DWithin(placex.geometry, NEW.geometry, diameter);
|
||||||
|
ELSE
|
||||||
|
-- for all other places the search terms may change as well
|
||||||
|
update placex set indexed_status = 2 where indexed_status = 0 and rank_search > NEW.rank_search and ST_DWithin(placex.geometry, NEW.geometry, diameter) and (rank_search < 28 or name is not null);
|
||||||
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|||||||
Reference in New Issue
Block a user