I have not worked with haystack in last 6 months but I once did it like following:
class MyIndex(SearchIndex, indexes.Indexable):
author = CharField()
def prepare_author(self, obj):
return get_author_from_somewhere()
Relevant docs -
http://django-haystack.readthedocs.org/en/latest/searchindex_api.html#advanced-data-preparationOn Sunday, May 19, 2013 7:35:47 PM UTC+5:30, Joseph Lisee wrote:
Hello,
Is there a way to use Haystack without duplicating your Solr data in the Django database? I basically want to define a SearchIndex without registering it to a model.
For my use case I really just need a front end to Solr, I am not bolting search onto an existing Django application. Having to maintain all the data I am going to generate in a DB is something I don't want to do. It's much simpler to let my backend crawling and indexing system upload directly to Solr.
-Joe L.