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

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Static Public Member Functions
Lucene::FilterTermPositions Class Reference

Base class for filtering TermPositions implementations. More...

`#include <FilterIndexReader.h>`

Inheritance diagram for Lucene::FilterTermPositions:

## Public Member Functions

| FilterTermPositions (const TermPositionsPtr &in)
virtual | ~FilterTermPositions ()
virtual String | getClassName ()
boost::shared_ptr< FilterTermPositions > | shared_from_this ()
virtual int32_t | nextPosition ()
| Returns next position in the current document. It is an error to call this more than freq() times without calling next(). This is invalid until next() is called for. More...
virtual int32_t | getPayloadLength ()
| Returns the length of the payload at the current term position. This is invalid until nextPosition() is called for the first time. More...
virtual ByteArray | getPayload (ByteArray data, int32_t offset)
| Returns the payload data at the current term position. This is invalid until nextPosition() is called for the first time. This method must not be called more than once after each call of nextPosition(). However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons. More...
virtual bool | isPayloadAvailable ()
| Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to nextPosition(). More...
Public Member Functions inherited from Lucene::FilterTermDocs
| FilterTermDocs (const TermDocsPtr &in)
virtual | ~FilterTermDocs ()
boost::shared_ptr< FilterTermDocs > | shared_from_this ()
virtual void | seek (const TermPtr &term)
| Sets this to the data for a term. The enumeration is reset to the start of the data for this term. More...
virtual void | seek (const TermEnumPtr &termEnum)
| Sets this to the data for the current term in a TermEnum. This may be optimized in some implementations. More...
virtual int32_t | doc ()
| Returns the current document number. This is invalid until next() is called for the first time. More...
virtual int32_t | freq ()
| Returns the frequency of the term within the current document. This is invalid until next() is called for the first time. More...
virtual bool | next ()
| Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration. More...
virtual int32_t | read (Collection< int32_t > docs, Collection< int32_t > freqs)
| Attempts to read multiple entries from the enumeration, up to length of docs. Document numbers are stored in docs, and term frequencies are stored in freqs. Returns the number of entries read. Zero is only returned when the stream has been exhausted. More...
virtual bool | skipTo (int32_t target)
| Skips entries to the first beyond the current whose document number is greater than or equal to target. Returns true if there is such an entry. More...
virtual void | close ()
| Frees associated resources. More...
Public Member Functions inherited from Lucene::TermPositions
virtual | ~TermPositions ()
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 ()
Static Public Member Functions inherited from Lucene::FilterTermDocs
static String | _getClassName ()
Static Public Member Functions inherited from Lucene::TermPositions
static String | _getClassName ()
Static Public Member Functions inherited from Lucene::TermDocs
static String | _getClassName ()

## Additional Inherited Members

Protected Member Functions inherited from Lucene::TermPositions
| TermPositions ()
Protected Member Functions inherited from Lucene::TermDocs
| TermDocs ()
Protected Member Functions inherited from Lucene::LuceneObject
| LuceneObject ()
Protected Attributes inherited from Lucene::FilterTermDocs
TermDocsPtr | in
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## Detailed Description

Base class for filtering TermPositions implementations.

## Constructor & Destructor Documentation

Lucene::FilterTermPositions::FilterTermPositions | ( | const TermPositionsPtr & | in | ) |

virtual Lucene::FilterTermPositions::~FilterTermPositions | ( |  | ) |

virtual

## Member Function Documentation

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

inline static

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

inline virtual

Reimplemented from Lucene::FilterTermDocs.

virtual ByteArray Lucene::FilterTermPositions::getPayload | ( | ByteArray | data,
|  | int32_t | offset
| ) |  |

virtual

Returns the payload data at the current term position. This is invalid until nextPosition() is called for the first time. This method must not be called more than once after each call of nextPosition(). However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

Parameters

  data | the array into which the data of this payload is to be stored
  offset | the offset in the array into which the data of this payload is to be stored.

Returns
  a byte array containing the data of this payload

Reimplemented from Lucene::TermPositions.

virtual int32_t Lucene::FilterTermPositions::getPayloadLength | ( |  | ) |

virtual

Returns the length of the payload at the current term position. This is invalid until nextPosition() is called for the first time.

Returns
  length of the current payload in number of bytes

Reimplemented from Lucene::TermPositions.

virtual bool Lucene::FilterTermPositions::isPayloadAvailable | ( |  | ) |

virtual

Checks if a payload can be loaded at this position. Payloads can only be loaded once per call to nextPosition().

Returns
  true if there is a payload available at this position that can be loaded

Reimplemented from Lucene::TermPositions.

virtual int32_t Lucene::FilterTermPositions::nextPosition | ( |  | ) |

virtual

Returns next position in the current document. It is an error to call this more than freq() times without calling next(). This is invalid until next() is called for.

Reimplemented from Lucene::TermPositions.

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

inline

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

- FilterIndexReader.h

clucene.sourceforge.net