Azure SearchでCommerceアイテムのインデックスを作成する際に例外が発生する


説明

Azure Searchを使用し、Sitecore Experience Commerceソリューションにてインデックスの再構築を実施する際、ログに以下のエラーが出力されます。

FATAL Could not add field {EA45EDF7-CD8B-433F-99A6-EBFE3C7CE3A5} : manufacturer for indexable sitecore://web/{408C6D12-16FA-4146-B0DC-65D5B06F988A}?lang=en&ver=1
Exception: System.NotSupportedException
Message: Field 'manufacturer' with value 'System.Collections.Generic.List`1[System.String]' of type 'System.Collections.Generic.List`1[System.String]' cannot be converted to type 'System.String' declared for the field in the schema.

解決策

この問題を解決するには、下記のいずれかのオプションを検討してください:

  1. 以下のように、Sitecore.Commerce.Engine.Connectors.Index.Azure.configファイルの「manufacturer」フィールド設定を変更します。
    <field fieldName="manufacturer" boost="1f" type="System.String[]" settingType="Sitecore.ContentSearch.Azure.CloudSearchFieldConfiguration, Sitecore.ContentSearch.Azure"/>
  2. インデックスの再構築を実施します。