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

Robert Muir commented on LUCENE-1794:
-------------------------------------

{quote}
What if one of those streams will become state-keeper some day? I don't think 
that calling reset() and have it done nothing will be expensive, no?
{quote}
it could also become completely incompatible with reuse in some way, (example: 
CachingTokenFilter). in that case reset will not help either :)

{quote}
It could just override reusableTokenStream and do what it wants, no?
{quote}
Oh, definitely, my concern was what should getTokenizer() do in that case? I 
guess as long as getTokenizer() is not public and is documented as optional 
operation, then I would not have a problem with this case...

{quote}
I'll try to impl it tomorrow, using the new API and see how it goes.
{quote}
please do, I think its a great idea! I am just bringing up the ridiculous cases 
in contrib, as long as its flexible enough that things can be overridden in 
those cases, it could save a lot of heartache and maintenance hassle.

do you have any ideas on the back compat issues?


> implement reusableTokenStream for all contrib analyzers
> -------------------------------------------------------
>
>                 Key: LUCENE-1794
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1794
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/analyzers
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1794.patch, LUCENE-1794.patch, LUCENE-1794.patch, 
> LUCENE-1794.patch, LUCENE-1794.patch
>
>
> most contrib analyzers do not have an impl for reusableTokenStream
> regardless of how expensive the back compat reflection is for indexing speed, 
> I think we should do this to mitigate any performance costs. hey, overall it 
> might even be an improvement!
> the back compat code for non-final analyzers is already in place so this is 
> easy money in my opinion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to