How to Rebuild the Content Indexes From Scratch
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The Confluence index may become out of date or corrupted due to a variety of reasons (see Confluence Indexing Troubleshooting Guide). When this occurs, some pages may not show up in search results as expected. The purpose of this KB is to detail the steps on how to rebuild the index from scratch on Standalone Server instance or across the entire Confluence Data Center cluster while minimizing downtime.
Rebuilding the index can sometimes take a while as it is re-indexing all the content in your site. If your Confluence instance is configured with Lucene (default), be aware that while a node is rebuilding the index, users will be unable to search Confluence on that node or server instance. If you are running DC instance, you may wish to temporarily remove the node from the rotation in your load balancer so that users will not access it. Additionally, please consider performing your re-index after hours.
This is not an issue on an instance configured with OpenSearch: Confluence will rebuild the index with a blue-green approach. This means the indexing process will be run on a new index, so that the search functionality will remain unaffected on the existing index.
Solution: Confluence Server on all versions
Refer to the following KB article to rebuild the content index on your standalone server instance
How to Rebuild the Content Indexes From Scratch on Confluence Server
Solution: Confluence DC 7.7 and later
From Confluence 7.7 rebuilding the index and propagating the new index to all nodes in your cluster can be done directly through the Confluence UI.
This method requires no downtime, and you can also choose to remove the node performing the reindex from your load balancer, to further minimise any performance impact on users. Confluence will continue to use the existing index until the new index has been successfully rebuilt and propagated to each node in the cluster.
See Content Index Administration for more information.
Solution: Confluence DC 5.9 to 7.6
Rebuild the index without downtime
Refer to the following KB article to rebuild the content index without any downtime:
How to manually rebuild content index from scratch on Confluence Data Center without any downtime
Rebuild the index with downtime
Refer to the following KB article to rebuild the content index if you can afford some downtime on your instance:
How to manually rebuild content index from scratch on Confluence Data Center with downtime.