lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Busch <busch...@gmail.com>
Subject Re: Payload API
Date Sun, 18 Nov 2007 18:05:28 GMT
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?

Oh and Yonik, I think in addition we'd also need a payloadOffset member?

I'm wondering whether we should just remove the old API because Payloads
is still considered a beta feature, or if we should keep and deprecate
the old API until the next release?

-Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message