Template field Name+Type clash during indexing (Solr, Azure Search)

Problem:

Sitecore Content Search indexes data field by name and type. When you introduce a new module with a new data template you may create a new field with a name that already exists on another template but has a different type. In this case, you will get indexing errors and some data may not be indexed. 

 

Risk:

However, Sitecore will not warn you about this clash. It will only break during indexing, which you may not spot straight away.

 

Possible solution:

 - Always prefix template field names with template name to address the field name and type clash during indexing (Solr, Azure Search).

 -- Populate user-friendly field title.

 - Monitor your Sitecore logs for the indexing errors.