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

Is Rendered Item Valid XHtml Document Could not find schema information warnings during publish item Sitecore 7.2

RESOLVED: Solr Exceptions - Document contains at least one immense term in field

First look at Sitecore XM Cloud: Part 4 - Creating a new Site