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

Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
Lucene::MultiLevelSkipListReader Class Referenceabstract

This abstract class reads skip lists with multiple levels. More...

`#include <MultiLevelSkipListReader.h>`

Inheritance diagram for Lucene::MultiLevelSkipListReader:

## Public Member Functions

| MultiLevelSkipListReader (const IndexInputPtr &skipStream, int32_t maxSkipLevels, int32_t skipInterval)
virtual | ~MultiLevelSkipListReader ()
virtual String | getClassName ()
boost::shared_ptr< MultiLevelSkipListReader > | shared_from_this ()
virtual int32_t | getDoc ()
| Returns the id of the doc to which the last call of skipTo(int) has skipped. More...
virtual int32_t | skipTo (int32_t target)
| Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count. More...
virtual void | close ()
virtual void | init (int64_t skipPointer, int32_t df)
| Initializes the reader. More...
Public Member Functions inherited from Lucene::LuceneObject
virtual | ~LuceneObject ()
virtual void | initialize ()
| Called directly after instantiation to create objects that depend on this object being fully constructed. More...
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Return clone of this object. More...
virtual int32_t | hashCode ()
| Return hash code for this object. More...
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal. More...
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects. More...
virtual String | toString ()
| Returns a string representation of the object. More...
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock. More...
virtual LuceneSignalPtr | getSignal ()
| Return this object signal. More...
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout. More...
virtual void | unlock ()
| Unlock this object. More...
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread. More...
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout. More...
virtual void | notifyAll ()
| Notify all threads waiting for signal. More...

## Static Public Member Functions

static String | _getClassName ()

## Protected Member Functions

virtual bool | loadNextSkip (int32_t level)
virtual void | seekChild (int32_t level)
| Seeks the skip entry on the given level. More...
virtual void | loadSkipLevels ()
| Loads the skip levels. More...
virtual int32_t | readSkipData (int32_t level, const IndexInputPtr &skipStream)=0
| Subclasses must implement the actual skip data encoding in this method. More...
virtual void | setLastSkipData (int32_t level)
| Copies the values of the last read skip entry on this level. More...
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()

## Protected Attributes

int32_t | maxNumberOfSkipLevels
| the maximum number of skip levels possible for this index More...
int32_t | numberOfSkipLevels
| number of levels in this skip list More...
int32_t | numberOfLevelsToBuffer
| Defines the number of top skip levels to buffer in memory. Reducing this number results in less memory usage, but possibly slower performance due to more random I/Os. Please notice that the space each level occupies is limited by the skipInterval. The top level can not contain more than skipLevel entries, the second top level can not contain more than skipLevel^2 entries and so forth. More...
int32_t | docCount
bool | haveSkipped
Collection< IndexInputPtr > | skipStream
Collection< int64_t > | skipPointer
Collection< int32_t > | skipInterval
Collection< int32_t > | numSkipped
Collection< int32_t > | skipDoc
int32_t | lastDoc
Collection< int64_t > | childPointer
int64_t | lastChildPointer
bool | inputIsBuffered
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

This abstract class reads skip lists with multiple levels.

See MultiLevelSkipListWriter for the information about the encoding of the multi level skip lists.

Subclasses must implement the abstract method readSkipData(int, IndexInput) which defines the actual format of the skip data.

## Constructor & Destructor Documentation

## ◆ MultiLevelSkipListReader()

Lucene::MultiLevelSkipListReader::MultiLevelSkipListReader | ( | const IndexInputPtr & | skipStream,
|  | int32_t | maxSkipLevels,
|  | int32_t | skipInterval
| ) |  |

## ◆ ~MultiLevelSkipListReader()

virtual Lucene::MultiLevelSkipListReader::~MultiLevelSkipListReader | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

static String Lucene::MultiLevelSkipListReader::_getClassName | ( |  | ) |

inline static

## ◆ close()

virtual void Lucene::MultiLevelSkipListReader::close | ( |  | ) |

virtual

## ◆ getClassName()

virtual String Lucene::MultiLevelSkipListReader::getClassName | ( |  | ) |

inline virtual

Reimplemented in Lucene::DefaultSkipListReader.

## ◆ getDoc()

