This script is used to connect a Sitcore installation to a SearchStax' Solr instance. It does following:
- Upload the config files to Solr
- Create collections in Solr
- Configure sitecore files
Currently the script only supports following sitecore XP versions and their XConnect:
- 9.0 Update-2 (9.0.2)
- 9.1 Update-1 (9.1.1)
- 9.2 Initial Update (9.2.0)
- 9.3 Initial Update (9.3.0)
- 10.0 Initial Update (10.0.0)
- 10.0 Update-1 (10.0.1)
- 10.0 Update-2 (10.0.2)
- 10.0 Update-3 (10.0.3)
- 10.1 Initial Update (10.1.0)
- 10.1 Update-1 (10.1.1)
- 10.1 Update-2 (10.1.2)
- 10.2 Initial Update (10.2.0)
- 10.3 Initial Update (10.3.0)
- 10.4 Initial Update (10.4.0)
- Powershell v6 or above
- Powershell-yaml module
Powershell v6 can be installed by running following command via Powershell Windows.
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
Install-Module powershell-yaml
In order to run the script, first you have to update the config file
Config file is located at .\config.yml
It contains following fields:
Name | Description | Example |
---|---|---|
accountName | Name of the SearchStax account | ABCInternational |
deploymentUid | UID of the SearchStax deployment to connect to | ss123456 |
sitecorePrefix | Prefix of the sitecore installation | sitecore |
pathToWWWRoot | Path to wwwroot folder in inetpub, i.e. your %IIS_SITE_HOME% variable | C:\inetpub\wwwroot |
solrUsername | Solr username (Optional) | |
solrPassword | Solr password (Optional) | |
sitecoreVersion | Version of sitecore from the above list | 10.1.1 |
isUniqueConfigs | "true" will create a separate config file for each collection, "false" will create only 1 config which will be used by all the collections. (Note: This defaults to true for Sitecore v9.0.2) | true/false |
configurationMode | Select the part of Sitecore being configured - "XP", "XCONNECT" | XP|XCONNECT |
isSxa | "True" will add two additional collections to Solr for SXA support | true/false |
switchOnRebuild | Extended configuration for switch on rebuild. | |
switchOnRebuild.enableForPlatformIndexes | When "true", will add additional collections and aliases for Sitecore Platform Indexes (core, master, web, etc.). | true/flase |
switchOnRebuild.enableForMarketingIndexes | When "true", will add additional collections and aliases for Sitecore Platform Marketing Indexes (content testing, fxm, etc). Generally, this will always be false unless a specific use case calls for this configuration. | true/flase |
switchOnRebuild.enableForSXA | When "true", will add additional collections and aliases for Sitecore SXA Indexes. | true/flase |
switchOnRebuild.sufix | The suffix of the rebuild collection name. Default: "_rebuild" | string value |
switchOnRebuild.MainAlias | The suffix of the Main Alias name. Default: "_MainAlias" | string value |
switchOnRebuild.rebuildAlias | The suffix of the Rebuild Alias name. Default: "_RebuildAlias" | string value |
switchOnRebuild.sitecorePrefix | The prefix of the Rebuild collctions and Aliases. Default: "sitecore" | string value |
customIndexes | Allows of creation of custom indexes. Can be repeated for multiple custom indexes | |
customIndexes.core | Collection name of the custom index | string value |
customIndexes.isSwitchOnRebuild | When "true" will create additional rebuild collection and aliases | true/false |
- Configure the
config.yml
file. - Start Powershell v6 as Administrator.
- Change the execution policy to skip checking.
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
- Execute following command
.\sitecore-searchstax-connector.ps1
- Go to your sitecore page > Control Panel > Populate Solr Managed Schema > Select All > Populate
- On the same page, Indexing Manager > Select All > Rebuild
Use your CI/CD deployment to set Configuration and ConnectionString values using secure environment unique tokens/variables.
Every Sitecore Web Instance (CD/CM) needs these updates:
- Web.config:
<AppSettings><add key="search:define" value="Solr"/>
- set to Solr - App_Config/ConnectionStrings.config:
<add name="solr.search" connectionString=
Every XConnect Instance needs these updates:
- App_Config/ConnectionStrings.config:
<add name="solrCore" connectionString=
- App_Data\jobs\continuous\IndexWorker\App_Config\ConnectionStrings.config:
<add name="solrCore" connectionString=
- Use the SearchStax API and upload the Schema - App_Data\solrcommands\schema.json to both XDB Collections. - reference: https://lucene.apache.org/solr/guide/8_6/schema-api.html
You can use GitHub to submit bug reports or feature requests for Searchstax-Cloud-Connector-for-Sitecore. Please do not submit usage questions via GitHub.
Sitecore recommends updating some settings for performance optimization when working with Solr. You can find more details here: Performance optimizations when using Solr
This plugin currently does not support Sitecore SXA configuration.
If you have enabled IP filtering on your Solr instance, then make sure that you add the IP/CIDR block of your network or machine to the IP Filtering page. For more instructions on how to set up IP filtering, please follow our guide here - How To Set-up IP Filtering
The plugin will automatically default to creating a separate config directory for every collection when being used to setup Sitecore v9.0.2.
Check SearchStax Help Center