Skip to content

Conversation

@lonvia
Copy link
Member

@lonvia lonvia commented Dec 1, 2025

Country tokens were the only ones not yet having the normalised form of the word to allow rematching against the query. This has repeatedly caused country results being pushed to the top of the result list when matching against some odd translation of the country name.

This PR shifts information in the country token around a bit. 'word' now contains the normalized name just like in all the other token types. The country name has moved into the info field.

There is a migration to switch to the new token format but it will only insert internal country names. If you want to also have the names imported from OSM run the SQL query update placex set indexed_status = 2 where class = 'boundary' and type = 'administrative' and rank_address = 4 followed by a nominatim --index.

Fixes #3879.

Country tokens now follow the usual convetion of having the
normalized version in the word column and the extra info about the
country code in the info column.
@lonvia lonvia force-pushed the country-names-with-word-lookup branch from c9198a5 to 3a0c4ae Compare December 1, 2025 12:13
@lonvia lonvia force-pushed the country-names-with-word-lookup branch from 3a0c4ae to 23db1ab Compare December 1, 2025 13:24
@lonvia lonvia merged commit 96d04e3 into osm-search:master Dec 1, 2025
8 checks passed
@lonvia lonvia deleted the country-names-with-word-lookup branch December 1, 2025 13:54
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.

Wrong result for אודם

1 participant