3

I'm trying to get a custom index to work on Solr cloud (searchstax) as described by the "Switch SolrCloud indexes section of this page) on and I'm getting the error

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

Any thoughts on what's wrong with this index definition?

    <index id="clientname_content_index_master" type="Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrCloudSearchIndex, Sitecore.ContentSearch.SolrProvider"  >
    <param desc="mainalias">$(id)MainAlias</param>
    <param desc="rebuildalias">$(id)RebuildAlias</param>
    <param desc="collection">$(id)</param>
    <param desc="rebuildcollection">$(id)_temp</param>
    <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />                  
    <configuration ref="contentSearch/indexConfigurations/clientnameSolrIndexConfiguration" />
    <strategies hint="list:AddStrategy">
        <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
    </strategies>
    <locations hint="list:AddCrawler">
        <crawler type="clientname.Solr.Search.ExcludePathsItemCrawler, clientname.Solr.Search">
            <Database>master</Database>
            <Root>/sitecore</Root>
            <ExcludeItemsList hint="list">
                <FileRepository>/sitecore/media library/Files/Corporate/Publications/File_Repository</FileRepository>
            </ExcludeItemsList>                         
        </crawler>
    </locations>
    <enableItemLanguageFallback>true</enableItemLanguageFallback>
    <enableFieldLanguageFallback>true</enableFieldLanguageFallback>
</index>

Platform is Sitecore 9.2 on Azure apps service

  • Can you please share your config for contentSearch/indexConfigurations/clientnameSolrIndexConfiguration? – Vincent Lui Dec 30 '19 at 19:31
5

You're missing name param xml element.

Documentation says:

The configuration is similar to what is described for Solr, except for this:

And then that part of your configuration is added.

You need index configuration with the following parameters:

string name,
string mainalias,
string rebuildalias,
string activecollection,
string rebuildcollection,
IIndexPropertyStore propertyStore

Just add

<param desc="name">index_name</param>

as the FIRST <param> tag before your other parameters.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.