Re: Using Haystack without a database

78 views
Skip to first unread message

Krzysztof Szumny

unread,
Jul 2, 2013, 10:46:20 AM7/2/13
to django-...@googlegroups.com
I don't know the answer, however I am also very interested about that.

@Joseph: did you find out how to do it?

Mir Nazim

unread,
Jul 2, 2013, 12:57:37 PM7/2/13
to django-...@googlegroups.com
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-preparation

On 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.
Reply all
Reply to author
Forward
0 new messages