Skip to main content

Clean up the rebuild index


How to clean up the Solr rebuild index with the Sitecore IndexWorker CleanupRebuildIndex command.

To save space, you can delete deprecated index data from the Solr rebuild core after the live and the rebuild cores have been swapped. In Sitecore 9.3 and later, this operation is easier with a new IndexWorker command.

The new IndexWorker command initiates a cleanup of the Solr rebuild core. In case of an ongoing rebuild, the command returns the message: There is an ongoing rebuild. Finish the rebuild before cleaning the rebuild index.

To clean the Solr rebuild core:

  1. Go to the folder where the xConnect Search Indexer is located. For example: C:\inetpub\wwwroot\App_Data\jobs\continuous\IndexWorker\

  2. Execute the command: .\Sitecore.XConnectSearchIndexer.exe -cri


    The -cri argument is short for Cleanup Rebuild Index. You can also type -CleanupRebuildIndex.