7#ifndef MULTILEVELSKIPLISTREADER_H
8#define MULTILEVELSKIPLISTREADER_H
61 virtual int32_t
skipTo(int32_t target);
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Base class for all Lucene classes.
Definition LuceneObject.h:31
This abstract class reads skip lists with multiple levels.
Definition MultiLevelSkipListReader.h:20
Collection< int64_t > childPointer
Definition MultiLevelSkipListReader.h:50
Collection< int32_t > numSkipped
Definition MultiLevelSkipListReader.h:46
int32_t lastDoc
Definition MultiLevelSkipListReader.h:49
bool haveSkipped
Definition MultiLevelSkipListReader.h:41
int64_t lastChildPointer
Definition MultiLevelSkipListReader.h:51
MultiLevelSkipListReader(const IndexInputPtr &skipStream, int32_t maxSkipLevels, int32_t skipInterval)
virtual int32_t getDoc()
Returns the id of the doc to which the last call of skipTo(int) has skipped.
virtual int32_t skipTo(int32_t target)
Skips entries to the first beyond the current whose document number is greater than or equal to targe...
virtual void init(int64_t skipPointer, int32_t df)
Initializes the reader.
int32_t maxNumberOfSkipLevels
the maximum number of skip levels possible for this index
Definition MultiLevelSkipListReader.h:29
virtual bool loadNextSkip(int32_t level)
virtual void loadSkipLevels()
Loads the skip levels.
Collection< int64_t > skipPointer
Definition MultiLevelSkipListReader.h:44
virtual void setLastSkipData(int32_t level)
Copies the values of the last read skip entry on this level.
virtual int32_t readSkipData(int32_t level, const IndexInputPtr &skipStream)=0
Subclasses must implement the actual skip data encoding in this method.
int32_t numberOfSkipLevels
number of levels in this skip list
Definition MultiLevelSkipListReader.h:32
Collection< IndexInputPtr > skipStream
Definition MultiLevelSkipListReader.h:43
int32_t docCount
Definition MultiLevelSkipListReader.h:40
virtual void seekChild(int32_t level)
Seeks the skip entry on the given level.
Collection< int32_t > skipInterval
Definition MultiLevelSkipListReader.h:45
virtual ~MultiLevelSkipListReader()
Collection< int32_t > skipDoc
Definition MultiLevelSkipListReader.h:48
bool inputIsBuffered
Definition MultiLevelSkipListReader.h:53
int32_t numberOfLevelsToBuffer
Defines the number of top skip levels to buffer in memory. Reducing this number results in less memor...
Definition MultiLevelSkipListReader.h:38
Used to buffer the top skip levels.
Definition MultiLevelSkipListReader.h:88
ByteArray data
Definition MultiLevelSkipListReader.h:96
virtual void close()
Closes the stream to further operations.
int64_t pointer
Definition MultiLevelSkipListReader.h:97
virtual uint8_t readByte()
Reads and returns a single byte.
SkipBuffer(const IndexInputPtr &input, int32_t length)
virtual int64_t getFilePointer()
Returns the current position in this file, where the next read will occur.
virtual int64_t length()
The number of bytes in the file.
int32_t pos
Definition MultiLevelSkipListReader.h:98
virtual void seek(int64_t pos)
Sets current position in this file, where the next read will occur.
virtual void readBytes(uint8_t *b, int32_t offset, int32_t length)
Reads a specified number of bytes into an array at the specified offset.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< IndexInput > IndexInputPtr
Definition LuceneTypes.h:493