Here is a patch to add spacial search to haystack with Solr backend:
http://1cafe.fr/spacial.diff.txt
Patch is build on django-haystack-1.0.1-final.tar.gz.
This patch works with the jteam spacial plugin for Solr:
http://www.jteam.nl/news/spatialsolr
Here is an exemple of a spacial search, for instance searching all the
result within 3km from a center point:
SearchQuerySet().spacial(lat=49.4338870, long=1.0888390, radius=3,
unit='km').order_by('-geo_distance')
Of course this patch is a quick and dirty fix for people who wants to
run spacial queries with haystack. It works well for me, so may be it
will for others.
Regards,
xav
and spatial queries should be done like this:
SearchQuerySet().spatial(lat=49.4338870, long=1.0888390, radius=3,
unit='km').order_by('-geo_distance')
xav
For those complaining about the down link, patch can be found at :
http://friendpaste.com/6y88Nn4tCyRkBmxOOdg8He
Regards,
xav