After we got
SOLR-7073, we can now add a single .jar to a collection by uploading it to .system collection. Could we perhaps piggyback on this mechanism for full-blown plugins as well?
I.e. we similarly upload a plugin, e.g. my-cool-responsewriter-plugin.zip to .system. Solr will then automatically inspect the zip, add jars to classpath and register the new responsewriter under its default name.
On node start, we would iterate over all registered plugins in .system and register them. Perhaps a super generic way to support auto wiring is to allow scripts in the zip root, like config-api-commands.json and schema-api-commands.json, which will be replayed on load. Then a FieldType plugin can e.g. register itself with a fieldType and dynamicField in schema.
The whole idea of such a zip format would be to encourage creation of 3rd party plugins that can be installed from AdminUI or bin/solr installplugin my-plugin.zip, and perhaps also more modularization of the Solr distro, i.e. our contribs would become plugins and not litter solrconfig.xml with config that is only active if a system property is enabled.
How cool would it be if you could add e.g. SolrCell to a plain Solr download by typing bin/solr installplugin solrcell, and it would look for http://www.us.apache.org/dist/lucene/solr/_version_/plugins/solrcell.zip. Could also support github sources, i.e. bin/solr installplugin githubuser/plugin-name where plugin-name is a repo with some simple layout rules.
To aid in user friendliness, solrconfig.xml could even have a new tag to to register expected dependencies:
<plugin name="solrcell" version="5.2.1" />
<plugin name="cominvent/cool-responsewriter" version=">=5.0.0" />
...and spit out clear instructions in the logs on how to install those.