[
https://issues.apache.org/jira/browse/LUCENE-1794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743770#action_12743770
]
Shai Erera commented on LUCENE-1794:
------------------------------------
Well ... it's true and false at the same time. On one hand, I think Analyzer
should impl reusableTokenStream just like ReusingAnalyzer, but we can't do that
because of back-compat. On the other hand, Streams does belong to
ReusingAnalyzer because it makes use of it.
What I thought was that maybe someone would want to make use of Streams w/o
extending Analyzer. And ... we may want to constraint setPreviousTokenStream to
Streams, or TokenStream or a generic type of thing, to avoid casting and be
more type-safe.
I wonder if we'll stay w/ Analyzer.reusableTS as it is forever, or will we
break it one day to be like ReusingAnalyzer (and by that deprecate
ReusingAnalyzer?).
I guess that if we think for the long term that ReusingAnalyzer will stay, and
hence most Analyzers will actually be ReusingAnalyzer extension, then I'm ok w/
moving Streams into ReusingAnalyzer. But keeping it in Analyzer will allow us
in the future to constrain prevTokenStream to be of that type and not a generic
Object.
> 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-reusing-analyzer.patch, LUCENE-1794.patch,
> 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: [email protected]
For additional commands, e-mail: [email protected]