C# Class Lucene.Net.Index.SegmentMerger

The SegmentMerger class combines two or more Segments, represented by an IndexReader, into a single Segment. Call the merge method to combine the segments.
Show file Open project: synhershko/lucene.net Class Usage Examples

Public Methods

Method Description
Add ( IndexReader reader ) : void

Add an IndexReader to the collection of readers that are to be merged

CreateCompoundFile ( System fileName ) : ICollection
Merge ( ) : int

Merges the readers specified by the Add method into the directory passed to the constructor

SegmentMerger ( Lucene.Net.Store.Directory dir, System name ) : System

This ctor used only by test code.

Private Methods

Method Description
AddIndexed ( IndexReader reader, Lucene.Net.Index.FieldInfos fInfos, ICollection names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool storePayloads, bool omitTFAndPositions ) : void
AppendPostings ( Lucene.Net.Index.FormatPostingsTermsConsumer termsConsumer, Lucene.Net.Index.SegmentMergeInfo smis, int n ) : int

Process postings from multiple segments all positioned on the same term. Writes out merged entries into freqOutput and the proxOutput streams.

CloseReaders ( ) : void

close all IndexReaders that have been added. Should not be called before merge().

CopyFieldsNoDeletions ( Lucene.Net.Index.FieldsWriter fieldsWriter, IndexReader reader, Lucene.Net.Index.FieldsReader matchingFieldsReader ) : int
CopyFieldsWithDeletions ( Lucene.Net.Index.FieldsWriter fieldsWriter, IndexReader reader, Lucene.Net.Index.FieldsReader matchingFieldsReader ) : int
CopyVectorsNoDeletions ( Lucene.Net.Index.TermVectorsWriter termVectorsWriter, Lucene.Net.Index.TermVectorsReader matchingVectorsReader, IndexReader reader ) : void
CopyVectorsWithDeletions ( Lucene.Net.Index.TermVectorsWriter termVectorsWriter, Lucene.Net.Index.TermVectorsReader matchingVectorsReader, IndexReader reader ) : void
GetDelCounts ( ) : int[]
GetDocMaps ( ) : int[][]
GetMergedFiles ( ) : ICollection
HasProx ( ) : bool
InitBlock ( ) : void
Merge ( bool mergeDocStores ) : int

Merges the readers specified by the Add method into the directory passed to the constructor.

MergeFields ( ) : int

MergeNorms ( ) : void
MergeTermInfos ( Lucene.Net.Index.FormatPostingsFieldsConsumer consumer ) : void
MergeTerms ( ) : void
MergeVectors ( ) : void

Merge the TermVectors from each of the segments into the new one.

SegmentMerger ( IndexWriter writer, System name, MergePolicy merge ) : System
SegmentReader ( int i ) : IndexReader

SetMatchingSegmentReaders ( ) : void

Method Details

Add() public method

Add an IndexReader to the collection of readers that are to be merged
public Add ( IndexReader reader ) : void
reader IndexReader ///
return void

CreateCompoundFile() public method

public CreateCompoundFile ( System fileName ) : ICollection
fileName System
return ICollection

Merge() public method

Merges the readers specified by the Add method into the directory passed to the constructor
public Merge ( ) : int
return int

SegmentMerger() public method

This ctor used only by test code.
public SegmentMerger ( Lucene.Net.Store.Directory dir, System name ) : System
dir Lucene.Net.Store.Directory The Directory to merge the other segments into ///
name System The name of the new segment ///
return System