lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: CachingTokenFilter tests fail when using MockTokenizer
Date Mon, 23 Mar 2015 19:10:57 GMT
Hi Spyros,

Not 100% sure but I think you should override reset method.

public void reset() throws IOException {

cachedInput = null;


On Monday, March 23, 2015 1:29 PM, Spyros Kapnissis <> wrote:
We have a couple of custom token filters that use CachingTokenFilter internally. However,
when we try to test them with MockTokenizer so that we can have these nice TokenStream API
checks that it provides, the tests fail with: "java.lang.AssertionError: end() called before
incrementToken() returned false!"

Here is a link with a unit test to reproduce the issue:
Do we misuse CachingTokenFilter? Or is it an issue of MockTonenizer when used with CachingTokenFilter?

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

View raw message