The built-in city search only matches GeoNames' name and asciiname. For many large cities GeoNames uses the English exonym as name, so searching the local name finds nothing: "München" → no result (GeoNames name = "Munich"), "Nürnberg" → no result ("Nuremberg"), "Milano", "Wien" and so on. Many smaller cities are stored natively ("Köln", "Lübeck") and work fine, which makes the gap hard to predict for users.
src/lib/server/geonames.ts:24-50 (parseCities1000Line) reads columns 1 (name) and 2 (asciiname) and discards column 3 (alternatenames), which holds the local and other-language forms.
- The search in
src/lib/server/repositories/travelDataRepo.ts:239-276 matches name/asciiName only.
Suggestion: keep alternate names (maybe limited to a sensible subset, since alternatenames can be long) in a searchable column and include them in the match, while still displaying the main name. A related small issue: ASCII variants without transliteration ("Lubeck" for "Lübeck") don't match either, because asciiname uses "ue" ("Luebeck"); a diacritics-insensitive comparison on the stored name would cover that.
🤖 Generated with Claude Code
The built-in city search only matches GeoNames'
nameandasciiname. For many large cities GeoNames uses the English exonym asname, so searching the local name finds nothing: "München" → no result (GeoNamesname= "Munich"), "Nürnberg" → no result ("Nuremberg"), "Milano", "Wien" and so on. Many smaller cities are stored natively ("Köln", "Lübeck") and work fine, which makes the gap hard to predict for users.src/lib/server/geonames.ts:24-50(parseCities1000Line) reads columns 1 (name) and 2 (asciiname) and discards column 3 (alternatenames), which holds the local and other-language forms.src/lib/server/repositories/travelDataRepo.ts:239-276matchesname/asciiNameonly.Suggestion: keep alternate names (maybe limited to a sensible subset, since
alternatenamescan be long) in a searchable column and include them in the match, while still displaying the main name. A related small issue: ASCII variants without transliteration ("Lubeck" for "Lübeck") don't match either, becauseasciinameuses "ue" ("Luebeck"); a diacritics-insensitive comparison on the stored name would cover that.🤖 Generated with Claude Code