lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Merge information in segment files
Date Fri, 16 Nov 2012 12:26:22 GMT
On Fri, Nov 16, 2012 at 7:17 AM, Alan Woodward
<> wrote:

> Do you think it's worth promoting to a first-class API?  Just a boolean - isMerged(),
or something.

I'm a little bit nervous about that ... ie it's revealing something of
Lucene's internals?

For example, long ago Lucene used to write each document as a single
segment in a RAMDir and then merge segments (still in RAMDir) and then
eventually flush them.  (The code was WONDERFULLY simple/elegant
compared to what we have today :) )

In that world, technically that flushed segment was "merged", but for
your use case I think you would want to treat it as not merged?

We could go back to doing something like this with IW some day ... it
can result in more efficient RAM usage since a written segment is much
more compact than the in-memory postings data structures... and then
what should we return for isMerged?

Could you instead wrap the MergeScheduler and note when merges had completed?

Also: is this because ExternaFileFIeld is used on the top-level
reader?  If it's per segment it seems like you wouldn't need to track

Mike McCandless

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

View raw message