One of Solr’s strengths is providing a rich platform of functionality with the option of adding your own custom components running within Solr.
Solr calls such components plugins when the implementation is configurable. Surely you have seen many already throughout Solr’s configuration via the "class" reference. Common examples are Request Handlers, Search Components, and Query Parsers to process your searches, and Token Filters for processing text.
Most apps don’t need to create plugins because Solr offers a rich set of them built-in. However if you do, start by looking at the code for existing similar plugins. Writing your own is an advanced subject that is out of scope of the reference guide. One resource is the Solr Wiki documentation on plugins at SolrPlugins, which is rather out-of-date but has some utility.
Most plugins are built-in to Solr and there is nothing to install. The subject here is how to make other plugins available to Solr, including those in contrib modules. Plugins are packaged into a Java jar file and may have other dependent jar files to function.
The next sections describe some options:
Describes where to put the plugin’s JAR files on the file system; either in one of the special places or a place convenient to you along with a <lib/>
. This has been the standard approach since Solr’s inception. It’s simple and reliable but it’s entirely on you to ensure that all nodes in a cluster have them. Contrib modules ship with Solr so there’s no effort for them but not so for other plugins (yours or 3rd party).
Package Management: Describes a new and experimental system to manage packages of plugins in SolrCloud. It includes CLI commands, cluster-wide installation, use of plugin registries that host plugins, cryptographically signed plugins for security, and more. Only some plugins support this.
Blob and Runtimelib: Describes a deprecated system that predates the above package management system. It’s functionality is a subset of the package management system. It will no longer be supported in Solr 9.