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.
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.