Lucene 2.9.0 [PROBLEM] : TokenStream API (incrementToken / captureState / restoreState), cannot implement a "stop phrases filter"

2009-10-08 Thread Enrico Detoma
Hi all, I'm trying to implement a "stop phrases filter" with the new TokenStream API. I would like to be able to peek into N tokens ahead, see if the current token + N subsequent tokens match a "stop phrase" (the set of stop phrases are saved in a HashSet), then discard all these tokens when they

Re: Lucene 2.9.0 [PROBLEM] : TokenStream API (incrementToken / captureState / restoreState), cannot implement a "stop phrases filter"

2009-10-09 Thread Enrico Detoma
Thank you. Starting from CachingTokenFilter was indeed the correct way to proceed. Regards Enrico 2009/10/8 Uwe Schindler > restoreState only restores the token contents, not the complete stream. So > you cannot roll back the token stream (and this was also not possible with > the old API). Th