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

Loading...
Searching...
No Matches
DefaultSkipListWriter.h
Go to the documentation of this file.
1
2// 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 DEFAULTSKIPLISTWRITER_H
8#define DEFAULTSKIPLISTWRITER_H
9
10#include "MultiLevelSkipListWriter.h"
11
12 namespace Lucene {
13
15 class DefaultSkipListWriter : public MultiLevelSkipListWriter {
16 public:
17 DefaultSkipListWriter(int32_t skipInterval, int32_t numberOfSkipLevels, int32_t docCount, const IndexOutputPtr& freqOutput, const IndexOutputPtr& proxOutput);
18 virtual ~DefaultSkipListWriter();
19
20 LUCENE_CLASS(DefaultSkipListWriter);
21
22 protected:
23 Collection<int32_t> lastSkipDoc;
24 Collection<int32_t> lastSkipPayloadLength;
25 Collection<int64_t> lastSkipFreqPointer;
26 Collection<int64_t> lastSkipProxPointer;
27
28 IndexOutputPtr freqOutput;
29 IndexOutputPtr proxOutput;
30
31 int32_t curDoc;
32 bool curStorePayloads;
33 int32_t curPayloadLength;
34 int64_t curFreqPointer;
35 int64_t curProxPointer;
36
37 public:
38 void setFreqOutput(const IndexOutputPtr& freqOutput);
39 void setProxOutput(const IndexOutputPtr& proxOutput);
40
42 void setSkipData(int32_t doc, bool storePayloads, int32_t payloadLength);
43
44 protected:
45 virtual void resetSkip();
46 virtual void writeSkipData(int32_t level, const IndexOutputPtr& skipBuffer);
47
48 friend class FormatPostingsTermsWriter;
49};
50
51}
52
53#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
MultiLevelSkipListWriter.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::DefaultSkipListWriter
Implements the skip list writer for the default posting list format that stores positions and payload...
Definition DefaultSkipListWriter.h:15
Lucene::DefaultSkipListWriter::freqOutput
IndexOutputPtr freqOutput
Definition DefaultSkipListWriter.h:28
Lucene::DefaultSkipListWriter::curDoc
int32_t curDoc
Definition DefaultSkipListWriter.h:31
Lucene::DefaultSkipListWriter::resetSkip
virtual void resetSkip()
Lucene::DefaultSkipListWriter::lastSkipFreqPointer
Collection< int64_t > lastSkipFreqPointer
Definition DefaultSkipListWriter.h:25
Lucene::DefaultSkipListWriter::lastSkipDoc
Collection< int32_t > lastSkipDoc
Definition DefaultSkipListWriter.h:23
Lucene::DefaultSkipListWriter::~DefaultSkipListWriter
virtual ~DefaultSkipListWriter()
Lucene::DefaultSkipListWriter::DefaultSkipListWriter
DefaultSkipListWriter(int32_t skipInterval, int32_t numberOfSkipLevels, int32_t docCount, const IndexOutputPtr &freqOutput, const IndexOutputPtr &proxOutput)
Lucene::DefaultSkipListWriter::proxOutput
IndexOutputPtr proxOutput
Definition DefaultSkipListWriter.h:29
Lucene::DefaultSkipListWriter::curStorePayloads
bool curStorePayloads
Definition DefaultSkipListWriter.h:32
Lucene::DefaultSkipListWriter::curPayloadLength
int32_t curPayloadLength
Definition DefaultSkipListWriter.h:33
Lucene::DefaultSkipListWriter::curFreqPointer
int64_t curFreqPointer
Definition DefaultSkipListWriter.h:34
Lucene::DefaultSkipListWriter::setSkipData
void setSkipData(int32_t doc, bool storePayloads, int32_t payloadLength)
Sets the values for the current skip data.
Lucene::DefaultSkipListWriter::curProxPointer
int64_t curProxPointer
Definition DefaultSkipListWriter.h:35
Lucene::DefaultSkipListWriter::lastSkipPayloadLength
Collection< int32_t > lastSkipPayloadLength
Definition DefaultSkipListWriter.h:24
Lucene::DefaultSkipListWriter::setProxOutput
void setProxOutput(const IndexOutputPtr &proxOutput)
Lucene::DefaultSkipListWriter::writeSkipData
virtual void writeSkipData(int32_t level, const IndexOutputPtr &skipBuffer)
Subclasses must implement the actual skip data encoding in this method.
Lucene::DefaultSkipListWriter::setFreqOutput
void setFreqOutput(const IndexOutputPtr &freqOutput)
Lucene::DefaultSkipListWriter::lastSkipProxPointer
Collection< int64_t > lastSkipProxPointer
Definition DefaultSkipListWriter.h:26
Lucene::FormatPostingsTermsWriter
Definition FormatPostingsTermsWriter.h:14
Lucene::MultiLevelSkipListWriter
This abstract class writes skip lists with multiple levels.
Definition MultiLevelSkipListWriter.h:36
Lucene::MultiLevelSkipListWriter::skipInterval
int32_t skipInterval
the skip interval in the list with level = 0
Definition MultiLevelSkipListWriter.h:48
Lucene::MultiLevelSkipListWriter::skipBuffer
Collection< RAMOutputStreamPtr > skipBuffer
for every skip level a different buffer is used
Definition MultiLevelSkipListWriter.h:51
Lucene::MultiLevelSkipListWriter::numberOfSkipLevels
int32_t numberOfSkipLevels
number of levels in this skip list
Definition MultiLevelSkipListWriter.h:45
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::IndexOutputPtr
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition LuceneTypes.h:494

clucene.sourceforge.net