Sunday, February 1, 2015

Solr 4.8 and Higher with Sitecore - Schema Issue Resolved

Dan Solovay has a great blog post that details how to setup Solr with Sitecore 7. One potential problem stood out though: Sitecore didn't play well with Solr 4.8.x or higher due to an assumption Sitecore made about Solr's schema.

If you, like me, read this and had reason to hesitate then I say worry not! Sitecore has provided a solution that will allow you to deploy Solr 4.8 and later to your environment. In a nutshell, the fix is to modify the Solr's schema.xml file.

From the kb article:

  1. Make the following changes in the default schema.xml file shipped with Solr:
    • enclose all <field> and <dynamicField> elements in the <fields> tag.
    • enclose all <fieldType> elements in the <types> tag.
  2. Pass the modified schema.xml file to the Build Solr Schema Wizard to add the Sitecore specific specific configuration.
  3. Put the resulting file to the configuration folder of the Solr core.
  4. If you use Solr 4.9 or later, ensure that the following field type is defined in the schema.xml file:
  5. <fieldType name="pint" class="solr.IntField"/>
  6. Reload the core to apply schema changes.

0 comments:

Post a Comment