Understanding the Nominatim data structures

I’m trying to better understand the Nominatim reverse-geocoding code.

  1. From my understanding of reverse-geocoding, typically there is a spatial index (like an R-tree) with locations at the leaves. Looking through the source code, I don’t see any spatial index functions. Is this index handled entirely by the SQL database?

  2. If I wanted to see how many entries/rows are needed to perform reverse-geocoding for one city, say Seattle, what table would I look into? Would I do just something like SELECT COUNT(*) FROM TABLE WHERE CITY LIKE ‘SEATTLE’ or something?

maybe it is better to ask such a question at the OSM developer mailing list … see http://wiki.openstreetmap.org/wiki/Mailing_lists