1

Currently in progress of upgrading from Sitecore 8.1 to 8.2 update 7. So I'm currently converting existing indexes from luecene to Azure search, I have done all the basic steps like, disabling all the lucene related files and enabling Azure config files. Default indexes like master, web are reindexed in Azure successfully.

Issue is with the custom configs. I created custom configs based on the default Azure configs and also other recommendations found online like,

Creating a new index in Azure Search for Sitecore 9 Helix structured

But still i get the below error when I open indexing manager in Sitecore. Please let me know if I missed any of the mandatory setting.

Server Error in '/' Application. Could not create instance of type: Sitecore.ContentSearch.Azure.CloudSearchProviderIndex. No matching constructor was found.

Index Definition:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <contentSearch>
      <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
        <indexes hint="list:AddIndex">
          <index id="contentsearch_master_index"  type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure">
            <param desc="name">$(id)</param>
             <param desc="connectionStringName">cloud.search</param>
            <param desc="totalParallelServices">5</param>
            <!-- This initializes index property store. Id has to be set to the index id -->
            <param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" />
            <configuration ref="contentSearch/indexConfigurations/ContentSearchIndexConfiguration" />
            <schemaBuilder ref="contentSearch/searchServiceSchemaBuilder" />
            <searchService type="Sitecore.ContentSearch.Azure.Http.CompositeSearchService, Sitecore.ContentSearch.Azure"/>
            <strategies hint="list:AddStrategy">
              <!-- NOTE: order of these is controls the execution order -->
              <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster" />
            </strategies>
            <commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
              <policies hint="list:AddCommitPolicy">
                <policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" />
                <policy type="Sitecore.ContentSearch.ModificationCountCommitPolicy, Sitecore.ContentSearch">
                  <Limit>1000</Limit>
                </policy>
              </policies>
            </commitPolicyExecutor>
            <locations hint="list:AddCrawler">
              <crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
                <Database>master</Database>
                <Root>/sitecore/content/home</Root>
              </crawler>
            </locations>
            <enableItemLanguageFallback>false</enableItemLanguageFallback>
            <enableFieldLanguageFallback>false</enableFieldLanguageFallback>
          </index>
        </indexes>
      </configuration>      
    </contentSearch>
  </sitecore>
</configuration>

ContentSearchIndexConfiguration:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"
               xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <settings>
      <setting name="ContentSearch.ParallelIndexing.Enabled" value="false" />
    </settings>
    <contentSearch>
      <indexConfigurations>
        <ContentSearchIndexConfiguration type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure">         
          <initializeOnAdd>true</initializeOnAdd>         
          <fieldMap type="Sitecore.ContentSearch.Azure.FieldMaps.CloudFieldMap, Sitecore.ContentSearch.Azure" >
            <fieldNames hint="raw:AddFieldByFieldName">
              <field fieldName="Page Title" searchable="YES"  retrievable="YES"  facetable="YES"  filterable="YES"  sortable="YES" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure" cloudAnalyzer="lowercase_keyword" />              
            </fieldNames>
          </fieldMap>
          <documentOptions type="Sitecore.ContentSearch.Azure.CloudSearchDocumentBuilderOptions,Sitecore.ContentSearch.Azure" />
          <indexAllFields>false</indexAllFields>
          <fieldReaders type="Sitecore.ContentSearch.FieldReaders.FieldReaderMap, Sitecore.ContentSearch"/>
          <indexFieldStorageValueFormatter type="Sitecore.ContentSearch.Azure.Converters.CloudIndexFieldStorageValueFormatter, Sitecore.ContentSearch.Azure"/>
          <indexDocumentPropertyMapper type="Sitecore.ContentSearch.Azure.Query.DefaultCloudDocumentTypeMapper, Sitecore.ContentSearch.Azure"/>

          <include hint="list:AddIncludedTemplate">
            <BasePage>{46280A5F-2BB4-41F6-BF07-4AA4B4189370}</BasePage>
          </include>

          <include hint="list:AddIncludedField">
            <fieldId>{96859430-E3F8-459C-B39D-3D7F55CE8DF7}</fieldId>
            <fieldId>{4FDABC5F-CE1C-44B2-80EF-D7F35CDD33E8}</fieldId>
            <fieldId>{171E5EA1-01CA-462D-994E-34C39904D23E}</fieldId>
          </include>
        </ContentSearchIndexConfiguration>
      </indexConfigurations>
    </contentSearch>
  </sitecore>
</configuration>

1 Answer 1

1

You have the wrong type in ContentSearchIndexConfiguration. Change from

<ContentSearchIndexConfiguration type="Sitecore.ContentSearch.Azure.CloudSearchProviderIndex, Sitecore.ContentSearch.Azure">

to

<ContentSearchIndexConfiguration type="Sitecore.ContentSearch.Azure.CloudIndexConfiguration, Sitecore.ContentSearch.Azure">

The best way to debug these kinds of issues is to compare to default index configurations - in your case Sitecore.ContentSearch.Azure.DefaultIndexConfiguration.config and Sitecore.ContentSearch.Azure.Index.Master.config

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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