Apparently django-haystack
doesn't do a particular, important bit itself. It doesn't convert a GeoDjango Point into the required "lat,lon" format, but just passes through the Point object on to the XML document.
So instead of doing this:
def prepare_location(self, obj):
try:
return obj.location.point
except AttributeError:
return None
One need to be doing this:
def prepare_location(self, obj):
try:
return "{lat},{lon}".format(lat=obj.location.point.y, obj.location.point.x)
except AttributeError:
return None
It would have been a hell of a lot easier if I'd just read the documentation...