lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Payload API
Date Mon, 19 Nov 2007 14:04:47 GMT
On Nov 18, 2007 1:19 PM, Michael McCandless <> wrote:
> "Michael Busch" <> wrote:
> > Oh and Yonik, I think in addition we'd also need a payloadOffset member?
> Oh yes, we need offset too.

I was trying to save another member, and thought that the offset had
fewer uses than the length.

A related API question is whether we would do a copy into the Token
(like for termBuffer), or if the byte[] payload would be simply
referenced (not copied). If it is simply referenced, then we minimally
need to define when the contents of the byte[] may be changed (i.e.
can the payload setter re-use the same byte[] and change the contents
for successive tokens).

If we opt to treat payload like termBuffer and copy the bytes, then we
need no offset member.


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

View raw message