[ 
https://issues.apache.org/jira/browse/SOLR-5103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702771#comment-14702771
 ] 

Jan Høydahl edited comment on SOLR-5103 at 8/19/15 10:49 AM:
-------------------------------------------------------------

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:
{code:xml}
<dependencies>
   <plugin name="solrcell" version="5.2.1" />
   <plugin name="cominvent/cool-responsewriter" version=">=5.0.0" />
</dependencies>
{code}
...and spit out clear instructions in the logs on how to install those.


was (Author: janhoy):
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.

> Plugin Improvements
> -------------------
>
>                 Key: SOLR-5103
>                 URL: https://issues.apache.org/jira/browse/SOLR-5103
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>             Fix For: Trunk
>
>
> I think for 5.0, we should make it easier to add plugins by defining a plugin 
> package, ala a Hadoop Job jar, which is a self--contained archive of a plugin 
> that can be easily installed (even from the UI!) and configured 
> programmatically.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to