lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrico Detoma <enrico.det...@gmail.com>
Subject Re: Lucene 2.9.0 [PROBLEM] : TokenStream API (incrementToken / captureState / restoreState), cannot implement a "stop phrases filter"
Date Fri, 09 Oct 2009 12:27:43 GMT
Thank you.
Starting from CachingTokenFilter was indeed the correct way to proceed.

Regards
Enrico


2009/10/8 Uwe Schindler <uwe@thetaphi.de>

> 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). The while loop at the end of you code is not working as you
> exspect because of this. You may use CachingTokenFilter, which can be reset
> and consumed again, as a source for further work.
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message