2 * Copyright 2004 The Apache Software Foundation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 namespace Lucene
.Net
.Index
20 sealed class SegmentMergeInfo
23 internal int base_Renamed
;
24 internal TermEnum termEnum
;
25 internal IndexReader reader
;
26 internal TermPositions postings
;
27 internal int[] docMap
= null; // maps around deleted docs
29 internal SegmentMergeInfo(int b
, TermEnum te
, IndexReader r
)
35 postings
= reader
.TermPositions();
37 // build array which maps document numbers around deletions
38 if (reader
.HasDeletions())
40 int maxDoc
= reader
.MaxDoc();
41 docMap
= new int[maxDoc
];
43 for (int i
= 0; i
< maxDoc
; i
++)
45 if (reader
.IsDeleted(i
))
57 term
= termEnum
.Term();