I migrated Sitecore 8 to Sitecore 10.3, but it affected my search results content coming from a rich text field name description. Content written in Sitecore rich text field with some html / css styles were missing.
Sitecore Rich Text field not indexing Investigation
I checked the Solr dashboard of master and web indexing, but there as well data of each Rich Text field were just plain text. Later a lit bit of research, found Sitecore 10.3 content search default Solr index configuration missing MapFieldbyFieldName node configurations.
I found I had this configuration in Sitecore 8, so compared the configurations and added MapFieldbyFieldName node with Rich Text Field description.
Seamless Sitecore Upgrades & Migration, Guaranteed
Enhance performance, security, and features with our expert Sitecore upgrade services. Trust our experienced team to manage your Sitecore upgrade. From planning to implementation, we ensure a smooth transition with minimal downtime.
Click to Learn more about
Solution for Rich Text Editor field only returns plain text
To resolve this issue you we can have two approaches
- Updating the Solr default index configurations
In Sitecore 10.3 navigate to the path: App_Config\Sitecore\ContentSearch, then update the file name: Sitecore.ContentSearch.Solr.DefaultIndexConfiguration.config with the below configuration.
In FieldReaderType node of Sitecore fieldtype map section
<mapFieldByFieldName hint="raw:AddFieldReaderByFieldName">
<fieldReader fieldName="Description" fieldReaderType="Sitecore.ContentSearch.FieldReaders.DefaultFieldReader, Sitecore.ContentSearch" />
</mapFieldByFieldName>
Or
Reliable Sitecore Support, Anytime
Ensure your Sitecore platform runs smoothly with our dedicated support services. We’re here 24/7 to resolve issues and optimize performance.
Contact Support
2. Adding separate patch with fieldreaders with mapfieldbyfieldname node in App_config/Include.
We can add a patch name descrptionrichtexfieldindexing.config as below
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<contentSearch>
<indexConfigurations>
<defaultSolrIndexConfiguration>
<fieldReaders>
<mapFieldByFieldName hint="raw:AddFieldReaderByFieldName">
<fieldReader fieldName="description" fieldReaderType="Sitecore.ContentSearch.FieldReaders.DefaultFieldReader, Sitecore.ContentSearch" />
</mapFieldByFieldName>
</fieldReaders>
</defaultSolrIndexConfiguration>
</indexConfigurations>
</contentSearch>
</sitecore>
</configuration>
Next steps:
a) Rebuild your all indexes
b) Validate the patch applied correctly using Sitecore/admin/showconfig.aspx
c). Checking Solr query results in Solr dashboard by selecting any core and query the Rich Text field results.
You will find Rich Text field returning the html in Solr search query in Solr dashboard or in your Sitecore Solr page search.