1
votes

Sitecore 8.0 Update 6 Solr 5.2.1

Implementing Solr Search with Sitecore and want to use the rebuildcore option. I have two cores in Solr. I update my Solr index config with a patch file like so:

<?xml version="1.0" encoding="utf-8"?>
<!-- Purpose: This include file defines the indexes used by the content testing feature of Sitecore when using the SOLR content search provider. -->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <contentSearch>
      <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
        <indexes hint="list:AddIndex">
           <index id="sitecore_analytics_index" type="Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
              <param desc="core">sitecore_frontend_index</param>
              <param desc="rebuildcore">sitecore_frontend_index_sec</param>
           </index>
       </configuration>
     </contentSearch>
  </sitecore>
</configuration>

But when I browse to the site I get:

Could not create instance of type: Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex. No matching constructor was found.

Its definitely the rebuildcore parameter because removing it and switching it back to SolrSearchIndex fixes the problem.

The only thing I can see is that in some articles it mentions adding something to the solr.xml file, but the solr.xml file in my setup bears no resemblance to the acticles in question.

1

1 Answers

1
votes

The SwitchOnRebuildSolrSearchIndex constructor has only 4 parameters.

You need to comment the following <param desc="group">experience</param> from the Sitecore.ContentSearch.Solr.Index.Analytics.config.

In order to know if the sitecore_analytics_index is taking 4 parameters, check it via the /sitecore/admin/showconfig.aspx since you are patching up the sitecore_analytics_index

You can also check the following link: Switch Solr Index

Thanks