Santa

Let’s Talk

We would love to hear from you. Want to know more about
our services or have any questions? Say Hi!

How to configure SOLR cores in Sitecore SXA?

July 24, 2023
How to configure SOLR cores in Sitecore SXA?
Keyur Garala
Keyur Garala
Sitecore Certified Solutions Architect
how-to-configure-solr-cores-in-sitecore-sxa

Sitecore Experience Accelerator (SXA) is a framework that helps you create websites faster and easier with Sitecore. SXA provides a set of reusable components, templates, layouts, and themes that you can use to build your site without writing any code.

It also supports multisite and multilingual and allows you to edit your website in the Experience Editor.

SXA uses Solr as the default search engine and provides a set of search components that you can add to your website. For adding SOLR core to the SXA website please refer below steps.

  1. Add SXA specific Solr cores.

  2. Goto “C:\Solr\solr85solr-8.8.2\server\solr” and copy twice “{YourSitecoreInstanceName}_master_index” folder.

    how-to-configure-solr-cores-in-sitecore-sxa-1
  3. Then, rename new folders as follows “{SitecoreInstanceName}_sxa_master_index” and “{SitecoreInstanceName}_sxa_web_index”:

    how-to-configure-solr-cores-in-sitecore-sxa-2
  4. Navigate to both folders and remove data folder and core.properties file as shown below:

    how-to-configure-solr-cores-in-sitecore-sxa-3
  5. Only conf folder should be left in both newly created folders as below:

    how-to-configure-solr-cores-in-sitecore-sxa-4
  6. Open Solr portal in your browser.

  7. Click on Core admin found in the left menu -> Add Core -> Specify your Site instance name “{YourSitecoreInstanceName}_sxa_master_index” in name and instanceDir fields -> hit Add Core button:

    how-to-configure-solr-cores-in-sitecore-sxa-5
  8. Repeat step 7 for “{YourSitecoreInstanceName}_sxa_web_index” as well.

  9. Goto “C:\inetpub\wwwroot\sxa102demosc.dev.local\App_Config\Modules\SXA\z.Foundation.Overrides” file (paths can vary based on your installation process) and change core parameters highlighted below to your created Solr cores:

    how-to-configure-solr-cores-in-sitecore-sxa-6
  10. To prevent config files issues, it’s better practice to create a patch config file and not to edit the config files directly.

    Once above settings is done then restart your CMS application and follow below steps in CMS.

    Populate Solr Managed Schema for SXA indexes:

    1. From the Launchpad, open the Control panel.

    2. Open Populate Solr Managed Schema -> select SXA related indexes as shown below and -> click Populate button.

      how-to-configure-solr-cores-in-sitecore-sxa-7
    3. The Output should be as follows:

      how-to-configure-solr-cores-in-sitecore-sxa-8

Rebuild the indexes:

  1. Open Control panel from the Launchpad.

  2. Open Indexing manager from Indexing section -> select SXA related indexes as shown below and -> click Rebuild button:

    how-to-configure-solr-cores-in-sitecore-sxa-9
  3. The Output should be as follows:

    how-to-configure-solr-cores-in-sitecore-sxa-10

Sitecore Experience Accelerator has been successfully installed in Sitecore 10.2, you can start Content editing after adding/creating a tenant and a site.


YOU MAY ALSO LIKE