This version of the SonarQube documentation is no longer maintained. It relates to a version of SonarQube that is not active.

See latest version
Start Free
10.1 | Instance administration | Reindexing

Was this page helpful?

Reindexing

On this page

Starting SonarQube after an upgrade or after a restore from a backup 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 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.

Running analyses during reindexing

Reindexing starts once SonarQube 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 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 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 will detect out-of-sync indices and correct them.

On the SonarQube server (Community Edition, Developer Edition, Enterprise Edition)
  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 distribution has been unzipped.
    • For a Docker installation: is the installation directory of SonarQube within your container. This path is stored in the SONARQUBE_HOME environment variable. 
  3. Start the server.
On the SonarQube 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 distribution has been unzipped.
    • For a Docker installation: is the installation directory of SonarQube 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.

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License