mediagis / nominatim-docker

100% working container for Nominatim
Creative Commons Zero v1.0 Universal
1.08k stars 442 forks source link

Fewer search results with Docker Nominatim compared to Official Nominatim #424

Closed megarok closed 1 year ago

megarok commented 1 year ago

Describe the bug Despite my efforts, the version 4.2 of Nominatim I am currently using is returning fewer results than the Official Nominatim. I have updated the data multiple times but to no avail. A screenshot further down in the post should clarify my point. I specifically need this for New Zealand, but this issue is affecting me generally.

To Reproduce Steps to reproduce the behavior:

  1. docker run --restart=always --shm-size=1g -e PBF_URL=https://download.geofabrik.de/australia-oceania/new-zealand-latest.osm.pbf -e REPLICATION_URL=https://download.geofabrik.de/australia-oceania/new-zealand-updates -e NOMINATIM_TOKENIZER=icu -p 8888:8080 -v nominatim-data:/var/lib/postgresql/14/main2 --name nominatim mediagis/nominatim:4.2

  2. docker exec -it nominatim sudo mkdir /app/tokenizer

  3. docker exec -it nominatim sudo chown nominatim:nominatim /app/tokenizer

  4. docker exec -it nominatim sudo -u nominatim nominatim index

  5. docker exec -it nominatim sudo -u nominatim nominatim special-phrases --import-from-wiki

  6. docker exec -it nominatim sudo -u nominatim nominatim replication --project-dir /nominatim --catch-up

Expected behavior Same results as on Nominatim Official or more.

Screenshots & Logs

Left is my Nominatim and right is the Official Nominatim number of results. image

I have managed to resolve the issue with all the search results except for one specific result (the word "park"), which is still showing fewer results compared to the Official Nominatim. Additionally, there may be some other unidentified results that are also showing fewer results than the Official Nominatim.

https://nominatim.openstreetmap.org/ui/search.html?q=park&viewbox=172.0295%2C-43.2334%2C172.848%2C-43.8395&bounded=1

My Nominatim:

[{"place_id":2368793,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":399527371,"boundingbox":["-43.5279412","-43.5266225","172.3139922","172.316371"],"lat":"-43.52725515","lon":"172.31515535383235","display_name":"Genesis Drive Park, Edendale, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.25000999999999995},{"place_id":2236085,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":34361001,"boundingbox":["-43.5993613","-43.5986695","172.3877664","172.3886333"],"lat":"-43.5989123","lon":"172.3882004099789","display_name":"Rolleston, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":2259047,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":34361000,"boundingbox":["-43.5972056","-43.5963627","172.3842412","172.3854538"],"lat":"-43.596831949999995","lon":"172.384762675415","display_name":"Rolleston Hamlet, Rolleston, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":2279037,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":28757592,"boundingbox":["-43.6195311","-43.6180225","172.2965211","172.2987175"],"lat":"-43.61877095","lon":"172.29785126242888","display_name":"Burnham, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":2345840,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":277725756,"boundingbox":["-43.616412","-43.6141049","172.3860671","172.3881022"],"lat":"-43.6147818","lon":"172.38670453044176","display_name":"Faringdon, Rolleston, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":2406845,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":409890229,"boundingbox":["-43.5151895","-43.5146433","172.360026","172.3615361"],"lat":"-43.514920399999994","lon":"172.36078363619856","display_name":"Preston Downs, West Melton, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":2407783,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":399529613,"boundingbox":["-43.5181835","-43.5168318","172.3664261","172.3685829"],"lat":"-43.51751095","lon":"172.36756949570787","display_name":"Preston Downs, Wilfield, West Melton, Selwyn District, Canterbury, New Zealand / Aotearoa","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998}]

Official Nominatim:

[{"place_id":115054716,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":28757495,"boundingbox":["-43.6117625","-43.607492","172.3596928","172.3654116"],"lat":"-43.60959785","lon":"172.36303831918067","display_name":"Brookside Park, Rolleston, Selwyn District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.25000999999999995},{"place_id":117922458,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":38105014,"boundingbox":["-43.3269107","-43.3263174","172.6649161","172.6658044"],"lat":"-43.32660305","lon":"172.6653558315229","display_name":"Owen Stalker Park, Woodend, Waimakariri District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.25000999999999995},{"place_id":120917584,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":46947205,"boundingbox":["-43.3244803","-43.3240668","172.6693426","172.669707"],"lat":"-43.324271100000004","lon":"172.669527731711","display_name":"Skevington Park, Woodend, Waimakariri District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.25000999999999995},{"place_id":114157176,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":26951382,"boundingbox":["-43.5516048","-43.5495188","172.4680502","172.4713516"],"lat":"-43.55058465","lon":"172.46970743660808","display_name":"Templeton Domain, Templeton, Halswell-Hornby-Riccarton Community, Christchurch, Christchurch City, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":117160922,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":34988554,"boundingbox":["-43.5563937","-43.5548677","172.466872","172.4696517"],"lat":"-43.555617999999996","lon":"172.4683987572048","display_name":"Jones Reserve, Templeton, Halswell-Hornby-Riccarton Community, Christchurch, Christchurch City, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":117698616,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":35161195,"boundingbox":["-43.5465047","-43.5459944","172.4644878","172.4657336"],"lat":"-43.546275699999995","lon":"172.46511021294128","display_name":"Azalea Reserve, Templeton, Halswell-Hornby-Riccarton Community, Christchurch, Christchurch City, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":282116487,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":922787096,"boundingbox":["-43.3639262","-43.3631855","172.6685647","172.6694313"],"lat":"-43.36355675","lon":"172.6690405855664","display_name":"Bayliss Drive Reserve, Kaiapoi, Waimakariri District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":290699355,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":992602409,"boundingbox":["-43.365174","-43.364713","172.6723606","172.6730017"],"lat":"-43.36494005","lon":"172.67268162220233","display_name":"Kaiapoi, Waimakariri District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":117235260,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":34188858,"boundingbox":["-43.6018283","-43.6002223","172.375362","172.3773555"],"lat":"-43.6010264","lon":"172.37628124212253","display_name":"Parekura Reserve, Rolleston Hamlet, Rolleston, Selwyn District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998},{"place_id":117280334,"licence":"Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":34361000,"boundingbox":["-43.5972056","-43.5963627","172.3842412","172.3854538"],"lat":"-43.596831949999995","lon":"172.384762675415","display_name":"Rolleston Hamlet, Rolleston, Selwyn District, Canterbury, Nova Zelandija","place_rank":24,"category":"leisure","type":"park","importance":0.15000999999999998}]

Desktop / Server (please complete the following information):

Thanks for any help.

mtmail commented 1 year ago

nominatim.osm.org doesn't run version 4.2 but the latest master with dozens of algorithmic changes since 4.2 got released. At the same time its original import of planet data is months old and not all places are touched/updated yet with its minutely updates. It makes such comparisons hard.

megarok commented 1 year ago

nominatim.osm.org doesn't run version 4.2 but the latest master with dozens of algorithmic changes since 4.2 got released. At the same time its original import of planet data is months old and not all places are touched/updated yet with its minutely updates. It makes such comparisons hard.

Thank you for your answer. So I probably will not be able to fix this using the docker?

mtmail commented 1 year ago

Yes, unlikely you did anything wrong here. I see you imported the special phrases already. Looks like Nominatim 4.3 will find more places.