virtual int32_t Lucene::MultiLevelSkipListReader::getDoc | ( |  | ) |

virtual

Returns the id of the doc to which the last call of skipTo(int) has skipped.

## ◆ init()

virtual void Lucene::MultiLevelSkipListReader::init | ( | int64_t | skipPointer,
|  | int32_t | df
| ) |  |

virtual

Initializes the reader.

## ◆ loadNextSkip()

virtual bool Lucene::MultiLevelSkipListReader::loadNextSkip | ( | int32_t | level | ) |

protected virtual

## ◆ loadSkipLevels()

virtual void Lucene::MultiLevelSkipListReader::loadSkipLevels | ( |  | ) |

protected virtual

Loads the skip levels.

## ◆ readSkipData()

virtual int32_t Lucene::MultiLevelSkipListReader::readSkipData | ( | int32_t | level,
|  | const IndexInputPtr & | skipStream
| ) |  |

protected pure virtual

Subclasses must implement the actual skip data encoding in this method.

Parameters

  level | the level skip data shall be read from
  skipStream | the skip stream to read from

Implemented in Lucene::DefaultSkipListReader.

## ◆ seekChild()

virtual void Lucene::MultiLevelSkipListReader::seekChild | ( | int32_t | level | ) |

protected virtual

Seeks the skip entry on the given level.

Reimplemented in Lucene::DefaultSkipListReader.

## ◆ setLastSkipData()

virtual void Lucene::MultiLevelSkipListReader::setLastSkipData | ( | int32_t | level | ) |

protected virtual

Copies the values of the last read skip entry on this level.

Reimplemented in Lucene::DefaultSkipListReader.

## ◆ shared_from_this()

boost::shared_ptr< MultiLevelSkipListReader > Lucene::MultiLevelSkipListReader::shared_from_this | ( |  | ) |

inline

## ◆ skipTo()

virtual int32_t Lucene::MultiLevelSkipListReader::skipTo | ( | int32_t | target | ) |

virtual

Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns the current doc count.

## Field Documentation

## ◆ childPointer

Collection<int64_t> Lucene::MultiLevelSkipListReader::childPointer

protected

## ◆ docCount

int32_t Lucene::MultiLevelSkipListReader::docCount

protected

## ◆ haveSkipped

bool Lucene::MultiLevelSkipListReader::haveSkipped

protected

## ◆ inputIsBuffered

bool Lucene::MultiLevelSkipListReader::inputIsBuffered

protected

## ◆ lastChildPointer

int64_t Lucene::MultiLevelSkipListReader::lastChildPointer

protected

## ◆ lastDoc

int32_t Lucene::MultiLevelSkipListReader::lastDoc

protected

## ◆ maxNumberOfSkipLevels

int32_t Lucene::MultiLevelSkipListReader::maxNumberOfSkipLevels

protected

the maximum number of skip levels possible for this index

## ◆ numberOfLevelsToBuffer

int32_t Lucene::MultiLevelSkipListReader::numberOfLevelsToBuffer

protected

Defines the number of top skip levels to buffer in memory. Reducing this number results in less memory usage, but possibly slower performance due to more random I/Os. Please notice that the space each level occupies is limited by the skipInterval. The top level can not contain more than skipLevel entries, the second top level can not contain more than skipLevel^2 entries and so forth.

## ◆ numberOfSkipLevels

int32_t Lucene::MultiLevelSkipListReader::numberOfSkipLevels

protected

number of levels in this skip list

## ◆ numSkipped

Collection<int32_t> Lucene::MultiLevelSkipListReader::numSkipped

protected

## ◆ skipDoc

Collection<int32_t> Lucene::MultiLevelSkipListReader::skipDoc

protected

## ◆ skipInterval

Collection<int32_t> Lucene::MultiLevelSkipListReader::skipInterval

protected

## ◆ skipPointer

Collection<int64_t> Lucene::MultiLevelSkipListReader::skipPointer

protected

## ◆ skipStream

Collection<IndexInputPtr> Lucene::MultiLevelSkipListReader::skipStream

protected

The documentation for this class was generated from the following file:

- MultiLevelSkipListReader.h

clucene.sourceforge.net