lucene::index::SegmentMerger Class Reference
The SegmentMerger class combines two or more Segments, represented by an IndexReader (add, into a single Segment.
More...
#include <SegmentMerger.h>
List of all members.
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
-
add
Constructor & Destructor Documentation
| lucene::index::SegmentMerger::SegmentMerger |
( |
IndexWriter * |
writer, |
|
|
const char * |
name | |
|
) |
| | |
- Parameters:
-
| dir | The Directory to merge the other segments into |
| name | The name of the new segment |
| compoundFile | true if the new segment should use a compoundFile |
| lucene::index::SegmentMerger::~SegmentMerger |
( |
|
) |
|
Member Function Documentation
| void lucene::index::SegmentMerger::add |
( |
IndexReader * |
reader |
) |
|
Add an IndexReader to the collection of readers that are to be merged.
- Parameters:
-
| void lucene::index::SegmentMerger::closeReaders |
( |
|
) |
|
close all IndexReaders that have been added.
Should not be called before merge().
- Exceptions:
-
| int32_t lucene::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
- Exceptions:
-
| IndexReader* lucene::index::SegmentMerger::segmentReader |
( |
const int32_t |
i |
) |
|
- Parameters:
-
| i | The index of the reader to return |
- Returns:
- The ith reader to be merged
Friends And Related Function Documentation
The documentation for this class was generated from the following file: