lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Could positions/payloads in SegmentMerger be copied directly?
Date Fri, 19 Sep 2008 15:05:29 GMT

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!


Paul Elschot wrote:

> I'm looking at the for loop in 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:
> For additional commands, e-mail:

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

View raw message