Custom fields in Solr 7.2.1: how to reuse your old schema.xml file from previous versions



My Sitecore 8.1 solution has a considerable number of Custom fields; after the upgrade to Sitecore 9.1 (and Solr 7.2.1), none of them worked the way they did, returning an “unknown field” error for any field that used a custom <dynamicField>.

What I ended up doing, was adding the

  <schemaFactory class="ClassicIndexSchemaFactory">;

node under <config> in the /conf/solrconfig.xml for the affected node(s), and then copy over my Solr 4.10.x schema.xml file in the same folder.

I had to adapt it however, as a number of classes had changed on the road to 7.2.1; I used the /conf/managed-schema file as a model; if someone is interested, the schema.xml file I ended up using can be found here.

Leave Comment