[ 
https://issues.apache.org/jira/browse/LUCENE-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518222
 ] 

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: https://issues.apache.org/jira/browse/LUCENE-847
>             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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to