Skip to content

Instantly share code, notes, and snippets.

@tackme31
Created November 14, 2019 04:07
Show Gist options
  • Select an option

  • Save tackme31/ba4a225c4d3fc6ed777f19c68cd21489 to your computer and use it in GitHub Desktop.

Select an option

Save tackme31/ba4a225c4d3fc6ed777f19c68cd21489 to your computer and use it in GitHub Desktop.
A patch file for changing Solr's core name in the configuration.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
<sitecore role:require="Standalone or ContentManagement or ContentDelivery" search:require="Solr">
<!-- Set your prefix of Solr's core. -->
<sc.variable name="SolrCorePrefix" value="prefix.of.core" />
<contentSearch>
<configuration>
<indexes>
<index id="sitecore_core_index">
<param desc="core">$(SolrCorePrefix)_core_index</param>
</index>
<index id="sitecore_fxm_master_index">
<param desc="core">$(SolrCorePrefix)_fxm_master_index</param>
</index>
<index id="sitecore_fxm_web_index">
<param desc="core">$(SolrCorePrefix)_fxm_web_index</param>
</index>
<index id="sitecore_marketing_asset_index_master">
<param desc="core">$(SolrCorePrefix)_marketing_asset_index_master</param>
</index>
<index id="sitecore_marketing_asset_index_web">
<param desc="core">$(SolrCorePrefix)_marketing_asset_index_web</param>
</index>
<index id="sitecore_marketingdefinitions_master">
<param desc="core">$(SolrCorePrefix)_marketingdefinitions_master</param>
</index>
<index id="sitecore_marketingdefinitions_web">
<param desc="core">$(SolrCorePrefix)_marketingdefinitions_web</param>
</index>
<index id="sitecore_master_index">
<param desc="core">$(SolrCorePrefix)_master_index</param>
</index>
<index id="sitecore_suggested_test_index">
<param desc="core">$(SolrCorePrefix)_suggested_test_index</param>
</index>
<index id="sitecore_testing_index">
<param desc="core">$(SolrCorePrefix)_testing_index</param>
</index>
<index id="sitecore_web_index">
<param desc="core">$(SolrCorePrefix)_web_index</param>
</index>
<!-- Enable here if SXA is installed -->
<!--
<index id="sitecore_sxa_master_index">
<param desc="core">$(SolrCorePrefix)_sxa_master_index</param>
</index>
<index id="sitecore_sxa_web_index">
<param desc="core">$(SolrCorePrefix)_sxa_web_index</param>
</index>
-->
</indexes>
</configuration>
</contentSearch>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment