I have a problem and hope to get an answer from you :-)
So, I took geonames.org and imported all their data of German cities with all districts.
If I enter \
I think a better approach is keep your data on your database (Postgres or CouchDB) and index it with a full-text search engine, like Lucene, Solr or ElasticSearch.
Having said that, there's a project integrating CouchDB with Lucene.