Lucene++ - a full-featured, c++ search engine
API Documentation
Go to the documentation of this file.
7 #ifndef SEGMENTMERGER_H
8 #define SEGMENTMERGER_H
95 bool storePositionWithTermVector,
bool storeOffsetWithTermVector,
bool storePayloads,
96 bool omitTFAndPositions);
138 virtual void work(
double units);
150 virtual void work(
double units);
void copyVectorsWithDeletions(const TermVectorsWriterPtr &termVectorsWriter, const TermVectorsReaderPtr &matchingVectorsReader, const IndexReaderPtr &reader)
Collection< Collection< int32_t > > docMaps
Definition: SegmentMerger.h:54
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
virtual ~CheckAbortNull()
The SegmentMerger class combines two or more Segments, represented by an IndexReader (add,...
Definition: SegmentMerger.h:20
boost::shared_ptr< OneMerge > OneMergePtr
Definition: LuceneTypes.h:192
Collection< int32_t > rawDocLengths
Definition: SegmentMerger.h:47
Collection< int32_t > getDelCounts()
static const int32_t NORMS_HEADER_LENGTH
Definition: SegmentMerger.h:60
int32_t merge()
Merges the readers specified by the add method into the directory passed to the constructor.
boost::shared_ptr< FormatPostingsTermsConsumer > FormatPostingsTermsConsumerPtr
Definition: LuceneTypes.h:145
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
CheckAbort(const OneMergePtr &merge, const DirectoryPtr &dir)
void mergeVectors()
Merge the TermVectors from each of the segments into the new one.
Definition: SegmentMerger.h:141
boost::shared_ptr< CheckAbort > CheckAbortPtr
Definition: LuceneTypes.h:94
bool omitTermFreqAndPositions
Definition: SegmentMerger.h:51
boost::weak_ptr< Directory > DirectoryWeakPtr
Definition: LuceneTypes.h:489
void setMatchingSegmentReaders()
void addIndexed(const IndexReaderPtr &reader, const FieldInfosPtr &fInfos, HashSet< String > names, bool storeTermVectors, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool storePayloads, bool omitTFAndPositions)
boost::shared_ptr< FormatPostingsFieldsConsumer > FormatPostingsFieldsConsumerPtr
Definition: LuceneTypes.h:141
int32_t copyFieldsNoDeletions(const FieldsWriterPtr &fieldsWriter, const IndexReaderPtr &reader, const FieldsReaderPtr &matchingFieldsReader)
int32_t termIndexInterval
Definition: SegmentMerger.h:31
Definition: AbstractAllTermDocs.h:12
Definition: SegmentMerger.h:122
void mergeTermInfos(const FormatPostingsFieldsConsumerPtr &consumer)
boost::shared_ptr< SegmentMergeQueue > SegmentMergeQueuePtr
Definition: LuceneTypes.h:213
boost::shared_ptr< FieldsWriter > FieldsWriterPtr
Definition: LuceneTypes.h:133
Base class for all Lucene classes.
Definition: LuceneObject.h:31
SegmentMerger(const DirectoryPtr &dir, const String &name)
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
OneMergePtr merge
Definition: SegmentMerger.h:131
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 in...
Collection< Collection< int32_t > > getDocMaps()
static const int32_t MAX_RAW_MERGE_DOCS
Maximum number of contiguous documents to bulk-copy when merging stored fields.
Definition: SegmentMerger.h:44
static const uint8_t NORMS_HEADER[]
norms header placeholder
Definition: SegmentMerger.h:59
String segment
Definition: SegmentMerger.h:30
void copyVectorsNoDeletions(const TermVectorsWriterPtr &termVectorsWriter, const TermVectorsReaderPtr &matchingVectorsReader, const IndexReaderPtr &reader)
void add(const IndexReaderPtr &reader)
Add an IndexReader to the collection of readers that are to be merged.
ByteArray payloadBuffer
Definition: SegmentMerger.h:53
FieldInfosPtr fieldInfos
Definition: SegmentMerger.h:34
SegmentMergeQueuePtr queue
Definition: SegmentMerger.h:50
IndexReaderPtr segmentReader(int32_t i)
boost::shared_ptr< TermVectorsWriter > TermVectorsWriterPtr
Definition: LuceneTypes.h:263
int32_t copyFieldsWithDeletions(const FieldsWriterPtr &fieldsWriter, const IndexReaderPtr &reader, const FieldsReaderPtr &matchingFieldsReader)
DirectoryWeakPtr _dir
Definition: SegmentMerger.h:132
Collection< IndexReaderPtr > readers
Definition: SegmentMerger.h:33
virtual void work(double units)
Records the fact that roughly units amount of work have been done since this method was last called....
boost::shared_ptr< Directory > DirectoryPtr
Definition: LuceneTypes.h:489
double workCount
Definition: SegmentMerger.h:127
Collection< SegmentReaderPtr > matchingSegmentReaders
Definition: SegmentMerger.h:46
CheckAbortPtr checkAbort
Definition: SegmentMerger.h:37
Collection< int32_t > rawDocLengths2
Definition: SegmentMerger.h:48
boost::shared_ptr< FieldsReader > FieldsReaderPtr
Definition: LuceneTypes.h:131
boost::shared_ptr< TermVectorsReader > TermVectorsReaderPtr
Definition: LuceneTypes.h:256
HashSet< String > getMergedFiles()
boost::shared_ptr< IndexWriter > IndexWriterPtr
Definition: LuceneTypes.h:160
DirectoryPtr directory
Definition: SegmentMerger.h:26
Collection< int32_t > delCounts
Definition: SegmentMerger.h:55
void closeReaders()
close all IndexReaders that have been added. Should not be called before merge().
int32_t mergedDocs
Definition: SegmentMerger.h:36
virtual void work(double units)
do nothing
HashSet< String > createCompoundFile(const String &fileName)
bool mergeDocStores
Whether we should merge doc stores (stored fields and vectors files). When all segments we are mergin...
Definition: SegmentMerger.h:41
clucene.sourceforge.net