Search code examples
djangoherokudjango-haystackwhoosh

Search backend for Django App on Heroku


On my development app I'm using a combo of Haystack for search with Whoosh as the backend.

However, when I deploy to Heroku my search is no longer working, even after running python manage.py update_index.

Upon some research, I discovered that it's because of Heroku's read-only file system.

Is there any free solution to get around this on Heroku so that I can get search working? The addons I have looked at are ~$20/month and I'd prefer to get started with a free solution if possible.


Solution

  • It's not really practical to do this without a separate search server. Storage on Heroku's dynos are not read-only but they are ephemeral and individual to a dyno, and any production application will have at least two dynos. You might be able to set something up to run on a dyno but it's certain to be complex and fragile, whereas a third party service is turnkey. Most third party search add-ons scale with usage and many are free at the cheapest level, and if none of them fit the bill then you can always use non-Heroku search services, of which there are many.