lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3396) Make TokenStream Reuse Mandatory for Analyzers
Date Mon, 05 Sep 2011 09:54:10 GMT


Uwe Schindler commented on LUCENE-3396:

I agree its somehow overkill. But if not on class level I would even remove the T parameter
from ther getter method, because it does not really fit, it is only used there, not even on
the setter. There is no type enforcement anywhere, so the extra T is just to remove the casting
on the caller of the protected method, but adding a SuppressWarnings on the implementor's
side. So either make all T or use Object everywhere.

> Make TokenStream Reuse Mandatory for Analyzers
> ----------------------------------------------
>                 Key: LUCENE-3396
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: Chris Male
>         Attachments: LUCENE-3396-rab.patch, LUCENE-3396-rab.patch, LUCENE-3396-rab.patch,
> In LUCENE-2309 it became clear that we'd benefit a lot from Analyzer having to return
reusable TokenStreams.  This is a big chunk of work, but its time to bite the bullet.
> I plan to attack this in the following way:
> - Collapse the logic of ReusableAnalyzerBase into Analyzer
> - Add a ReuseStrategy abstraction to Analyzer which controls whether the TokenStreamComponents
are reused globally (as they are today) or per-field.
> - Convert all Analyzers over to using TokenStreamComponents.  I've already seen that
some of the TokenStreams created in tests need some work to be reusable (even if they aren't
> - Remove Analyzer.reusableTokenStream and convert everything over to using .tokenStream
(which will now be returning reusable TokenStreams).

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message