Merge lp:~xnox/ubuntu-geonames/fix-duplicates into lp:ubuntu-geonames
Status: | Merged |
---|---|
Merged at revision: | 17 |
Proposed branch: | lp:~xnox/ubuntu-geonames/fix-duplicates |
Merge into: | lp:ubuntu-geonames |
Diff against target: |
166 lines (+37/-33) 4 files modified
README (+7/-7) geoname-modpython.py (+15/-8) import-geonames.sh (+14/-17) sphinx.conf (+1/-1) |
To merge this branch: | bzr merge lp:~xnox/ubuntu-geonames/fix-duplicates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Evan (community) | Approve | ||
Review via email: mp+120911@code.launchpad.net |
Description of the change
* This fixes database import due to data format changes
* Also fixes documentation and sample config
* This updates geoname-
* This does not _fix_ cherrypy version geoname.py (as it appears to not be used / broken ?!)
Instead of doing sql query for each potential location, we build the two location lists (for normal and alternative names) and execute a single query across both tables with a UNION. As a side-effect, UNION removes duplicate entries. Thus instead of 20 New Yorks, we get only 4.
If you are deploying this, please note:
- Due to database changes it's probably best to drop the whole database, recreate it & re-import the dataset.
- And don't forget the re-index with sphinx.
Yes, the cherrypy version was the initially developed one, which was dropped for the mod_python variant.