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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DefaultSkipListWriter.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 DEFAULTSKIPLISTWRITER_H
8 #define DEFAULTSKIPLISTWRITER_H
9 
11 
12 namespace Lucene {
13 
16 public:
18  virtual ~DefaultSkipListWriter();
19 
21 
22 protected:
27 
30 
31  int32_t curDoc;
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 
49 };
50 
51 }
52 
53 #endif
IndexOutputPtr freqOutput
Definition: DefaultSkipListWriter.h:28
int32_t curPayloadLength
Definition: DefaultSkipListWriter.h:33
boost::shared_ptr< IndexOutput > IndexOutputPtr
Definition: LuceneTypes.h:494
virtual void writeSkipData(int32_t level, const IndexOutputPtr &skipBuffer)
Subclasses must implement the actual skip data encoding in this method.
Collection< RAMOutputStreamPtr > skipBuffer
for every skip level a different buffer is used
Definition: MultiLevelSkipListWriter.h:51
int64_t curProxPointer
Definition: DefaultSkipListWriter.h:35
void setSkipData(int32_t doc, bool storePayloads, int32_t payloadLength)
Sets the values for the current skip data.
bool curStorePayloads
Definition: DefaultSkipListWriter.h:32
int64_t curFreqPointer
Definition: DefaultSkipListWriter.h:34
Collection< int64_t > lastSkipProxPointer
Definition: DefaultSkipListWriter.h:26
int32_t skipInterval
the skip interval in the list with level = 0
Definition: MultiLevelSkipListWriter.h:48
int32_t curDoc
Definition: DefaultSkipListWriter.h:31
void setFreqOutput(const IndexOutputPtr &freqOutput)
Collection< int64_t > lastSkipFreqPointer
Definition: DefaultSkipListWriter.h:25
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
void setProxOutput(const IndexOutputPtr &proxOutput)
Definition: FormatPostingsTermsWriter.h:14
Collection< int32_t > lastSkipPayloadLength
Definition: DefaultSkipListWriter.h:24
This abstract class writes skip lists with multiple levels.
Definition: MultiLevelSkipListWriter.h:36
IndexOutputPtr proxOutput
Definition: DefaultSkipListWriter.h:29
Collection< int32_t > lastSkipDoc
Definition: DefaultSkipListWriter.h:20
int32_t numberOfSkipLevels
number of levels in this skip list
Definition: MultiLevelSkipListWriter.h:41
DefaultSkipListWriter(int32_t skipInterval, int32_t numberOfSkipLevels, int32_t docCount, const IndexOutputPtr &freqOutput, const IndexOutputPtr &proxOutput)
Implements the skip list writer for the default posting list format that stores positions and payload...
Definition: DefaultSkipListWriter.h:15

clucene.sourceforge.net