Migrating Azure Search to SearchStax Solr Service for Sitecore

Migrating Azure Search to SearchStax Solr Service for Sitecore

Migrating Azure Search to SearchStax Solr Service for Sitecore is a fairly easy and straightforward process. In this post, we take a quick look at reasons to use Solr for Sitecore and then provide the Sitecore configuration steps to migrate from Azure search to the SearchStax Solr service.

Solr or Azure Search for Sitecore

Sitecore’s product documentation includes a page for Using Solr or Azure Search.

The most pressing reason to use Solr for Sitecore installations is that “Azure Search is deprecated in Sitecore XP 10 and will be completely removed in a later release”.

In addition, other reasons to use Solr with Sitecore include:

  • On-premise installation – Solr is the default search engine for content search and xConnect search for on-premise installations.
  • Azure search limitations – Azure Search has some limitations compared to Solr that you must evaluate for your implementation.

Steps to Migrate Azure to SearchStax Solr Service 

After setting up a SearchStax Solr Service environment, follow these 6 steps to complete the setup by editing the configuration on the Sitecore end.

Step 1 – Specifying the search provider

  1. Navigate to Web.config file
  2. Locate the <AppSettings> section and change the value of the search:define setting to Solr

<AppSettings>

<add key=“role:define” value=“ContentDelivery”/>

<add key=“search:define” value=“Solr”/>

</AppSettings>

Step 2 – Configuring the Solr endpoint.

  1. Navigate to App_Config/ConnectionStrings.config
  2. Locate <add> tag with an attribute “solr.search” and change the value of connectionString.

<add name=”solr.search” connectionString=”https://[enter Solr Endpoint from the SearchStax Dashboard];solrcloud=true” />

Step 3 – Update the connection string for xConnect

  1. Navigate to App_Config/ConnectionStrings.config for xConnect
  2. Locate <add> tag with an attribute “solrCore” and change the value of connectionString.
  3. Also, Navigate to App_Data\jobs\continuous\IndexWorker\App_Config\ConnectionStrings.config for xConnect
  4. Locate <add> tag with an attribute “solrCore” and change the value of connectionString.

<add name=”solrCore” connectionString=”https://[enter Solr Endpoint from the SearchStax Dashboard];solrcloud=true” />

Step 4 – Provide the schema.json for xConnect to SearchStax

  1. Use the Solr Schema API and upload the schema.json following the steps in the Solr Reference Guide. Premium Support customers can send us the following file App_Data\solrcommands\schema.json for xConnect, and we will upload it to Solr for you.

Step 5 – Restart Sitecore

Step 6 – Populating schema for XP

  1. Open Sitecore UI, Control Panel > Populate Solr Managed Schema
  2. Select all the indexes and click on Populate.

Step 7 – Build indexes

  1. Open Sitecore UI, Control Panel > Indexing manager
  2. Select all the indexes and click on Rebuild.

At this point, your Sitecore instance will have switched from Azure Search to Solr, the schema for XP will be populated and indexes will be rebuilt.

SearchStax Solr Service for Sitecore

As we demonstrate in this post, it is pretty easy to migrate search from Azure to SearchStax Solr service. If you have any further questions, please contact SearchStax Support.


LEARN MORE ABOUT MANAGED SOLR FOR SITECORE