Hello, we got an issue with private instance using official docker image. We have issue with some postal codes. For example the public api returns correct data (the issue also occurs with street name and number) for the city: https://nominatim.openstreetmap.org/search.php?postalcode=89-501&format=jsonv2 but our instance returns empty reply. However, when refering to county postcode: https://nominatim.openstreetmap.org/search.php?postalcode=89-500&format=jsonv2 we do get proper reply from our selfhosted instance, including detailed query with street name/number (we get correct geolocation using the general county post-code) Our instance configuration is as follows (deployed using docker compose): POSTGRES_SHARED_BUFFERS: "2GB" POSTGRES_MAINTENANCE_WORK_MEM: "10GB" POSTGRES_AUTOVACUUM_WORK_MEM: "2GB" POSTGRES_WORK_MEM: "50MB" POSTGRES_EFFECTIVE_CACHE_SIZE: "8GB" PBF_URL: "https://download.geofabrik.de/europe/poland-latest.osm.pbf" REPLICATION_URL: "https://download.geofabrik.de/europe/poland-updates/" IMPORT_STYLE: "address" Docker image we use is: mediagis/nominatim:4.0. Checked for update using: sudo -u nominatim nominatim replication -v --check-for-updates --project-dir /nominatim and its up-to-date. Any hints on what may be the issue here? Can too low level import style have anything to do with it? The 89-500 is general county code https://znajdzkodpocztowy.pl/szukaj/mk-89-500/, the 89-501 is strictly city code https://znajdzkodpocztowy.pl/szukaj/mk-89-501/ . The issue extends to other cities as well. If address is specified with general county code everything works, but when local city code is used, reply is empty. The issue does not occur on public api - all local city codes give correct rply. Anything in config we should change? asked 12 May '22, 08:53 mzaw9 |
Quick answer: You need to update the postcode data on your instance with the following command: Background: Postcode data is not directly available in OSM. There are only postcodes as part of addresses. To make search for postcodes work, Nominatim takes the postcodes from all the address and computes a centroid point for each of them. This is a rather expensive process, so it is not done as part of the regular updates. You have to occasionally run the process manually using the command above. Addresses with the postcode '89-501' were first entered in OSM only a couple of weeks ago. That's why your instance does not have them yet. If you have regularly applied updates, the data is there. Recomputing the postcode centroids will make them searchable. answered 18 May '22, 08:34 lonvia thanks, that helped; we also automated the refresh to once a day (same as update)
(19 May '22, 14:17)
mzaw9
|
When was the initial import?
around 2 months ago. replication is working once/day the issue is wide - it has county codes, but missing local city-codes; however, it works on public api.
can this: https://github.com/osm-search/Nominatim/blob/2d1a22705f7f2f067f2c839c32caf55941a37b01/settings/import-full.style#L18 difference between address and full import be a culprit?