Setting up Websolr with Django on Heroku

Go To StackoverFlow.com

3

I'm trying to add WebSolr support to my django powered app on Heroku. They have detailed instructions for an implementation using Ruby:

https://devcenter.heroku.com/articles/websolr

But I can't figure out how to tie it up to Haystack. Has any one done this?

Thanks.

Edit:

I was able to implement by modifying my settings.py file as:

HAYSTACK_URL      = os.environ.get('WEBSOLR_URL', '')
HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
        'URL': HAYSTACK_URL,

    },
}                                       

Then running:

heroku run myproject/manage.py build_solr_schema > schema.xml 

And uploading the contents of schema.xml to the advanced tab of the websolr interface. And once I ran

heroku run myproject/manage.py rebuild_index

the index was built.

2012-04-04 19:47
by user1290641
Hey, thanks for the question/comments. Anything we might add to the official docs to help clarify this? Email us at info@onemorecloud.com - Nick Zadrozny 2012-04-08 01:51


1

I've updated the Heroku Websolr Docs to include a section on Django, based on your question. Thanks for that. For suggestions on our docs, drop a comment on this gist.

2012-04-26 17:25
by Nick Zadrozny
Ads