Frequently Asked Questions - SearchStax

The SearchStax® Frequently Asked Questions page includes the following approved question and answer about our Apache Solr Cloud services.

Can we use Sitecore's SwitchOnRebuild with SearchStax?

Users sometimes ask about using Sitecore's "Switch on Rebuild" type configuration. This uses a secondary core which can be read while the primary core is being rebuilt.


Solr's core swapping depends on its underlying SWAP feature, but SolrCloud uses the CREATEALIAS feature to do the same thing. Using SWAP with SolrCloud can damage your index.

SearchStax deployments are all SolrCloud deployments. Use CREATEALIAS with SearchStax.

Sitecore's SwitchOnRebuild feature comes in two flavors that mirror the distinction between SWAP and CREATEALIAS. These passages are from Switch SolrCloud Indexes in the Sitecore documentation. Note the distinction between SwitchOnRebuildSolrSearchIndex (for Solr) and SwitchOnRebuildSolrCloudSearchIndex (for SolrCloud):

You use the SwitchOnRebuildSolrSearchIndex class to rebuild and switch Solr indexes. This implementation uses the Solr SWAP command to swap the active and the rebuild indexes.

The mechanism for maintaining and switching two indexes is different when use SolrCloud. The implementation in the SwitchOnRebuildSolrCloudSearchIndex class uses collection aliases: it uses the active alias for search and update operations and the rebuild alias for rebuild operations. When a rebuild operation finishes, the CREATEALIAS command swaps the collections the aliases reference.

So the answer is, "Yes, you can do it." Just be sure to use the SolrCloud version with SearchStax.

We love to answer questions!

Please contact the SearchStax Support Desk immediately if you have any question about Solr Cloud deployments.

Return to Frequently Asked Questions.