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

Robert Muir commented on LUCENE-4642:
-------------------------------------

My problem i guess with AttributeSource/AttributeFactory is that they invade on 
every single custom tokenizer: the API is not good.

I realize its useful for expert users to be able to plug in their own, but why 
in the world must *every*  tokenizer have ctor explosion (minimum 3) to support 
this? 

And I guess I was secretly hoping we could remove Tokenizer(AttributeSource) if 
we fixed the solr hack. :)

Again my main problem is not about what you want to do, its instead related to 
the existing APIs (Tokenizer.java) and where we are heading if we perpetuate 
this to the analysis factories (TokenizerFactory) too.

                
> TokenizerFactory should provide a create method with a given AttributeSource
> ----------------------------------------------------------------------------
>
>                 Key: LUCENE-4642
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4642
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 4.1
>            Reporter: Renaud Delbru
>            Assignee: Steve Rowe
>              Labels: analysis, attribute, tokenizer
>             Fix For: 4.2, 5.0
>
>         Attachments: LUCENE-4642.patch, LUCENE-4642.patch
>
>
> All tokenizer implementations have a constructor that takes a given 
> AttributeSource as parameter (LUCENE-1826). However, the TokenizerFactory 
> does not provide an API to create tokenizers with a given AttributeSource.
> Side note: There are still a lot of tokenizers that do not provide 
> constructors that take AttributeSource and AttributeFactory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to