Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of postcode areas #3350

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

lonvia
Copy link
Member

@lonvia lonvia commented Feb 28, 2024

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.

The rank_address reflects the position in the address which is
usually lower than what one would expect for a postcode area.
Don't add the postcode again in the list of address details and
make sure that the result proper always comes before anything else
independently of the address rank.
@lonvia lonvia merged commit dd2c794 into osm-search:master Feb 28, 2024
9 checks passed
@lonvia lonvia deleted the improve-postcode-handling branch February 28, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant