Install a search provider in a scaled solution

Version: 10.5

Sitecore Experience Platform supports Solr as the search provider for both content search and analytics search.

  • In PaaS solutions, you can use Solr, or SolrCloud in Azure.
  • In on-prem solutions, you can use Solr or SolrCloud. In on-premise solutions, the Sitecore Installation Framework requires Solr to deploy.
Note

Support for Lucene was removed in Sitecore Experience Platform 9.3.0.

Support for Azure Search was removed in Sitecore Experience Platform 10.2.0.

For local testing and development, you can set up a self-signed certificate. For more information about creating a self-signed certificate, see the Apache Solr Reference guide.

Install the Solr Certificate

You must install the Solr certificate on the servers that perform the following roles:

  • Content Management

Deploy the ConfigSets to SolrCloud in an on-prem solution

The SolrCloud deployment configuration template for SIF deploy the required ConfigSets to remote Zookeeper and SolrCloud installations.

Prerequisites

Before you deploy the ConfigSets to SolrCloud, you must:

  • Download the Solr 10.0 for Windows installation archive and save it locally, for example, C:\solr.

    You use this file to access the solr.cmd.zookeeper command line interface. If you have already installed the required version of Solr you can skip this step.

    To use SolrCloud, you do not need to install Solr as a local service.

  • Install SolrCloud 10.0.

  • Locate the Sitecore 10.X.X rev. XXXXXX (WDP XM1 packages).zip package and in the XM1 Configuration files 10.X.X rev. XXXXXX.zip file extract the following configuration files:

    • SolrCloud-SitecoreConfigSets.json

Install the SolrCloud

To deploy SolrCloud:

  1. In a Powershell command line, go to the folder where you saved the installation configuration files and run the following cmdlet with the appropriate parameters:

    Install-SitecoreConfiguration `
       -Path .\Solr-SingleDeveloper.json `
       -SolrInstallRoot <path to solr binaries, default C:\> `
       -SolrDomain <Solr domain name, default: localhost> `
       -SolrPort <Solr port, default: 8983> `
       -SolrAdminUserName <username for solr admin, default: admin> `
       -SolrAdminPassword <password for solr admin, optional. Random password is generated if left empty> `
       -SolrCloud true

Install the Sitecore content ConfigSets

To deploy the Sitecore content ConfigSets to SolrCloud:

  1. In a PowerShell command line, go to the folder where you saved the installation configuration files and run the following cmdlet with the appropriate parameters:

    Install-SitecoreConfiguration `
       -Path .\SolrCloud-SitecoreConfigSets.json `
       -SolrInstallRoot <path to solr binaries from step 1, default: c:\> `
       -SolrDomain <zookeeper domain name, default: localhost> `
       -ZookeeperPort <zookeeper port, default: 9983>  `
       -CorePrefix <prefix for configSet names, default: sitecore> `
       -DefaultConfigSetName <config set to use as base, default: _default>
  2. Verify that the ConfigSets are deployed to Zookeeper.

Deploy the SolrCloud content collections

To deploy the SolrCloud content collections:

  1. In a PowerShell command line, go to the folder where you saved the installation configuration files and run the following cmdlet with the appropriate parameters:

    Install-SitecoreConfiguration `
       -Path .\SolrCloud-Sitecore-Collections.json `
       -SolrDomain <solrcloud domain name, default: localhost> `
       -SolrPort <solrcloud port, default: 8983> `
       -SolrAdminUserName <admin’s username, default: admin> `    
       -SolrAdminPassword <admin’s password, required to be provided, can be taken from installation above> `
       -SolrConnectionUserName <user name used in connection string, default to corePrefix if not provided> `  
       -SolrConnectionPassword <user password used in connection string, default to random generated password if not provided> `   
       -CorePrefix <prefix for collection name, default: sitecore> `
       -NumShards <number of shards for the collection, default: 1> `
       -ReplicationFactor <number of replicas for each shard, default: 1> `
       -AutoCreateFields <automatically add new fields to schema, default: false>
    Note

    SolrConnectionUserName and SolrConnectionPassword should be noted to be used in subsequent role’s deployment.

  2. Verify that the following CMS collections are deployed to SolrCloud:

    • <prefix>_core_index
    • <prefix>_master_index
    • <prefix>_web_index
    • <prefix>_marketingdefinitions_master
    • <prefix>_marketingdefinitions_web
    • <prefix>_marketing_asset_index_master
    • <prefix>_marketing_asset_index_web
    • <prefix>_testing_index
    • <prefix>_suggested_test_index
    • <prefix>_fxm_master_index
    • <prefix>_fxm_web_index
    • <prefix>_personalization_index

Deploy Sitecore with SolrCloud

After you have configured SolrCloud, before you install Sitecore XP, you must ensure that the SolrCloud parameter is configured correctly in the connection string.

To install the Sitecore platform with a connection to the newly configured SolrCloud instance, in the SIF deployment script, in the SolrUrl parameter, add the ;solrCloud=true setting.

If you are going to deploy the server roles separately, update the SolrUrl parameter in following deployment configuration files:

  • sitecore-XM1-cd.json
  • sitecore-XM1-cm.json
Note

When you use SolrCloud, you do not need to deploy the sitecore-solr.json template.

If you have suggestions for improving this article, let us know!