Administer your Data Center search index

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Location of search indexes

A full copy of the Confluence indexes are stored on each Confluence node individually. A journal service keeps each index in sync.

Confluence Data Center also stores a snapshot of the search index in the shared home directory, which can be useful in a disaster recovery scenario. These snapshots are created as part of the Clean Journal Entries scheduled job which, by default, runs once per day.

Index recovery

When you start a Confluence node it will check whether its index is current, and if not, it will request a recovery snapshot from the shared home directory. If a snapshot is not available, it will generate a snapshot from a running node (with a matching build number). Once the recovery snapshot is extracted into the index directory, Confluence will continue the startup process.

If the snapshot can't be generated, or is not received in time, existing index files will be removed and Confluence will perform a reindex on that node. If your index is very large or your file system slow, you may need to increase the time Confluence waits for the snapshot to be generated using the confluence.cluster.index.recovery.generation.timeout system property.

Index recovery only happens on node startup, so if you suspect a problem with a particular cluster node's index, restart that node to trigger index recovery.

Rebuilding the search index

If you suspect there's a problem with the index on all nodes, you'll need to rebuild the index on just one node first, then copy it to the other nodes. We recommend backing up the local home directory and your shared home directory before you begin.

In this example we'll rebuild the index on node 1. You may wish to use your load balancer to direct traffic away from node 1 while the index is being rebuilt. This will prevent users from hitting a Confluence node with an incomplete index.

  1. Stop Confluence on node 1.
  2. Set the confluence.cluster.index.recovery.num.attempts system property to 0.
    This disables index recovery on node 1, so that when this node is restarted, it does not attempt to recover the bad index from the remaining nodes.  
  3. Back up then delete the following index directories on node 1.
    • <local-home>/index
    • <local-home>/journal
  4. Back up then delete the following index directory from your shared home directory.
    • <shared-home>/index-snapshots
  5. Start Confluence on Node 1. Confluence will automatically begin building the index. 
  6. Once the reindex is complete stop Confluence on both node 1 and node 2.
  7. Back up then delete the following index directories on node 2.
    • <local-home>/index
    • <local-home>/journal
  8. Copy the <node1-local-home>/index directory to node 2 local home.
  9. Start Confluence on node 2.
  10. Repeat this process for any remaining nodes.
    To avoid problems, both the node you are copying from and the node you are copying to should be stopped while copying. 
  11. Finally, stop Confluence on Node 1.
  12. Set the confluence.cluster.index.recovery.num.attempts system property back to 1.
    This re-enables index recovery on node 1.

All nodes are now running the rebuilt index.

Last modified on Sep 5, 2017

Was this helpful?

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