Skip to content

City search ignores GeoNames alternate names, so local names like "München" return nothing #5

Description

@Houtek

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions