Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 71927 invoked from network); 9 Oct 2009 12:28:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Oct 2009 12:28:16 -0000 Received: (qmail 57684 invoked by uid 500); 9 Oct 2009 12:28:14 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 57593 invoked by uid 500); 9 Oct 2009 12:28:14 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 57583 invoked by uid 99); 9 Oct 2009 12:28:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 12:28:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of enrico.detoma@gmail.com designates 209.85.218.222 as permitted sender) Received: from [209.85.218.222] (HELO mail-bw0-f222.google.com) (209.85.218.222) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2009 12:28:03 +0000 Received: by bwz22 with SMTP id 22so6050471bwz.5 for ; Fri, 09 Oct 2009 05:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=zrU9qs9SQZNM9GhxglQVW0muoOqJQ5NH0I6Y99vYUC4=; b=bXbtFWxlMtZd0QMWYE4GZqRMslNO4qK4WhNHGzwk+zOdGPhbinbJfU5qNbxFsDX6iC Hbk/qwgvNUlrqkT60mYP1xv+eoFDg1ojKSx5OkZGyGzh76f0ip5SZIY0+Rn5B4nT7ioF pMDR+Gj8Pma5QGt0YjrhUFGzQLrmf+iLXbr10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UmXgna6frdT4LTz5Pi8d8TonOvsIGjV19H3KgsVQsoN5BmXMMtY/AJn6l9o4nHCZy0 WkxKL6HUry/PiLuiGy1y9w7p9AJ7/B9TneVIcQiq4CF17ro/Y05TC2uykNb4sDB5TZFk 7VxvKPh5bChR9d9C0Qj4vJYxtIiJouTdC5K7g= MIME-Version: 1.0 Received: by 10.204.34.65 with SMTP id k1mr847076bkd.111.1255091263387; Fri, 09 Oct 2009 05:27:43 -0700 (PDT) In-Reply-To: <4CA47FE785CF4DE2874A962EF09951FE@VEGA> References: <4CA47FE785CF4DE2874A962EF09951FE@VEGA> Date: Fri, 9 Oct 2009 14:27:43 +0200 Message-ID: Subject: Re: Lucene 2.9.0 [PROBLEM] : TokenStream API (incrementToken / captureState / restoreState), cannot implement a "stop phrases filter" From: Enrico Detoma To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000325557532ea397c04757fb4bb X-Virus-Checked: Checked by ClamAV on apache.org --000325557532ea397c04757fb4bb Content-Type: text/plain; charset=ISO-8859-1 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). 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 > --000325557532ea397c04757fb4bb--