lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rutherglen <>
Subject Re: custom segment files
Date Fri, 18 Sep 2009 01:09:34 GMT
I believe you could override the IW.flush and IW.mergeSuccess
methods. flush unfortunately doesn't expose the new SegmentInfo,
however it could be obtained via
IW.getReader().getSequentialSubReaders (by comparing the before
and after).

Adjacent segment files could then be maintained without hacking into

On Thu, Sep 17, 2009 at 7:00 AM, John Wang <> wrote:
> Hi guys:
>      I am trying to figure how to add the ability to create custom segment
> files. Hopefully it is possible to create a plugin framework where one can
> provide some sort of callback to add to a segment given a doc and provide
> some sort of merge logic. This is in light of the flexible indexing effort.
>      After digging thru the latest trunk code in that area, I see a
> Writer/WriterPerThread pattern for different types of segment files, e.g.
> Stored data, norms, inverted doc, etc.
>      Do you think it is a good idea to consolidate them? Are there
> intricacies where there are cross dependency between different types of
> writers?
>      Merge logic seems to be in the SegmentMerger class. Seems to do this,
> it would be good to separate it out to per writer type.
>       I am still trying to understand the code, any help is greatly
> appreciated.
> Thoughts?
> Thanks
> -John

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

View raw message