>> I'm just keeping a reference to Tokenizer, so I can reset it with a
>> new reader. Though this situation is awkward, TS definetly does not
>> need a reset(Reader).
>
> Then how do you notify the other filters that they should reset their state?
> TokenStream.reset()?  The javadoc specifies that it's actually used
> for something else - but perhaps it can be reused for this purpose?
Yes, exactly. TokenFilter override of reset() chains the call to the
input stream.

> I specifically used NGramTokenFilter in my example because it did use
> internal state (and it's a bug that it has no way to reset that state
> currently).
My filters are all my own, so they reset and chain properly.


-- 
Kirill Zakharenko/Кирилл Захаренко (ear...@gmail.com)
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785

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

Reply via email to