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 21:20:28 GMT
On Nov 19, 2007 3:18 PM, Michael McCandless <> wrote:
> I'm not sure this is good?  Don't we want to [efficiently] allow
> filters down the line to modify a payload (just like filters can
> modify the char[] termBuffer)?  Admittedly I would expect it to be
> rare but I'm not sure we want to entirely rule out doing so
> efficiently?


So I think we all agree to do payloads by reference (do not make a
copy of byte[] like termBuffer does), and to allow payload reuse.

So now we still have 3 viable options still on the table I think:
Token{ byte[] payload, int payloadLength, ...}
Token{ byte[] payload, int payloadOffset, int payloadLength,...}
Token{ Payload p, ... }

If we go with Payload p, we could
- Allow reuse of the Payload object itself (no reason not too right?)
 If so, add a setter
  Payload.set(byte[] payload, int offset, int length)
- Allow modification of payloads by other filters?  If so, add a getter
  byte[] getBytes()


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

View raw message