26, 2012 5:52 PM
To: java-user@lucene.apache.org
Subject: Re: TokenFilter state question
Actually, I had thought the same thing and had played around with the reset
method. However, in my example where I called the custom analyzer the
"reset" method was called after every token, not after the end
Actually, I had thought the same thing and had played around with the reset
method. However, in my example where I called the custom analyzer the
"reset" method was called after every token, not after the end of the
stream (which implies each token was treated as its own TokenStream?).
Str
You need a "reset" method that calls the super reset to reset the parent
state and then reset your own state.
http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/analysis/TokenStream.html#reset()
You probably don't have one, so only the parent state gets reset.
-- Jack Krupansky
-O