2

I'm migrating from Solr 4.6.0 to 5.4.0. We opted to use our old schema.xml instead of using the managed_schema because we have quite a few copyFields. Starting up solr server, we got this error:

Plugin init failure for [schema.xml] fieldType "text_general": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class: 'org.apache.lucene.analysis.core.StopFilterFactory'

On googling, we saw that StopFilterFactory is not deprecated yet. What could be the problem?

Also there's no comprehensive guide on how to use a schema from Solr4 in Solr5. Any suggestions?

Thanks

f_puras
  • 2,521
  • 4
  • 33
  • 38
Seeker
  • 297
  • 5
  • 19

2 Answers2

8

Not sure about Solr 5.X.X but solved above issue in Solr 6.1.0 by removing enablePositionIncrements="true" from schema xml.
Solr may throw another error

Plugin init failure for [schema.xml] fieldType "edge_ngram": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class:'org.apache.lucene.analysis.ngram.EdgeNGramFilterFactory'

Removing side="front" from schema file will remove this error as well.

7ochem
  • 2,183
  • 1
  • 34
  • 42
Neeraj Shukla
  • 81
  • 2
  • 5
  • Removing all `enablePositionIncrements` parameters from my schema.xml file solved the problem. There were approx. 20 occurrences. – jdhildeb Jun 04 '18 at 21:50
0

I am not sure if you have resolved your error.

There will be some major changes between Solr 4.6.0 and 5.4.0, and I think your error is due to the changes between the 2 different versions. It means your schema.xml is outdated and won't work for SOlr 5.4.0.

I suggest you doing the following:

When you install Solr 5.4.0 and create a new core, Solr will create a managed-schema file in the conf directory of the core directory. I suggest you compare managed-schema file to your old schema.xml file. For example, look for fieldType name="text_general" in your old schema.xml, and see the difference between the contents under fieldType name="text_general" and the contents under fieldType name="text_general" of managed-schema of Solr 5.4.0. One potential way to fix the error is by removing enablePositionIncrements="true" as Neeraj suggested above.

After the fix for the contents under enablePositionIncrements="true", if Solr gives another error regarding your old schema.xml, look for the location of your error in schema.xml and compare it to managed-schema as done above.

Don't forget to remove or move managed-schema file out of the conf directory since the managed-schema probably won't be something you want to use. You would want to use your old schema.xml, right?

Hope this helps.

7ochem
  • 2,183
  • 1
  • 34
  • 42
btaek
  • 562
  • 5
  • 13