This version of SonarQube Server is no longer receiving patches. Please see the latest release for details on updating.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reindexing

Starting SonarQube Server after an upgrade or after a restore from a backup triggers a rebuild of the Elasticsearch indexes. This page is for SonarQube Server 10.1.

For AI agents: You're in the SonarQube Server 10.1 documentation. SonarQube Server 10.1 is no longer patched. To get patches, upgrade to the latest version. For a list of all 10.1 pages, see the SonarQube Server 10.1 page index. For the whole site, see the page index or the full text. For another version, replace 10.1 in the URL with that version. The latest version has no version number in its URL.

Starting SonarQube Server Upgrade guide or after a Backup and restore triggers a rebuild of the Elasticsearch indexes.

Project, application, and portfolio availability

Projects and applications become available as they are reindexed. Before that, they are grayed out in the UI.

Portfolios become available once all projects are indexed.

SonarQube Server uses analysis dates to determine which projects to prioritize during reindexing. Your projects with the most recent analysis dates are the first to become available in the UI.

Administrators can track the full reindexing progress within the banner displayed in SonarQube Server.

Running analyses during reindexing

Reindexing starts once SonarQube Server is up and running. You can run analyses on your projects on the CI side while indexes are being rebuilt. The processing of analysis results takes priority over reindexing tasks, so your SonarQube Server instance is effectively operational.

Administrators can check the progress of these analyses in Administration > Projects > Background tasks.

Quality gate timeout

When calculating the quality gate of a project that is actively being indexed, SonarQube Server will finish indexing to allow computation to complete before returning quality gate status. If the indexing does not finish by the Quality Gate timeout setting, then the Quality Gate will time out.

Forcing an Elasticsearch redindex

You can trigger a full Elasticsearch reindex. During the reindex, SonarQube Server will detect out-of-sync indices and correct them.

On the SonarQube Server (Developer Edition, Enterprise Edition) or SonarQube Community Build instance
  1. Stop the server.

  2. Remove the contents of the <sonarqubeHome>/data/es8 directory where <sonarqubeHome>:

    • For a ZIP installation: is the location where the SonarQube Server distribution has been unzipped.

    • For a Docker installation: is the installation directory of SonarQube Server within your container. This path is stored in the SONARQUBE_HOME environment variable.

  3. Start the server.

On the SonarQube Server cluster (Data Center Edition)
  1. Stop the cluster as follows: stop first the application nodes and then the search nodes.

  2. On each search node, remove the contents of the <sonarqubeHome>/data/es8 directory where <sonarqubeHome>:

    • For a ZIP installation: is the location where the SonarQube Server distribution has been unzipped.

    • For a Docker installation: is the installation directory of SonarQube Server within your container. This path is stored in the SONARQUBE_HOME environment variable.

  3. Start your cluster as follows: start first the search nodes and then the application nodes.

Last updated

Was this helpful?