[Geocoding] Nominatim - Reindexing after applying a (daily) diff

Brian Quinion openstreetmap at brian.quinion.co.uk
Sun Jan 3 12:14:32 GMT 2010


> I have setup my own copy of Nominatim that uses only data for Romania
> (thanks Brian) which is visible here:
> http://cipt2001.homeip.net:8765/gazetteer/index.php and now I am trying to
> keep it up to date. I am using daily diffs from the Romanian OSM server to
> update the database using osm2pgsql, and now I am wondering what will be the
> best way to do an update of the indexes. The only solution I have so far is
> to start a new indexing process from scratch, but this is taking some time
> and definitely is not the best strategy.

Have a look at util.update.php. On the main server that script is run
each night as:

util.update.php --import-daily --import-all --index

It downloads and imports the daily diffs for the main server (shelling
out to osm2pgsql) and then re-indexes as needed.  On the main server
it takes around 6 hours to run.  You can probably just change the
download source and re-use the script as is.

There is a trade off between how much reindexing is done and how
accurate the results are - at the moment I manually update country
level changes every now and then rather than letting them happen every
night.  You can pick your own trade off, search for 'Performance: We
just can't handle re-indexing for country level changes' in
gazetteer-functions.sql

--
 Brian




More information about the Geocoding mailing list