From df2c3a653264cd8e6605804445f81a535acc8555 Mon Sep 17 00:00:00 2001 From: Michael Allen Date: Sun, 4 Dec 2016 21:41:13 +0000 Subject: [PATCH] Document how to rebuild the whoosh index --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index f536c58..bd79ba6 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,33 @@ With both commands, if you have overridden the database name (using the `LIGHTHOUSE_DB` environment variable), you will need to replace `lighthouse` with that. +### Rebuild the Whoosh index + +Once restored you will need to rebuild the search index, so that searching +yields results that aren't out of date. + +The easiest way to do this to trigger the `Deploy Lighthouse` job on Jenkins, +as rebuilding the index is a standard part of deployment. + +To do this manually: + +1. SSH in to the lighthouse box + + > ssh ec2-user@www.lighthouse.pw + +2. Become the `lighthouse` user + + ec2-user@~ > sudo su - lighthouse + +3. Activate the virtualenv that contains lighthouses dependencies + + lighthouse@~ > cd /opt/lighthouse/app + lighthouse@app > source /opt/lighthouse/virtualenv/activate + +4. Run the `rebuild_index` command + + lighthouse@app > python manage.py rebuild_index + ## How to modify static assets Lighthouse contains some "static" content assets which are not generated at