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.
More...
#include <SegmentMerger.h>
|
void | addIndexed (const IndexReaderPtr &reader, const FieldInfosPtr &fInfos, HashSet< String > names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool storePayloads, bool omitTFAndPositions) |
|
void | setMatchingSegmentReaders () |
|
int32_t | copyFieldsWithDeletions (const FieldsWriterPtr &fieldsWriter, const IndexReaderPtr &reader, const FieldsReaderPtr &matchingFieldsReader) |
|
int32_t | copyFieldsNoDeletions (const FieldsWriterPtr &fieldsWriter, const IndexReaderPtr &reader, const FieldsReaderPtr &matchingFieldsReader) |
|
void | mergeVectors () |
| Merge the TermVectors from each of the segments into the new one. More...
|
|
void | copyVectorsWithDeletions (const TermVectorsWriterPtr &termVectorsWriter, const TermVectorsReaderPtr &matchingVectorsReader, const IndexReaderPtr &reader) |
|
void | copyVectorsNoDeletions (const TermVectorsWriterPtr &termVectorsWriter, const TermVectorsReaderPtr &matchingVectorsReader, const IndexReaderPtr &reader) |
|
void | mergeTerms () |
|
void | mergeTermInfos (const FormatPostingsFieldsConsumerPtr &consumer) |
|
int32_t | appendPostings (const FormatPostingsTermsConsumerPtr &termsConsumer, Collection< SegmentMergeInfoPtr > smis, int32_t n) |
| Process postings from multiple segments all positioned on the same term. Writes out merged entries into freqOutput and the proxOutput streams. More...
|
|
void | mergeNorms () |
|
| LuceneObject () |
|
|
static const int32_t | MAX_RAW_MERGE_DOCS |
| Maximum number of contiguous documents to bulk-copy when merging stored fields. More...
|
|
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
Lucene::SegmentMerger::SegmentMerger |
( |
const DirectoryPtr & |
dir, |
|
|
const String & |
name |
|
) |
| |
virtual Lucene::SegmentMerger::~SegmentMerger |
( |
| ) |
|
|
virtual |
static String Lucene::SegmentMerger::_getClassName |
( |
| ) |
|
|
inlinestatic |
Add an IndexReader to the collection of readers that are to be merged.
void Lucene::SegmentMerger::addIndexed |
( |
const IndexReaderPtr & |
reader, |
|
|
const FieldInfosPtr & |
fInfos, |
|
|
HashSet< String > |
names, |
|
|
bool |
storeTermVectors, |
|
|
bool |
storePositionWithTermVector, |
|
|
bool |
storeOffsetWithTermVector, |
|
|
bool |
storePayloads, |
|
|
bool |
omitTFAndPositions |
|
) |
| |
|
protected |
Process postings from multiple segments all positioned on the same term. Writes out merged entries into freqOutput and the proxOutput streams.
- Parameters
-
smis | array of segments |
n | number of cells in the array actually occupied |
- Returns
- number of documents across all segments where this term was found
void Lucene::SegmentMerger::closeReaders |
( |
| ) |
|
close all IndexReaders that have been added. Should not be called before merge().
HashSet<String> Lucene::SegmentMerger::createCompoundFile |
( |
const String & |
fileName | ) |
|
virtual String Lucene::SegmentMerger::getClassName |
( |
| ) |
|
|
inlinevirtual |
Collection<int32_t> Lucene::SegmentMerger::getDelCounts |
( |
| ) |
|
HashSet<String> Lucene::SegmentMerger::getMergedFiles |
( |
| ) |
|
bool Lucene::SegmentMerger::hasProx |
( |
| ) |
|
int32_t Lucene::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
int32_t Lucene::SegmentMerger::merge |
( |
bool |
mergeDocStores | ) |
|
Merges the readers specified by the add method into the directory passed to the constructor.
- Parameters
-
mergeDocStores | if false, we will not merge the stored fields nor vectors files |
- Returns
- The number of documents that were merged
int32_t Lucene::SegmentMerger::mergeFields |
( |
| ) |
|
- Returns
- The number of documents in all of the readers
void Lucene::SegmentMerger::mergeNorms |
( |
| ) |
|
|
protected |
void Lucene::SegmentMerger::mergeTerms |
( |
| ) |
|
|
protected |
void Lucene::SegmentMerger::mergeVectors |
( |
| ) |
|
|
protected |
Merge the TermVectors from each of the segments into the new one.
- Parameters
-
i | The index of the reader to return |
- Returns
- The i'th reader to be merged
void Lucene::SegmentMerger::setMatchingSegmentReaders |
( |
| ) |
|
|
protected |
boost::shared_ptr< SegmentMerger > Lucene::SegmentMerger::shared_from_this |
( |
| ) |
|
|
inline |
Collection<int32_t> Lucene::SegmentMerger::delCounts |
|
protected |
const int32_t Lucene::SegmentMerger::MAX_RAW_MERGE_DOCS |
|
staticprotected |
Maximum number of contiguous documents to bulk-copy when merging stored fields.
int32_t Lucene::SegmentMerger::mergedDocs |
|
protected |
bool Lucene::SegmentMerger::mergeDocStores |
|
protected |
Whether we should merge doc stores (stored fields and vectors files). When all segments we are merging already share the same doc store files, we don't need to merge the doc stores.
const uint8_t Lucene::SegmentMerger::NORMS_HEADER[] |
|
static |
const int32_t Lucene::SegmentMerger::NORMS_HEADER_LENGTH |
|
static |
bool Lucene::SegmentMerger::omitTermFreqAndPositions |
|
protected |
ByteArray Lucene::SegmentMerger::payloadBuffer |
|
protected |
Collection<int32_t> Lucene::SegmentMerger::rawDocLengths |
|
protected |
Collection<int32_t> Lucene::SegmentMerger::rawDocLengths2 |
|
protected |
String Lucene::SegmentMerger::segment |
|
protected |
int32_t Lucene::SegmentMerger::termIndexInterval |
|
protected |
The documentation for this class was generated from the following file: