Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Classes | Public Member Functions | List of all members
Lucene.Net.Index.SegmentMerger Class Reference

The SegmentMerger class combines two or more Segments, represented by an IndexReader (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. More...

Classes

class  CheckAbort
 

Public Member Functions

 SegmentMerger (Directory dir, System.String name)
 This ctor used only by test code.
 
void Add (IndexReader reader)
 Add an IndexReader to the collection of readers that are to be merged
 
int Merge ()
 Merges the readers specified by the Add method into the directory passed to the constructor
 
ICollection< string > CreateCompoundFile (System.String fileName)
 

Detailed Description

The SegmentMerger class combines two or more Segments, represented by an IndexReader (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
Merge()
See Also
Add

Definition at line 44 of file SegmentMerger.cs.

Constructor & Destructor Documentation

Lucene.Net.Index.SegmentMerger.SegmentMerger ( Directory  dir,
System.String  name 
)

This ctor used only by test code.

Parameters
dirThe Directory to merge the other segments into
nameThe name of the new segment

Definition at line 132 of file SegmentMerger.cs.

Member Function Documentation

void Lucene.Net.Index.SegmentMerger.Add ( IndexReader  reader)

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

Parameters
reader

Definition at line 164 of file SegmentMerger.cs.

ICollection<string> Lucene.Net.Index.SegmentMerger.CreateCompoundFile ( System.String  fileName)

Definition at line 272 of file SegmentMerger.cs.

int Lucene.Net.Index.SegmentMerger.Merge ( )

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

Returns
The number of documents that were merged

<throws> CorruptIndexException if the index is corrupt </throws> <throws> IOException if there is a low-level IO error </throws>

Definition at line 184 of file SegmentMerger.cs.


The documentation for this class was generated from the following file: