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

FormatPostingsPositionsWriter.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 FORMATPOSTINGSPOSITIONSWRITER_H
8 #define FORMATPOSTINGSPOSITIONSWRITER_H
9
10 #include "FormatPostingsPositionsConsumer.h"
11
12 namespace Lucene {
13
14 class FormatPostingsPositionsWriter : public FormatPostingsPositionsConsumer {
15 public:
16 FormatPostingsPositionsWriter(const SegmentWriteStatePtr& state, const FormatPostingsDocsWriterPtr& parent);
17 virtual ~FormatPostingsPositionsWriter();
18
19 LUCENE_CLASS(FormatPostingsPositionsWriter);
20
21 public:
22 FormatPostingsDocsWriterWeakPtr _parent;
23 IndexOutputPtr out;
24
25 bool omitTermFreqAndPositions;
26 bool storePayloads;
27 int32_t lastPayloadLength;
28
29 int32_t lastPosition;
30
31 public:
33 virtual void addPosition(int32_t position, ByteArray payload, int32_t payloadOffset, int32_t payloadLength);
34
35 void setField(const FieldInfoPtr& fieldInfo);
36
38 virtual void finish();
39
40 void close();
41 };
42
43 }
44
45 #endif
Lucene::FormatPostingsPositionsWriter::storePayloads
bool storePayloads
Definition: FormatPostingsPositionsWriter.h:26
Lucene::FormatPostingsPositionsWriter::close
void close()
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::FormatPostingsPositionsWriter::~FormatPostingsPositionsWriter
virtual ~FormatPostingsPositionsWriter()
FormatPostingsPositionsConsumer.h
Lucene::FormatPostingsPositionsConsumer
Definition: FormatPostingsPositionsConsumer.h:14
Lucene::FormatPostingsDocsWriterWeakPtr
boost::weak_ptr< FormatPostingsDocsWriter > FormatPostingsDocsWriterWeakPtr
Definition: LuceneTypes.h:140
Lucene::FormatPostingsPositionsWriter::lastPayloadLength
int32_t lastPayloadLength
Definition: FormatPostingsPositionsWriter.h:27
Lucene::SegmentWriteStatePtr
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition: LuceneTypes.h:222
Lucene::FormatPostingsPositionsWriter::FormatPostingsPositionsWriter
FormatPostingsPositionsWriter(const SegmentWriteStatePtr &state, const FormatPostingsDocsWriterPtr &parent)
Lucene::FormatPostingsPositionsWriter
Definition: FormatPostingsPositionsWriter.h:14
Lucene::FormatPostingsPositionsWriter::lastPosition
int32_t lastPosition
Definition: FormatPostingsPositionsWriter.h:29
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::FieldInfoPtr
boost::shared_ptr< FieldInfo > FieldInfoPtr
Definition: LuceneTypes.h:126
Lucene::FormatPostingsPositionsWriter::out
IndexOutputPtr out
Definition: FormatPostingsPositionsWriter.h:23
Lucene::FormatPostingsPositionsWriter::_parent
FormatPostingsDocsWriterWeakPtr _parent
Definition: FormatPostingsPositionsWriter.h:19
Lucene::FormatPostingsPositionsWriter::finish
virtual void finish()
Called when we are done adding positions & payloads.
Lucene::FormatPostingsPositionsWriter::omitTermFreqAndPositions
bool omitTermFreqAndPositions
Definition: FormatPostingsPositionsWriter.h:25
Lucene::FormatPostingsPositionsWriter::setField
void setField(const FieldInfoPtr &fieldInfo)
Lucene::FormatPostingsPositionsWriter::addPosition
virtual void addPosition(int32_t position, ByteArray payload, int32_t payloadOffset, int32_t payloadLength)
Add a new position & payload.
Lucene::FormatPostingsDocsWriterPtr
boost::shared_ptr< FormatPostingsDocsWriter > FormatPostingsDocsWriterPtr
Definition: LuceneTypes.h:140
Lucene::IndexOutputPtr
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494

clucene.sourceforge.net