Hey all,

Our production system is heavily optimized for caching and nearly all parts
of queries are satisfied by filter caches. The only filter that varies a
lot from user to user is the location and distance. Currently we use the
default location field type and index lat/long coordinates as we get them
from Geonames and GMaps with varying decimal precision.

My question is: Does it make sense to round these coordinates (a) while
indexing and/or (b) while querying to optimize cache hits? Our maximum
required resolution for geo queries is 1km and we can tolerate minor errors
so I could round to two decimal points for most of our queries.

E.g. Instead of querying like this

fq=_query_:"{!geofilt sfield=user.location_p pt=48.19815,16.3943
> d=50.0}"&sfield=user.location_p&pt=48.1981,16.394


we would round to

fq=_query_:"{!geofilt sfield=user.location_p pt=48.19,16.39
> d=50.0}"&sfield=user.location_p&pt=48.19,16.39


Any feedback would be greatly appreciated.

Cheers,

Thomas

Reply via email to