Solr Prefix different from DB prefix in Sitecore XP0 Installation

Recently, encountered a scenario wherein my solr prefix had to be different from the Sitecore DB instance prefix.

Since I was installing Sitecore 9.2, decided to tinker the PS/json files to accommodate the change. Here is the depiction of the change involved:

Right side box in green depicts the files where the variable/param was added and corresponding mapping done - the data automatically flows into the left side files due to the mapping reference.


In words:

1. Leave the Prefix variable alone, add a variable named CustomSolrPrefix in the install script:


2. In the bottom of the install script, all variables will be sent to the singledeveloper.json file, the new variable  will be added to the existing list of variables passed:


3. Next open the singledeveloper.json file and accommodate the new variable there:


4. From this json file, the data is passed onto other json files related to solr, you can find the same by searching for "prefix" in singledeveloper.json and mapping to the new variable CustomSolrPrefix in all places:


Note: Don't touch anything apart from Solr prefix since we want to leave the db prefix as-is!

Now, fire-up PowerShell and run the install script and the Solr prefix must be different from DB prefix based on the value you pass in the install script.



Comments

Popular Posts