I have written a custom KeepWord filter factory and have put the resultant jar under solr/lib directory.
But when starting solr I am getting this error

SEVERE: org.apache.solr.common.SolrException: Error loading class 'org.custom.solr.analysis.MyKeepWordFilterFactory'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:404)
at org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:83)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:140)
at org.apache.solr.schema.IndexSchema.readAnalyzer(IndexSchema.java:941)
at org.apache.solr.schema.IndexSchema.access$100(IndexSchema.java:62)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:450)
at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:435)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:140)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:480)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:125)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:461)
at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
...
Caused by: java.lang.ClassNotFoundException: org.custom.solr.analysis.MyKeepWordFilterFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
...

1 Answer
1

Couple of things -
1. org.custom.solr.analysis.MyKeepWordFilterFactory does not match the contents of your jar file org/custom/analysis/MyKeepWordFilterFactory.class. The solr package is missing.
2. If it still does not find it. Check if the entry in solrconfig.xml is uncommented and the jar file is loaded when the server starts up.