5

I am converting a Lucene custom index to a SOLR custom index. I got the Cores working for the default indexes, but having trouble converting my custom indexes. I got through some of the issues, but the following error I am not sure what is causing it. Any ideas?

Unable to process 'AddFieldByFieldName' config section

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
  <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
    <indexes hint="list:AddIndex">
      <index id="news_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
        <param desc="name">$(id)</param>
        <param desc="folder">$(id)</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/defaultSolrIndexConfiguration">

          <fieldMap             type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch" ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
            <fieldNames hint="raw:AddFieldByFieldName">
              <field fieldName="headline"                storageType="YES"  indexType="TOKENIZED"    vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider">
                <analyzer type="Sitecore.ContentSearch.SolrProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.SolrProvider" />
              </field>
            </fieldNames>
5

You should change this

<fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch" ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
  <fieldNames hint="raw:AddFieldByFieldName">
    <field fieldName="headline" storageType="YES" indexType="TOKENIZED" vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider">
      <analyzer type="Sitecore.ContentSearch.SolrProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.SolrProvider" />
    </field>
  </fieldNames>

to:

<fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
  <fieldNames hint="raw:AddFieldByFieldName">
    <field fieldName="headline" returnType="string" />
  </fieldNames>

That should match the expected Solr config.

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.