Solr Plugins

Solr allows you to load custom code to perform a variety of of tasks within Solr -- from custom custom Request Handlers to process your searches, to custom Analyzers and Token Filters for your text field, even custom Field Types. TableOfContents

How to Load Plugins

Plugin code can be loaded into Solr by putting Jars containing your classes in a lib directory in your Solr Home directory prior to starting your servlet container.

This is a relatively new feature (as of 2006-11-13) which uses a custom Class Loader. It's not yet clear exactly how successful this approach works on the multitudes of servlet containers available in the wild.

The Old Way

Another method that works consistently on any servlet container is to:

  1. unpack the solr.war
  2. add a jar containing your custom classes to the WEB-INF/lib directory

  3. repack your new, customized, solr.war and use it.

List of Classes that are 'Pluggable'

The following is a complete list of every API that can be treated as a plugin in Solr, with information on how to use that configure your Solr instance to use an instance of that class.

/!\ :TODO: /!\ for each class, link to javadocs and show example of where/how to configure usage

SolrRequestHandler

QueryResponseWriter

Similarity

Analyzer

TokenizerFactory

TokenFilterFactory

CacheRegenerator

FieldType

SolrCache

SolrEventListener

UpdateHandler