Administer your Data Center search index
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.
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.
- Stop Confluence on node 1.
- Set the
confluence.cluster.index.recovery.num.attemptssystem 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.
- Back up then delete the following index directories on node 1.
- Back up then delete the following index directory from your shared home directory.
- Start Confluence on Node 1. Confluence will automatically begin building the index.
- Once the reindex is complete stop Confluence on node 2.
- Back up then delete the following index directories on node 2.
- Copy the
<node1-local-home>/indexdirectory to node 2 local home.
- Start Confluence on node 2.
- Repeat this process for any remaining nodes.
- Stop Confluence on Node 1.
- Set the
confluence.cluster.index.recovery.num.attemptssystem property back to 1.
This re-enables index recovery on node 1.
All nodes are now running the rebuilt index.
Was this helpful?
Thanks for your feedback!