How to Rebuild the Content Indexes From Scratch on Confluence Server

Still need help?

The Atlassian Community is here for you.

Ask the community

This KB covers the process when Confluence is running on a single server only. If you are running Confluence in a cluster, see How to Rebuild the Content Indexes From Scratch on Confluence Data Center instead.

Purpose

This procedure may be required when the index becomes out of sync or outdated due to various reasons (see Searching and Indexing Troubleshooting).

Rebuilding the indexes through the application UI

When you experience search problems within your 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

  1. Shut down Confluence
  2. Perform a safety backup of the following two directories to a different location:
    • <confluence-home>/index/
    • <confluence-home>/journal/
  3. Delete the two original directories:

    • <confluence-home>/index/
    • <confluence-home>/journal/
  4. (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.

    Click here for instructions...
    1. First, run the following SQL query to see if you have more than 10000 entries:

      SELECT COUNT(entry_id) FROM journalentry;
    2. If so, run the following to delete the contents of this table:

      DELETE FROM journalentry;
  5. Start Confluence
  6. Navigate to Confluence Admin > Content Indexing and click "Rebuild"
  7. (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

  1. Shut down Confluence
  2. Perform a safety backup of the following directory:
    • <confluence-home>/index/
  3. Delete the original directory:

    • <confluence-home>/index/
  4. (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.

    Click here for instructions...
    1. First, run the following SQL query to see if you have more than 10000 entries:

      SELECT COUNT(entryid) FROM INDEXQUEUEENTRIES;
    2. If so, run the following to delete the contents of this table:

      DELETE FROM INDEXQUEUEENTRIES;
  5. Start Confluence
  6. Navigate to Confluence Admin > Content Indexing and click "Rebuild"
  7. (Optional): If desired, restore the following directories from your backup from Step 2, see Popular content missing after reindexing from scratch for instructions


DescriptionThis procedure may be required when the index becomes out of sync or outdated due to various reasons
ProductConfluence
PlatformServer



Last modified on Nov 23, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.