acts_as_xapian is a rails plugin for Xapian, a full text search engine. acts_as_xapian installs the search engine database inside the plugin directory, under xapiandbs. If you use Capistrano as a deployment tool and since the entire codebase is rewritten (including the plugin directory),  you will have to rebuild the entire index every time you do a deployment. What you need to do is to locate Xapian somewhere capistrano deployments will not overwrite. Fortunately you can point the Xapian DB to somewhere else more convenient. Simply create a file under config/xapian.yml. Mine looks like this:


development:
  base_db_path: xapian/database
staging:
  base_db_path: xapian/database
production:
  base_db_path: xapian/database
This is telling xapian on the development, staging and production environments to look for the database under the