How to Rebuild the Content Indexes From Scratch on Unclustered Confluence
This KB covers the process when Confluence Data Center is running on a single node only. If you are running Confluence in a cluster, see How to Rebuild the Content Indexes From Scratch instead.
Summary
Rebuilding the content indexes is required when the index gets out of sync. (See Confluence Indexing Troubleshooting Guide.)
Rebuilding the indexes through the application UI
When you experience search problems within your single-node Confluence instance, or cannot find things after performing an upgrade, one simple solution that can help you locate your content is to manually rebuild the index, as described in Content Index Administration.
This method ensures Confluence will continue to use the existing index, until the new index has been rebuilt successfully. Your users can continue to search and use Confluence, but may experience some performance degradation. This is because rebuilding the index significantly increases the load on your server.
We recommend you try this method first.
Rebuilding the content indexes from scratch
The method for rebuilding the content index from scratch will vary depending on your version of Confluence.
Rebuilding the index using this method can take a significant amount of time as it is re-indexing all the content in your site.
Please be aware that people will be unable to search Confluence during this time and parts of the application, such as the activity feeds in the dashboard and some macros, will not be functional. Consider performing your re-index after hours.
For Confluence 5.6 and later
- Shut down Confluence
- Perform a safety backup of the following two directories to a different location:
<confluence-home>/index/
<confluence-home>/journal/
Delete the two original directories:
<confluence-home>/index/
<confluence-home>/journal/
(Optional): If your
journalentry
table is very large (10000+ entries) we recommend that you delete the contents of this table to shorten the rebuild time.First, run the following SQL query to see if you have more than 10000 entries:
SELECT COUNT(entry_id) FROM journalentry;
If so, run the following to delete the contents of this table:
DELETE FROM journalentry;
- Start Confluence
- Navigate to Confluence Admin > Content Indexing and click "Rebuild"
(Optional): If desired, restore the following directories from your backup from Step 2, see Popular content missing after reindexing from scratch for instructions
For Confluence 5.5 and earlier
- Shut down Confluence
- Perform a safety backup of the following directory:
<confluence-home>/index/
Delete the original directory:
<confluence-home>/index/
(Optional): If your INDEXQUEUEENTRIES table is very large (10000+ entries) we recommend that you delete the contents of this table to shorten the rebuild time.
First, run the following SQL query to see if you have more than 10000 entries:
SELECT COUNT(entryid) FROM INDEXQUEUEENTRIES;
If so, run the following to delete the contents of this table:
DELETE FROM INDEXQUEUEENTRIES;
- Start Confluence
- Navigate to Confluence Admin > Content Indexing and click "Rebuild"
(Optional): If desired, restore the following directories from your backup from Step 2, see Popular content missing after reindexing from scratch for instructions