[
https://issues.apache.org/jira/browse/LUCENE-4044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422032#comment-13422032
]
Uwe Schindler commented on LUCENE-4044:
---------------------------------------
For the provider-auto-config I found https://code.google.com/p/spi/, which is a
javac annotation processor. Instead of adding the factories, we have to add a
@ProviderFor(TokenizerFactor.class) on the implementation class (instead of
adding it to the crazy file in resources folder). javac then automatically
writes the META-INF file to the compiler output. As this annotation processor
is an SPI by itsself and can be added to ANT's javac task as additional
classpath (to find the tool), it will do this while compiling without any
further configuration. For Eclipse you have to add annotation processing, but
this can be enabled in ant eclipse.
The cool thing is, that we dont need to make crazy Eclipse classpaths, because
the META-INF/services folder in resources can be nuked and no file collisions
can happen.
I am still digging to have it fully automatic, but this approach is used by
many projects.
> Add NamedSPILoader support to TokenizerFactory, TokenFilterFactory and
> CharFilterFactory
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-4044
> URL: https://issues.apache.org/jira/browse/LUCENE-4044
> Project: Lucene - Core
> Issue Type: Sub-task
> Components: modules/analysis
> Reporter: Chris Male
> Fix For: 4.0
>
> Attachments: LUCENE-4044.patch
>
>
> In LUCENE-2510 I want to move all the analysis factories out of Solr and into
> the directories with what they create. This is going to hamper Solr's
> existing strategy for supporting {{solr.*}} package names, where it replaces
> {{solr}} with various pre-defined package names. One way to tackle this is
> to use NamedSPILoader so we simply look up {{StandardTokenizerFactory}} for
> example, and find it wherever it is, as long as it is defined as a service.
> This is similar to how we support Codecs currently.
> As noted by Robert in LUCENE-2510, this would also have the benefit of
> meaning configurations could be less verbose, would aid in fully decoupling
> the analysis module from Solr, and make the analysis factories easier to
> interact with.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]