Not quite, because how positions are encoded depends on whether any payload appeared in that segment.

However, if 1) the input is a SegmentReader (since in general we can merge any IndexReader), and 2) its format is "congruent" with the format we are writing (ie both don't or do use the payloads format), which ought to be true the vast majority of the time, then I think we could simply copy bytes. Since the next TermInfo tells us the proxPointer where it begins, we know exactly how many bytes to copy. I think this'd be a nice optimization!

Mike

Paul Elschot wrote:


I'm looking at the for loop in SegmentMerger.java at line 666,
which completely interprets the input positions/payloads for
an input term at a document.

The positions/payloads don't change when they merged, is that correct?
I'm wondering whether this loop could be replaced by a direct copy from
the input postings to proxOutput.

Regards,
Paul Elschot

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to