lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: ReusableAnalyzerBase bug in 3.4.0?
Date Tue, 01 Nov 2011 22:17:15 GMT
On Tue, Nov 1, 2011 at 6:12 PM, Paul Jakubik <paul@purediscovery.com> wrote:

> If there is a good reason to avoid resetting the sink here, then would it
> help other people to better document that implementations of
> ReusableAnalyzerBase.createComponents should not create stateful components?
> Paul
>

Hi,

I don't think this is a bug.

Consumers of the tokenStream [not producers!] are responsible for
calling reset()
http://lucene.apache.org/java/3_4_0/api/core/org/apache/lucene/analysis/TokenStream.html

What consumer are you using that does not call reset?
Is it a custom queryparser or something you made, or a consumer from lucene?

If you have custom code that consumes TokenStreams, we provide a
"MockAnalyzer" in lucene's test-framework to ensure its well-behaved:
http://lucene.apache.org/java/3_4_0/api/test-framework/org/apache/lucene/analysis/MockAnalyzer.html

If you have a consumer from lucene (e.g. a queryparser) that is not
calling reset(), then thats a bug.

-- 
lucidimagination.com

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


Mime
View raw message