Sitecore, Solr, CommerceServer config issues

just finishing converting a Sitecore 8.2 (w/ CommerceServer) instance to use Solr instead of Lucene. I have been following this article here:

http://blog.alpha-solutions.us/2016/10/how-to-use-solr-with-sitecore-8-2-with-solr-6-the-easy-way/

At the end of the setup my site / CMS give me this error:

Ошибка сервера в приложении '/'

Данный ключ отсутствует в словаре.

Описание: во время выполнения текущего веб-запроса произошло необработанное исключение. Пожалуйста, просмотрите трассировку стека для получения дополнительной информации об ошибке и о том, где она возникла в коде.

Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Ошибка источника:

Во время выполнения текущего веб-запроса было сгенерировано необработанное исключение. Информация о происхождении и местоположении исключения может быть идентифицирована с помощью трассировки стека исключений ниже.

Трассировки стека:

[KeyNotFoundException: The given key was not present in the dictionary.] System.Collections.Generic.Dictionary`2.get_Item(TKey key) +14331515 Sitecore.ContentSearch.SolrProvider.SolrFieldMap.AddFieldByFieldName(XmlNode configNode) +647

Есть идеи, что это может быть? I think maybe I am missing a config somewhere.

Заранее спасибо.

2 ответа

Решение

Проверьте файл Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config или пользовательскую конфигурацию индекса, если она у вас есть. Там будет раздел карты поля, подобный этому:

      <fieldMap type="Sitecore.ContentSearch.SolrProvider.SolrFieldMap, Sitecore.ContentSearch.SolrProvider">
        <fieldNames hint="raw:AddFieldByFieldName">
          <field fieldName="Yourfield" returnType="string" />
        </fieldNames/>
      </fieldMap>

Конфигурация для полей где-то будет неправильной.

Если у вас есть настраиваемая конфигурация индекса, убедитесь, что элемент fieldMap настроен следующим образом, а не с типом:

 <fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">

Не забудьте включить перед .

<fieldMap ref="contentSearch/indexConfigurations/defaultSolrIndexConfiguration/fieldMap">
  <typeMatches hint="raw:AddTypeMatch"></typeMatches>
  <fieldNames hint="raw:AddFieldByFieldName">
        ....
  </fieldNames>
</fieldMap>
Другие вопросы по тегам