If there are two or more fields with the same name but different types that need to be indexed, this causes issues with Azure Search. In this case, Sitecore field types are mapped to different Azure Search Edm types. As a result, when rebuilding an index, Sitecore XP tries to add values of different types to the same field, which is not supported by Azure and causes a conflict between the type of the incoming field and the field in the schema. The following error is logged:
FATAL Could not add field {3C05A626-A3B1-4CBC-BF67-198537A13E20} : default value for indexable sitecore://web/{1514EA8F-E397-4443-A29D-722D99E33493}?lang=en&ver=1 Exception: System.ApplicationException Message: Conflict between type of incomming field 'Edm.Boolean' and field in schema 'Edm.String' Source: Sitecore.ContentSearch.Azure at Sitecore.ContentSearch.Azure.Schema.CloudSearchIndexSchemaBuilder.AddFields(IndexedField[] fileds) at Sitecore.ContentSearch.Azure.Schema.CloudSearchIndexSchemaBuilder.AddField(String fieldName, Object fieldValue) at Sitecore.ContentSearch.Azure.CloudSearchDocumentBuilder.AddField(String fieldName, Object fieldValue, Boolean append) at Sitecore.ContentSearch.AbstractDocumentBuilder`1.CheckAndAddField(IIndexable indexable, IIndexableDataField field)
If the conflicting field does not belong to any of the system templates, you can rename it so that the fields have unique names.
Configure Sitecore XP to index only one of the fields with the same name. This means that only the values of the chosen field are indexed and available for search.
To implement this solution:
Note: You can also create a new index in Sitecore XP configuration and perform the above steps for the other field from the fields with the same name. This allows you to index both field values but in different indexes.