Setting up Websolr with Django on Heroku
I am trying to add WebSolr support to my django based application on Heroku. They have detailed instructions for implementing using Ruby:
https://devcenter.heroku.com/articles/websolr
But I can't figure out how to link it to Haystack. Has anyone done this?
Thank.
Edit:
I was able to implement by modifying the file settings.py
like this:
HAYSTACK_URL = os.environ.get('WEBSOLR_URL', '')
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': HAYSTACK_URL,
},
}
Then it runs:
heroku run myproject/manage.py build_solr_schema > schema.xml
Upload the content schema.xml
to the advanced websolr interface tab. And as soon as I ran
heroku run myproject/manage.py rebuild_index
the index was built.
+3
source to share
1 answer
I've updated the Heroku Websolr Docs to include a section on Django based on your question. Thanks for this. For suggestions on our docs, open a comment this method .
+1
source to share