How to Rebuild the Content Indexes From Scratch
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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 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. 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 (not Data Center)
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.