lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Parkes (JIRA)" <>
Subject [jira] Commented: (LUCENE-847) Factor merge policy out of IndexWriter
Date Tue, 07 Aug 2007 18:35:59 GMT


Steven Parkes commented on LUCENE-847:

On a related note, Mike, there a few FIXME's in IW related to useCompoundFile: it doesn't
exist in IW anymore (other than as a deprecated feature). The goal was to allow merge policies
to decide when to use compound files, perhaps on a segment-by-segment basis. That all works
fine for merge operations.

But there's also the case of new segments, what format they should be in. These are segments
that are going to be created by IW (via DocsWriter?) My stab at this was to have IW ask the
merge policy. Since this isn't a merge, per say, the IW passes to the merge policy the current
set of segment infos and the new segment info, asking what format the new segment info should
use. So MergePolicy has

	boolean useCompoundFile(SegmentInfos segments, SegmentInfo newSegment);

Looking at IW, with the new DocsWriter stuff, it looks like there isn't a segmentInfo object
for the new segment at the time the predicate is being called. Would it be possible to make
one? Something like DocumentsWriter#getDocStoreSegmentInfo() analogous to DocumentsWriter#getDocStoreSegment()?
It could be an object just thrown away.

Is this a bad idea?

> Factor merge policy out of IndexWriter
> --------------------------------------
>                 Key: LUCENE-847
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>            Reporter: Steven Parkes
>            Assignee: Steven Parkes
>         Attachments: concurrentMerge.patch, LUCENE-847.patch.txt, LUCENE-847.txt
> If we factor the merge policy out of IndexWriter, we can make it pluggable, making it
possible for apps to choose a custom merge policy and for easier experimenting with merge
policy variants.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message