Hi John,
Thanks. I think using cartesian coordinates to make the calculation a dot product is a great idea and we want to try implementing it. Since you have already done this, I wanted to make sure I wasn't overlooking anything.
I believe treating the earth as a sphere leaves the z-coordinate about 0.67% too large. This probably doesn't make a big difference when the goal is to compare two (usually proximate) points, since both points will be off by similar absolute values.
Actually, if you only want to group locations into broad distance buckets(e.g. 0-5km, 5-10km, > 10 km) such as in faceted search, it probably doesn't even matter for larger distances.
Cheers,
Geoff