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 BDB3C803C for ; Thu, 15 Sep 2011 10:31:08 +0000 (UTC) Received: (qmail 28040 invoked by uid 500); 15 Sep 2011 10:31:06 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 27995 invoked by uid 500); 15 Sep 2011 10:31:06 -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 27987 invoked by uid 99); 15 Sep 2011 10:31:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2011 10:31:06 +0000 X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLYTO_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul_t100@fastmail.fm designates 66.111.4.27 as permitted sender) Received: from [66.111.4.27] (HELO out3.smtp.messagingengine.com) (66.111.4.27) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Sep 2011 10:30:59 +0000 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 4503529337; Thu, 15 Sep 2011 06:30:39 -0400 (EDT) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute3.internal (MEProxy); Thu, 15 Sep 2011 06:30:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:reply-to :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=o1zD7A0BD6w+TKaWnI3Blb mox/c=; b=Eqfh1bdE88SNJPN5WUCCW/o8m6jIVzpoMRbyHORKk3Bwwpbge9ys4x Xs8GZj45nRl01ImcCeXVQkQ3MsXA/ohlmn7jZau9gSfDlasQahCOlqmp5nVd/7fP JSa38JyxJoE0LdwnF1BBK0zgDFjzyuViAzKkhw02TaOk/mQBp6K5c= X-Sasl-enc: 0QSPDWq9wbm8CiOCkE8veAS8o3kzVlRY4ZJlzOVPNf5S 1316082638 Received: from [192.168.1.66] (unknown [217.155.98.246]) by mail.messagingengine.com (Postfix) with ESMTPSA id A6A3B7408E2; Thu, 15 Sep 2011 06:30:38 -0400 (EDT) Message-ID: <4E71D3CD.9070306@fastmail.fm> Date: Thu, 15 Sep 2011 11:30:37 +0100 From: Paul Taylor Reply-To: paul_t100@fastmail.fm User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: Uwe Schindler CC: java-user@lucene.apache.org Subject: Re: Converting from TermAttribute to CharTermAttribute References: <4E71C7BC.805@fastmail.fm> <001f01cc738f$f3946cd0$dabd4670$@thetaphi.de> In-Reply-To: <001f01cc738f$f3946cd0$dabd4670$@thetaphi.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 15/09/2011 11:12, Uwe Schindler wrote: > Hi, > > In your incrementToken method, you differs in both implementations: > The original one uses setTermBuffer(), but the new one only resizes the > buffer, but never changes it. > Thankyou, now working, changed to @Override public boolean incrementToken() throws IOException { if (!input.incrementToken()) return false; final char[] buffer = termAttr.buffer(); final int length = termAttr.length(); if (removeAccents(buffer, length)) { termAttr.copyBuffer(output,0,outputPos); } return true; } --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org