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

Uwe Schindler commented on LUCENE-3084:
---------------------------------------

Just to note: 

Cutover to Set<SegmentInfos> was not intended for SegmentInfos itsself, it was 
proposed for the merge code (MergePolicy.OneMerge) only that returns which 
segments to merge. And there currently the interface is List, because of 
ordering (see LUCENE-1076).

NavigableSet ist Java 6. SortedSet only works if the set ordering is defined by 
its contents, which is not the case for SegmentInfos (the ordering is given by 
the file on disk). The only thing that could work is combination of List and 
Set, the Set only to check for duplicates. SegmentInfos is still required to be 
List-style, but should not allow to add the same SegmentInfo two times.

This is why I said let it implement List<SI>, this would also break no code.

> MergePolicy.OneMerge.segments should be List<SegmentInfo> not SegmentInfos
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-3084
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3084
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-3084-trunk-only.patch, 
> LUCENE-3084-trunk-only.patch, LUCENE-3084.patch
>
>
> SegmentInfos carries a bunch of fields beyond the list of SI, but for merging 
> purposes these fields are unused.
> We should cutover to List<SI> instead.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to