My new blog present here.

Featured Post

Insights into Sitecore Search: A Definitive Introduction

A key component of digital experience management is effective information retrieval. A simplified approach is required for websites, applications, and platforms containing a lot of material so that consumers can easily get the data they require. This need is met by Sitecore, a well-known name in the field of digital experience platforms (DXPs), which provides powerful and comprehensive search functionality. We will travel into the realm of Sitecore Search in this article, learning about its capabilities, architecture , and the enormous value it offers both developers and end users. Introduction to Sitecore Search    A headless content discovery platform powered by AI , Sitecore Search enables you to build predictive and custom search experiences across various content sources. To extract and index you

Sitecore Error Troubleshooting: Sitecore Solr Connectivity Issue:: Part-3


Sitecore 9.1 and Solr Connection issue in Sitecore Azure PaaS XP Scaled Topology or Sitecore on-premise XP Distributed Topology

In my previous articles related to Sitecore Solr connectivity issue, I already explained about:
Part-1: Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2: How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology

In this blog post, we will learn how to validate the Solr configuration in Sitecore Azure PaaS XP Scaled Topology or Sitecore on-premise XP Distributed environment

Architecture Details:

Sitecore XP Scaled environment created.
Solr master url with 02 slaves being used.
The Solr master url is https://12.832.11.201:8983/solr
The Solr load balancer url is https://11.832.11.201
Solr slave’s behind the Load Balancer, so CD will use the Load Balancer url.

Proposed Solution:
I would like to thank DAVID RUCKMAN (@druckman), for sharing knowledge on “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, this article helps in identifying the Sitecore Solr connectivity issue.

By following “Switch Sitecore 9 From Azure Search to Solr -- Step-By-Step Instructions”, I tried changing the configuration one-by-one and come up with set of configurations which needs to be changed to make connectivity between Sitecore XP Scaled and Solr.

Change the Sitecore configuration in CM or CM App Service:
1. Go to the [WebRoot]\Web.config:
  • Remove the <add key="search:define" value="<Azure or Lucene>" /> and add <add key="search:define" value="Solr" /> 
2. Open [WebRoot]\App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config:
  • REMOVE or COMMENT below entries:
    • <setting name="ContentSearch.Solr.ServiceBaseAddress" value="https://<URL TO YOUR SOLR INSTANCE>:<PORT NUMBER>/solr" />
    • <setting name="ContentSearch.SearchMaxResults" value="500" />
3. Go to [WebRoot]\App_Config\ConnectionStrings.config:
        I. Search for "solr.search" and update the Solr url with Master Solr Url: -
               <add name="solr.search" connectionString="< URL TO YOUR SOLR MASTER  INSTANCE>:<PORT NUMBER>/solr" />
       II. Search for "cloud.search",  it SHOULD BE EMPTY or COMMENTED :
<add name="cloud.search" connectionString="" />
       III. Remove the  “<add name="collection.search" ... />”

Change the Sitecore configuration in xc-Collect Website/App Service:
1. Disable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml 
2. Enable file [WebRoot]\App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml 4. Enable file [WebRoot]\App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config : 
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: - 
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER  INSTANCE>:<PORT NUMBER>/solr/xdb" />

Change the Sitecore configuration in xc-Ref Data web site/App Service:
1. Disable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
2. Enable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
4. Enable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config :
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: -
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR MASTER SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />


Change the Sitecore configuration in xc-Search web site/App Service:
1. Disable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
2. Enable file [WebRoot]\ App_data\config\sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
3. Disable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
4. Enable file [WebRoot]\ App_data\config\sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
5. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.AzureSearch.xml
6. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.IndexReader.SOLR.xml
7. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\CollectionSearch\sc.Xdb.Collection.WebClient.SOLR.xml
8. Disable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.AzureSearch.xml
9. Enable file [WebRoot]\ App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml
10. Update the file [WebRoot]\App_Config\ConnectionStrings.config :
      I. Remove the  “<add name="collection.search" ... />”
      II. Add <add name="solrCore" connectionString="< URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr/xdb" />
11. Upddate the file [WebRoot]\App_data\jobs\continuous\IndexWorker\App_config\ConnectionStrings.config: -
       I. Remove the  “<add name="collection.search" ... />”
       II. Add <add name="solrCore" connectionString="< URL TO YOUR MASTER SOLR INSTANCE>:<PORT NUMBER>/solr/xdb" />


Change the Sitecore configuration in CD Website/App Service:
1. Go to the [WebRoot]\Web.config:

Remove the <add key="search:define" value="<Azure or Lucene>" /> and add <add key="search:define" value="Solr" />
2. Open [WebRoot]\App_Config\Sitecore\ContentSearch\Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config:

REMOVE or COMMENT below entries:
<setting name="ContentSearch.Solr.ServiceBaseAddress" value="https://<URL TO YOUR SOLR MASTER INSTANCE>:<PORT NUMBER>/solr" />
<setting name="ContentSearch.SearchMaxResults" value="500" />
3. Go to [WebRoot]\App_Config\ConnectionStrings.config:
        I. Search for "solr.search" and update the Solr url with Solr Slave Url with Port Number or Solr Load Balancer Url without Port Number: -
               <add name="solr.search" connectionString="< URL TO YOUR SOLR SLAVE INSTANCE>:<PORT NUMBER>/solr" />
       II. Search for "cloud.search",  it SHOULD BE EMPTY or COMMENTED :
       <add name="cloud.search" connectionString="" />
       III. Remove the  “<add name="collection.search" ... />”



After performing configuration changes:
Restart the Sitecore instances or Sitecore Azure App Services.
Login into Sitecore instance and access the Sitecore Launch Pad >  Control Panel > Indexing > Indexing Manager and verify that Solr indexes are loading or not.
If Solr indexes are loading then re-build all the indexes and check count of documents (numDocs) in each Sitecore Solr core at Solr instance.

Note:- 
1.Please update file name .disabled at the end to disable the files
2.remove .disabled from the file name to enable the file

Issue Listing:
Sitecore 9.1 (IaaS and Azure PaaS) + Solr (IaaS) Connectivity
Sitecore Solr Connections
Sitecore Solr Index Configurations
Setting up Solr with Sitecore
Configure Sitecore to work with Solr
Provisioning Sitecore environment using Solr connection
Sitecore.contentsearch.solr.indexes.config
Switch Search Provider in Sitecore

 Sitecore Solr connectivity issue:
• Part-1 : Sitecore Solr connectivity issue details with ways to check the connectivity
Part-2 : How to resolve Sitecore Solr connectivity in Sitecore XP Single Topology


Comments

Popular posts from this blog

Sitecore GraphQL Queries

Twenty 20 Masti:

Sitecore Experience Edge GraphQL Queries