From java-user-return-52037-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Thu Feb 9 19:19:44 2012 Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0B3C9B01 for ; Thu, 9 Feb 2012 19:19:44 +0000 (UTC) Received: (qmail 56583 invoked by uid 500); 9 Feb 2012 19:19:42 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 56475 invoked by uid 500); 9 Feb 2012 19:19:41 -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 56467 invoked by uid 99); 9 Feb 2012 19:19:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 19:19:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dameriangr@gmail.com designates 209.85.215.48 as permitted sender) Received: from [209.85.215.48] (HELO mail-lpp01m010-f48.google.com) (209.85.215.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 19:19:32 +0000 Received: by lagw12 with SMTP id w12so2466565lag.35 for ; Thu, 09 Feb 2012 11:19:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=g6bmxAbA1CVa2tDFTQ0C8PQMKYpGqkL57UexPeHHLVs=; b=j8H8MJ4BTcT77JFv56vfFi2QZS9JUrxBsPW9zHSfw3snrOzOmhqwEE8qXnK7BtwzG4 1jXklFueNeyV2ti6pHLaj81hr3vM1dI1Ey9Wn3OQ5sBCeCYEkhJ5OXtquIqvsoin6f3Q lQZjePKqRa2jp6Q/kpXJKnhG1HYG4x48S1kyo= Received: by 10.112.100.169 with SMTP id ez9mr1038691lbb.82.1328815151857; Thu, 09 Feb 2012 11:19:11 -0800 (PST) Received: from [213.112.147.63] (c-3f9370d5.024-21-6a6b701.cust.bredbandsbolaget.se. [213.112.147.63]) by mx.google.com with ESMTPS id k4sm2838396lbw.10.2012.02.09.11.19.10 (version=SSLv3 cipher=OTHER); Thu, 09 Feb 2012 11:19:11 -0800 (PST) Message-ID: <4F341C13.80006@gmail.com> Date: Thu, 09 Feb 2012 20:18:43 +0100 From: Damerian User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Access next token in a stream Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello i want to implement my custom filter, my wuestion is quite simple but i cannot find a solution to it no matter how i try: How can i access the TermAttribute of the next token than the one i currently have in my stream? For example in the phrase "My name is James Bond" if let's say i am in the token [My], i would like to be able to check the TermAttribute of the following token [name] and fix my position increment accordingly. Thank you in advance! --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org