"Michael Busch" <[EMAIL PROTECTED]> wrote:
> Michael McCandless wrote:
>
> >>
> >> class Token {
> >> byte[] payload;
> >> int payloadLength;
> >> void setPayload(byte[], int length)
> >> byte[] getPayload()
> >> int getPayloadLength()
> >> ...
> >> }
> >
> > +1
> >
> > Mike
> >
>
> Mike,
>
> just to clarify: I had suggested this at the ApacheCon because I believe
> now that we have the DocumentsWriter we don't need such a "container
> object" anymore, because we can write the payload bytes directly into
> the proxStream, right? Before, in DocumentWriter, we needed it while
> sorting the postings.
> Would it be sufficient to change DocumentsWriter#addPosition(Token) to
> use the new methods in Token instead of using the Payloads object?
Exactly: DocumentsWriter writes the bytes immediately into the
proxStream. You should only need to change addPosition: I think it
can access these new [package protected] fields directly from the
Token, instead of using the separate Payload object.
> Oh and Yonik, I think in addition we'd also need a payloadOffset member?
Oh yes, we need offset too.
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]