Solr Error: Plugin init failure for [schema.xml] fieldType "x": Error loading class 'solr.xfield'

I recently integrated Solr with Sitecore 7.2 and found that the Schema.xml generated by Sitecore is only supported up to Solr 4.x. Configuring Solr for Sitecore 8 provides the steps required to upgrade Schema.xml to work with Solr 5.x, especially the Step 3 that mentions that Solr.IntField is deprecated and must be replaced with Solr.TrieIntField.

What is fails to mention is that you need to replace the other field types as well else you run into the following error for each of the field types:
Could not load conf for core contentindex: Plugin init failure for [schema.xml] fieldType "plong": Error loading class 'solr.LongField'.
The Fix:

In Sitecore generated Schema.xml


    <fieldType name="pint" class="solr.IntField" />
    <fieldType name="plong" class="solr.IntField" />
    <fieldType name="pfloat" class="solr.FloatField" />
    <fieldType name="pdouble" class="solr.DoubleField" />
    <fieldType name="pdate" class="solr.DateField" sortMissingLast="true" />

    <fieldType name="pint" class="solr.TrieIntField" />
    <fieldType name="plong" class="solr.TrieIntField" />
    <fieldType name="pfloat" class="solr.TrieFloatField" />
    <fieldType name="pdouble" class="solr.TrieDoubleField" />
    <fieldType name="pdate" class="solr.TrieDateField" sortMissingLast="true" />
This should resolve any issues related to fieldType in Schema.xml.


Popular posts from this blog

Decision tree for selecting the best cloud hosting option (App service, VM, Containers, Serverless)

SOLVED: Error while running Sitecore Unicorn sync for Habitat Home: System.ArgumentException: Configuration(s) requested were not defined.

Sitecore, GDPR, China's Cyber Security Law (CSL) & Data Protection Regulation (CDPR)