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

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

OK! Thanks Mike

bq. mapIndexesInvalid

I will remove the map again and replace by a simple Set. Using a map that maps 
to indexes is too complicated and does not bring us anything. contains() works 
without and indexOf() needs to rebuild the map whenever an insert or remove is 
done. Especially on remove(SI) it will rebuild the map two times in the badest 
case.

A linear scan for indexOf is in my opinion fine. We can only optimize by doing 
a contains on the set first.

> MergePolicy.OneMerge.segments should be List<SegmentInfo> not SegmentInfos, 
> Remove Vector<SI> subclassing from SegmentInfos & more refactoring
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
>                 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-trunk-only.patch, 
> LUCENE-3084-trunk-only.patch, LUCENE-3084-trunk-only.patch, 
> LUCENE-3084-trunk-only.patch, 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.
> Also SegmentInfos subclasses Vector<SI>, this should be removed and the 
> collections be hidden inside the class. We can add unmodifiable views on it 
> (asList(), asSet()).

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