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.
|
|
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.
|
|
void | mergeNorms () |
|
| LuceneObject () |
|
|
static const int32_t | MAX_RAW_MERGE_DOCS |
| Maximum number of contiguous documents to bulk-copy when merging stored fields.
|
|
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
◆ SegmentMerger() [1/2]
Lucene::SegmentMerger::SegmentMerger |
( |
const DirectoryPtr & |
dir, |
|
|
const String & |
name |
|
) |
| |
◆ SegmentMerger() [2/2]
◆ ~SegmentMerger()
virtual Lucene::SegmentMerger::~SegmentMerger |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::SegmentMerger::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ add()
Add an IndexReader to the collection of readers that are to be merged.
◆ addIndexed()
void Lucene::SegmentMerger::addIndexed |
( |
const IndexReaderPtr & |
reader, |
|
|
const FieldInfosPtr & |
fInfos, |
|
|
HashSet< String > |
names, |
|
|
bool |
storeTermVectors, |
|
|
bool |
storePositionWithTermVector, |
|
|
bool |
storeOffsetWithTermVector, |
|
|
bool |
storePayloads, |
|
|
bool |
omitTFAndPositions |
|
) |
| |
|
protected |
◆ appendPostings()
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
◆ closeReaders()
void Lucene::SegmentMerger::closeReaders |
( |
| ) |
|
close all IndexReaders that have been added. Should not be called before merge().
◆ copyFieldsNoDeletions()
◆ copyFieldsWithDeletions()
◆ copyVectorsNoDeletions()
◆ copyVectorsWithDeletions()
◆ createCompoundFile()
HashSet< String > Lucene::SegmentMerger::createCompoundFile |
( |
const String & |
fileName | ) |
|
◆ getClassName()
virtual String Lucene::SegmentMerger::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ getDelCounts()
Collection< int32_t > Lucene::SegmentMerger::getDelCounts |
( |
| ) |
|
◆ getDocMaps()
◆ getMergedFiles()
HashSet< String > Lucene::SegmentMerger::getMergedFiles |
( |
| ) |
|
◆ hasProx()
bool Lucene::SegmentMerger::hasProx |
( |
| ) |
|
◆ merge() [1/2]
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
◆ merge() [2/2]
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
◆ mergeFields()
int32_t Lucene::SegmentMerger::mergeFields |
( |
| ) |
|
- Returns
- The number of documents in all of the readers
◆ mergeNorms()
void Lucene::SegmentMerger::mergeNorms |
( |
| ) |
|
|
protected |
◆ mergeTermInfos()
◆ mergeTerms()
void Lucene::SegmentMerger::mergeTerms |
( |
| ) |
|
|
protected |
◆ mergeVectors()
void Lucene::SegmentMerger::mergeVectors |
( |
| ) |
|
|
protected |
Merge the TermVectors from each of the segments into the new one.
◆ segmentReader()
- Parameters
-
i | The index of the reader to return |
- Returns
- The i'th reader to be merged
◆ setMatchingSegmentReaders()
void Lucene::SegmentMerger::setMatchingSegmentReaders |
( |
| ) |
|
|
protected |
◆ shared_from_this()
boost::shared_ptr< SegmentMerger > Lucene::SegmentMerger::shared_from_this |
( |
| ) |
|
|
inline |
◆ checkAbort
◆ delCounts
Collection<int32_t> Lucene::SegmentMerger::delCounts |
|
protected |
◆ directory
◆ docMaps
◆ fieldInfos
◆ matchingSegmentReaders
◆ MAX_RAW_MERGE_DOCS
const int32_t Lucene::SegmentMerger::MAX_RAW_MERGE_DOCS |
|
staticprotected |
Maximum number of contiguous documents to bulk-copy when merging stored fields.
◆ mergedDocs
int32_t Lucene::SegmentMerger::mergedDocs |
|
protected |
◆ mergeDocStores
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.
◆ NORMS_HEADER
const uint8_t Lucene::SegmentMerger::NORMS_HEADER[] |
|
static |
◆ NORMS_HEADER_LENGTH
const int32_t Lucene::SegmentMerger::NORMS_HEADER_LENGTH |
|
static |
◆ omitTermFreqAndPositions
bool Lucene::SegmentMerger::omitTermFreqAndPositions |
|
protected |
◆ payloadBuffer
ByteArray Lucene::SegmentMerger::payloadBuffer |
|
protected |
◆ queue
◆ rawDocLengths
Collection<int32_t> Lucene::SegmentMerger::rawDocLengths |
|
protected |
◆ rawDocLengths2
Collection<int32_t> Lucene::SegmentMerger::rawDocLengths2 |
|
protected |
◆ readers
◆ segment
String Lucene::SegmentMerger::segment |
|
protected |
◆ termIndexInterval
int32_t Lucene::SegmentMerger::termIndexInterval |
|
protected |
The documentation for this class was generated from the following file: