Skip to content

Rebuilding Your Search Index

Branden Visser edited this page Aug 10, 2014 · 2 revisions

The OAE search index can be rebuilt from scratch. If a disk failure results in losing your search index, or if the search schema is updated, your entire index can be recreated invoking a single endpoint. Here's how to rebuild:

  1. curl -XDELETE http://<host of your search server>:9200/oae
    • This deletes your OAE index schema and all of its data
    • At this point, all search requests to active app servers will result in errors
  2. Start up / Restart one Hilary server
    • During the Hilary server startup process, the index will be recreated with no data
    • If you start up multiple servers concurrently, race conditions may result in failures while trying to recreate the search index
    • If you are doing this as part of a version upgrade, the server you start up should be of the upgraded version to ensure you are applying the new version of the search schema
    • If you are simply rebuilding your search index and data, you can simply restart one of your Hilary servers
  3. Start up / Restart all your other Hilary servers
    • If you are doing this as part of a version upgrade, obviously the servers starting up should be running the code of the new version
    • If this is just a rebuild while not upgrading, you can simply restart the remaining servers
    • At this point, all search queries performed by users will succeed, but will be empty. This includes search queries performed from the search page, auto-suggest (e.g., Searching for users to share content with) and Narrow by keyword search functionality within libraries. Standard Library functionality will not be affected.
  4. Log in to the global administration UI as a global administrator
  5. Navigate to Maintenance > Search, and click the "Reindex the search index" button
  6. Monitor your application logs as search re-indexing tasks are distributed around the cluster
    • There should be entries in the logs indicating that search documents are being indexed

When this log noise stops, re-indexing should be complete and search requests should now contain documents again