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 pertains to Confluence Server (single-server) only. If you are running Confluence Data Center (cluster), please 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 index can sometimes take a while as it is re-indexing all the content in your site. Please be aware that you will be unable to search Confluence during this time, so please consider performing your re-index after hours.

Rebuilding the Indexes through the Application

You may be able to address the issue without a complete rebuild of the index. 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.

Rebuilding the Content Indexes from Scratch

The method for rebuilding the content index from scratch will vary depending on your version of Confluence.

For Confluence 5.6 and Above

  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:

    • <confluence-home>/index/plugin - this is where the Usage Tracking plugin stores the usage statistics
    • <confluence-home>/index/edge - this is where popularity data for regular content is stored
    • <confluence-home>/index/questions-edge - this is where Confluence Questions stores popularity data

For Confluence 5.5 and Below

  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:

    • <confluence-home>/index/plugin - this is where the Usage Tracking plugin stores the usage statistics
    • <confluence-home>/index/edge - this is where popularity data for regular content is stored
    • <confluence-home>/index/questions-edge - this is where Confluence Questions stores popularity data


Description This procedure may be required when the index becomes out of sync or outdated due to various reasons
Product Confluence
Platform Server



Last modified on Oct 18, 2018

Was this helpful?

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