osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
2.99k stars 701 forks source link

Improve handling of postcode areas #3350

Closed lonvia closed 4 months ago

lonvia commented 4 months ago

Address ranks handle a bit special for postcodes because they tell where the postcode appears in the address display, which is not necessarily related to how much area they cover. So they don't really fit into the usual rank hierarchy. This becomes a problem when computing the "address" of the postcode. If the address is restricted to places with a lower rank address, that is usually not enough. So use the search rank instead which describes the extend of the area. This is already done for postcode points.

Also make sure that the postcode always comes first in the display name.