On Tue, Nov 1, 2011 at 6:12 PM, Paul Jakubik <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
