lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3084) MergePolicy.OneMerge.segments should be List<SegmentInfo> not SegmentInfos
Date Thu, 12 May 2011 07:03:47 GMT


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:
>             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:

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

View raw message