I am using django-haystack and whoosh search engine in my django app. Everything is working alright, except when I git push
new version to my OpenShift server, search stops working. It simply does not return any results. If I run ./manage.py update_index
it starts working.
I have whoosh_index/
in my .gitignore
file. I checked by git ls-files
and whoosh_index folder is not there. So my localhost files should not be overwriting any whoosh_index files.
Currently I use post_deploy
script:
echo "Executing 'python ${OPENSHIFT_REPO_DIR}wsgi/app/manage.py update_index'"
python "$OPENSHIFT_REPO_DIR"wsgi/app/manage.py update_index
But is there another way so that I do not have to update_index everytime I push new version of my app? What am I missing?