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

Replace


    <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" />

With
    <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.

Comments

Popular posts from this blog

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

SOLVED: Sitecore Habitat Home Sync-Unicorn fails with the error: GetResponse" with "0" argument(s): "The remote server returned an error: (403) Forbidden.

Google Lighthouse Tips: Importance of web page speed