komoot / photon

an open source geocoder for openstreetmap data
Apache License 2.0
1.83k stars 278 forks source link

Search for postcode only, does not deliver reasonable results #658

Closed autumnus closed 2 years ago

autumnus commented 2 years ago

Hello.

Is it possible to search for postcode only? The results if I do that, are very heterogeneously.

E.g. if I search for the German postcode https://photon.komoot.io/api/?q=85452 I do not get any result with this number.

If I search https://photon.komoot.io/api/?q=85375 I do get a result but none with that postcode.

If I add an additional letter https://photon.komoot.io/api/?q=85452%20a I do get results. But it is not really a solution for me to add something to the search string.

Searches like https://photon.komoot.io/api/?q=freising&osm_tag=postcode:85375 are not supported for postcode.

I did not double-check it, but I think the results were better on previous versions.

Any suggestions to solve that problem?

Thank you

klehmann commented 2 years ago

Same here. Would be interested in a query parameter to find matches by postcode as well.

lonvia commented 2 years ago

Artificial postcode centroids are currently not imported into photon.

Feature request already covered in #310. Closing here.

autumnus commented 2 years ago

Understood. But the Question was also about the "postcode" property

In this example the desired postcode appears in "houesenumber" and in "postcode" https://photon.komoot.io/api/?q=85452%20a

In this example, where I only search for the postcode, it does not https://photon.komoot.io/api/?q=85452 Here the desired number (or parts of it) is mainly in "name"

lonvia commented 2 years ago

You can only add a postcode to a search to narrow it down. You can't search for postcodes by themselves because we don't index postcodes.