[
https://issues.apache.org/jira/browse/SOLR-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan McKinley updated SOLR-260:
-------------------------------
Attachment: SOLR-260-PluginLoader.patch
This patch uses a single plugin loader for:
* RequestHandlers
* FieldTypes
* QueryResponseWriter
* (SOLR-225 highlighting)
It could be used for field and dynamicField, but I'll hold off on that...
RequestHandlers and FieldTypes have enough custom stuff going on (lazy loading,
Analyzers) that they can't use the general class NamedListPluginLoader<T>
QueryResponseWriters are initalized with:
NamedListPluginLoader<QueryResponseWriter> loader =
new NamedListPluginLoader<QueryResponseWriter>( "[solrconfig.xml]
"+xpath, responseWriters );
defaultResponseWriter = loader.load( nodes );
- - -
This configuration adds the ability to specify the default
RequestHandlers/QueryResponseWriter using default="true" on exactly one entry.
This was required for SOLR-225 highlighting config, but I think it is generally
useful.
- - -
I added package o.a.solr.util.plugin with 5 classes. Any better suggestions
where this ought to live?
> reusable PluginLoader -- helper class to load plugins
> -----------------------------------------------------
>
> Key: SOLR-260
> URL: https://issues.apache.org/jira/browse/SOLR-260
> Project: Solr
> Issue Type: New Feature
> Reporter: Ryan McKinley
> Attachments: SOLR-260-PluginLoader.patch
>
>
> As we talk about adding more configuration (Handlers, Highlighting,
> Components, etc) we should standardize the format and share the loading and
> initialization code.
> This patch extracts the common stuff from SOLR-225 and makes it work with the
> RequestHandler framework.
> This is an abstract base class -- each implementation needs to take care of
> actually creating and initializing the instances:
> abstract class PluginLoader<T>
> {
> abstract public T create( String className, NamedList args,
> Map<String,String> params );
>
> abstract public void init( T plugin, NamedList args, Map<String,String>
> params );
>
> public Map<String,T> load( NodeList nodes )
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.