lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Getting the actual token from Token's term buffer
Date Sat, 08 Dec 2007 23:15:42 GMT
Otis Gospodnetic wrote:

 > Is the idea to:
 >   1) get the char[] buffer from Token
 >   2) get its real length via termLength()

Yes.  And, on getting the char[] buffer, if you need more space than
its current length, call resizeTermBuffer(int newSize), which returns  
a buffer
of size >= newSize.

 > 3) manually fill a new char[]  with the content of the buffer,  
minus the extra buffering?

Or, better, directly alter the char[] buffer you just got, in place.

If you really need/want to do a new buffer, then you can call
Token.setTermBuffer and it will do the copy (into its buffer) for


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message