X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9996cc495cd329a15a5b76497d6c41469d6617f4..13469e1576e29f24b220ed1749ae143a0094d204:/docs/Import-and-Update.md diff --git a/docs/Import-and-Update.md b/docs/Import-and-Update.md index 3eda0a02..b523f65d 100644 --- a/docs/Import-and-Update.md +++ b/docs/Import-and-Update.md @@ -33,8 +33,8 @@ but it will improve the quality of the results if this is installed. This data is available as a binary download: cd $NOMINATIM_SOURCE_DIR/data - wget http://www.nominatim.org/data/wikipedia_article.sql.bin - wget http://www.nominatim.org/data/wikipedia_redirect.sql.bin + wget https://www.nominatim.org/data/wikipedia_article.sql.bin + wget https://www.nominatim.org/data/wikipedia_redirect.sql.bin Combined the 2 files are around 1.5GB and add around 30GB to the install size of nominatim. They also increase the install time by an hour or so. @@ -48,14 +48,14 @@ loaded data. Nominatim can use postcodes from an external source to improve searches that involve a UK postcode. This data can be optionally downloaded: cd $NOMINATIM_SOURCE_DIR/data - wget http://www.nominatim.org/data/gb_postcode_data.sql.gz + wget https://www.nominatim.org/data/gb_postcode_data.sql.gz Initial import of the data -------------------------- **Important:** first try the import with a small excerpt, for example from -[Geofabrik](http://download.geofabrik.de). +[Geofabrik](https://download.geofabrik.de). Download the data to import and load the data with the following command: @@ -68,6 +68,17 @@ import, for excerpts you can use less. Adapt to your available RAM to avoid swapping, never give more than 2/3 of RAM to osm2pgsql. +Computing word frequency for search terms can improve the performance of +forward geocoding in particular under high load as it helps Postgres' query +planner to make the right decisions. To recompute word counts run: + + ./utils/update.php --recompute-word-counts + +This will take a couple of hours for a full planet installation. You can +also defer that step to a later point in time when you realise that +performance becomes an issue. Just make sure that updates are stopped before +running this function. + Loading additional datasets --------------------------- @@ -128,7 +139,8 @@ For a list of other methods see the output of `./utils/update.php --help`. Installing the newest version of Pyosmium ----------------------------------------- -It is recommended to install Pyosmium via pip: +It is recommended to install Pyosmium via pip. Run (as the same user who +will later run the updates): pip install --user osmium @@ -152,7 +164,7 @@ to `settings/local.php`. For example, to use the daily country extracts diffs for Ireland from geofabrik add the following: // base URL of the replication service - @define('CONST_Replication_Url', 'http://download.geofabrik.de/europe/ireland-and-northern-ireland-updates'); + @define('CONST_Replication_Url', 'https://download.geofabrik.de/europe/ireland-and-northern-ireland-updates'); // How often upstream publishes diffs @define('CONST_Replication_Update_Interval', '86400'); // How long to sleep if no update found yet