Merge lp:~mterry/geonames/search-countries-too into lp:geonames
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~mterry/geonames/search-countries-too | ||||
Merge into: | lp:geonames | ||||
Diff against target: |
73 lines (+34/-9) 2 files modified
src/geonames-query.c (+24/-9) tests/test-geonames.c (+10/-0) |
||||
To merge this branch: | bzr merge lp:~mterry/geonames/search-countries-too | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Geonames developers | Pending | ||
Review via email: mp+303864@code.launchpad.net |
Commit message
Allow searching for a string that includes the country name, like "London, United Kingdom".
Description of the change
This is a quick and dirty fix, just to match previous behavior of Ubuntu System Settings before they switched to geonames (see linked bug).
Our search was never robust (only matched exact city prefixes). Ideally we'd do something really clever when searching.
But I didn't want to take on a whole search engine project, so I instead just tacked the country name onto the city name with a comma and matched against that.
Searches like "englishname, translatedname" or "translatedname, englishname" won't match correctly. For the same reason above, I didn't want to complicate our searching too much with combinatorial explosions of possibilities next time we tweak the algorithm.
Unmerged revisions
- 27. By Michael Terry
-
Allow searching against country too