سؤال

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.

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

Note that the dyno filesystem is writeable. Can you post the error you are getting?

You might want to take another look at Heroku add-ons. There are several Elastic Search add-ons that are in free beta or have free plans. Haystack supports Elastic Search:

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top