Friday, November 3, 2017

Sitecore SOLR AddFieldByFieldName The given key was not present in the dictionary

When setting up a new custom index for SOLR in Sitecore 9, I noticed the following error after adding the AddFieldByFieldName section.
The given key was not present in the dictionary
I had incorrectly added the section as a type:
fieldMap type="Sitecore.ContentSearch.SolrProvider.SolrFieldMap, Sitecore.ContentSearch.SolrProvider"
When it should have been added as a ref:
fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap"
Fixing this line up, the index would build correctly and the error disappeared. 

No comments:

Post a Comment