lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Taylor <paul_t...@fastmail.fm>
Subject Re: Converting from TermAttribute to CharTermAttribute
Date Thu, 15 Sep 2011 10:30:37 GMT
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


Mime
View raw message