| java.lang.Object org.apache.lucene.index.SegmentMerger
SegmentMerger | final class SegmentMerger (Code) | | The SegmentMerger class combines two or more Segments, represented by an IndexReader (
SegmentMerger.add ,
into a single Segment. After adding the appropriate readers, call the merge method to combine the
segments.
If the compoundFile flag is set, then the segments will be merged into a compound file.
See Also: SegmentMerger.merge See Also: SegmentMerger.add |
Inner Class :final static class CheckAbort | |
NORMS_HEADER | final static byte[] NORMS_HEADER(Code) | | norms header placeholder
|
SegmentMerger | SegmentMerger(Directory dir, String name)(Code) | | This ctor used only by test code.
Parameters: dir - The Directory to merge the other segments into Parameters: name - The name of the new segment |
add | final void add(IndexReader reader)(Code) | | Add an IndexReader to the collection of readers that are to be merged
Parameters: reader - |
closeReaders | final void closeReaders() throws IOException(Code) | | close all IndexReaders that have been added.
Should not be called before merge().
throws: IOException - |
merge | final int merge(boolean mergeDocStores) throws CorruptIndexException, IOException(Code) | | Merges the readers specified by the
SegmentMerger.add method
into the directory passed to the constructor.
Parameters: mergeDocStores - if false, we will not merge thestored fields nor vectors files The number of documents that were merged throws: CorruptIndexException - if the index is corrupt throws: IOException - if there is a low-level IO error |
segmentReader | final IndexReader segmentReader(int i)(Code) | | Parameters: i - The index of the reader to return The ith reader to be merged |
|
|