Lucene++ - a full-featured, c++ search engine
API Documentation

FormatPostingsDocsWriter.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef FORMATPOSTINGSDOCSWRITER_H
8 #define FORMATPOSTINGSDOCSWRITER_H
9
10 #include "FormatPostingsDocsConsumer.h"
11
12 namespace Lucene {
13
15 class FormatPostingsDocsWriter : public FormatPostingsDocsConsumer {
16 public:
17 FormatPostingsDocsWriter(const SegmentWriteStatePtr& state, const FormatPostingsTermsWriterPtr& parent);
18 virtual ~FormatPostingsDocsWriter();
19
20 LUCENE_CLASS(FormatPostingsDocsWriter);
21
22 public:
23 IndexOutputPtr out;
24 FormatPostingsTermsWriterWeakPtr _parent;
25 SegmentWriteStatePtr state;
26 FormatPostingsPositionsWriterPtr posWriter;
27 DefaultSkipListWriterPtr skipListWriter;
28 int32_t skipInterval;
29 int32_t totalNumDocs;
30
31 bool omitTermFreqAndPositions;
32 bool storePayloads;
33 int64_t freqStart;
34 FieldInfoPtr fieldInfo;
35
36 int32_t lastDocID;
37 int32_t df;
38
39 TermInfoPtr termInfo; // minimize consing
40 UTF8ResultPtr utf8;
41
42 public:
43 virtual void initialize();
44
45 void setField(const FieldInfoPtr& fieldInfo);
46
48 virtual FormatPostingsPositionsConsumerPtr addDoc(int32_t docID, int32_t termDocFreq);
49
51 virtual void finish();
52
53 void close();
54 };
55
56 }
57
58 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::FormatPostingsDocsWriter::storePayloads
bool storePayloads
Definition: FormatPostingsDocsWriter.h:32
Lucene::FormatPostingsDocsWriter::addDoc
virtual FormatPostingsPositionsConsumerPtr addDoc(int32_t docID, int32_t termDocFreq)
Adds a new doc in this term. If this returns null then we just skip consuming positions/payloads.
Lucene::DefaultSkipListWriterPtr
boost::shared_ptr< DefaultSkipListWriter > DefaultSkipListWriterPtr
Definition: LuceneTypes.h:104
Lucene::FormatPostingsDocsWriter::initialize
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
Lucene::FormatPostingsDocsWriter::skipInterval
int32_t skipInterval
Definition: FormatPostingsDocsWriter.h:28
Lucene::FormatPostingsDocsWriter::out
IndexOutputPtr out
Definition: FormatPostingsDocsWriter.h:20
Lucene::SegmentWriteStatePtr
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition: LuceneTypes.h:222
Lucene::FormatPostingsPositionsWriterPtr
boost::shared_ptr< FormatPostingsPositionsWriter > FormatPostingsPositionsWriterPtr
Definition: LuceneTypes.h:144
Lucene::FormatPostingsDocsWriter::termInfo
TermInfoPtr termInfo
Definition: FormatPostingsDocsWriter.h:39
Lucene::FormatPostingsDocsWriter::state
SegmentWriteStatePtr state
Definition: FormatPostingsDocsWriter.h:25
Lucene::FormatPostingsDocsWriter::~FormatPostingsDocsWriter
virtual ~FormatPostingsDocsWriter()
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::FormatPostingsDocsConsumer
Definition: FormatPostingsDocsConsumer.h:14
Lucene::FieldInfoPtr
boost::shared_ptr< FieldInfo > FieldInfoPtr
Definition: LuceneTypes.h:126
Lucene::FormatPostingsDocsWriter::utf8
UTF8ResultPtr utf8
Definition: FormatPostingsDocsWriter.h:40
Lucene::FormatPostingsDocsWriter::close
void close()
Lucene::FormatPostingsDocsWriter::_parent
FormatPostingsTermsWriterWeakPtr _parent
Definition: FormatPostingsDocsWriter.h:24
Lucene::FormatPostingsPositionsConsumerPtr
boost::shared_ptr< FormatPostingsPositionsConsumer > FormatPostingsPositionsConsumerPtr
Definition: LuceneTypes.h:143
Lucene::FormatPostingsDocsWriter::FormatPostingsDocsWriter
FormatPostingsDocsWriter(const SegmentWriteStatePtr &state, const FormatPostingsTermsWriterPtr &parent)
Lucene::FormatPostingsDocsWriter::lastDocID
int32_t lastDocID
Definition: FormatPostingsDocsWriter.h:36
Lucene::TermInfoPtr
boost::shared_ptr< TermInfo > TermInfoPtr
Definition: LuceneTypes.h:239
Lucene::FormatPostingsDocsWriter::freqStart
int64_t freqStart
Definition: FormatPostingsDocsWriter.h:33
Lucene::FormatPostingsDocsWriter::skipListWriter
DefaultSkipListWriterPtr skipListWriter
Definition: FormatPostingsDocsWriter.h:27
Lucene::FormatPostingsDocsWriter::posWriter
FormatPostingsPositionsWriterPtr posWriter
Definition: FormatPostingsDocsWriter.h:26
FormatPostingsDocsConsumer.h
Lucene::FormatPostingsDocsWriter::totalNumDocs
int32_t totalNumDocs
Definition: FormatPostingsDocsWriter.h:29
Lucene::FormatPostingsDocsWriter::df
int32_t df
Definition: FormatPostingsDocsWriter.h:37
Lucene::FormatPostingsTermsWriterPtr
boost::shared_ptr< FormatPostingsTermsWriter > FormatPostingsTermsWriterPtr
Definition: LuceneTypes.h:146
Lucene::FormatPostingsDocsWriter::finish
virtual void finish()
Called when we are done adding docs to this term.
Lucene::FormatPostingsDocsWriter::omitTermFreqAndPositions
bool omitTermFreqAndPositions
Definition: FormatPostingsDocsWriter.h:31
Lucene::FormatPostingsDocsWriter::setField
void setField(const FieldInfoPtr &fieldInfo)
Lucene::FormatPostingsDocsWriter::fieldInfo
FieldInfoPtr fieldInfo
Definition: FormatPostingsDocsWriter.h:34
Lucene::FormatPostingsDocsWriter
Consumes doc & freq, writing them using the current index file format.
Definition: FormatPostingsDocsWriter.h:15
Lucene::FormatPostingsTermsWriterWeakPtr
boost::weak_ptr< FormatPostingsTermsWriter > FormatPostingsTermsWriterWeakPtr
Definition: LuceneTypes.h:146
Lucene::UTF8ResultPtr
boost::shared_ptr< UTF8Result > UTF8ResultPtr
Definition: LuceneTypes.h:559
Lucene::IndexOutputPtr
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494

clucene.sourceforge.net