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

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes
Lucene::MultipleTermPositions Class Reference

Allows you to iterate over the `TermPositions` for multiple `Term`s as a single `TermPositions`. More...

`#include <MultipleTermPositions.h>`

Inheritance diagram for Lucene::MultipleTermPositions:

## Public Member Functions

| MultipleTermPositions (const IndexReaderPtr &indexReader, Collection< TermPtr > terms)
virtual | ~MultipleTermPositions ()
virtual String | getClassName ()
boost::shared_ptr< MultipleTermPositions > | shared_from_this ()
virtual bool | next ()
| Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration.
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.
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.
virtual int32_t | doc ()
| Returns the current document number. This is invalid until `next()` is called for the first time.
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.
virtual void | close ()
| Frees associated resources.
virtual void | seek (const TermPtr &term)
| Not implemented.
virtual void | seek (const TermEnumPtr &termEnum)
| Not implemented.
virtual int32_t | read (Collection< int32_t > &docs, Collection< int32_t > &freqs)
| Not implemented.
virtual ByteArray | getPayload (ByteArray data, int32_t offset)
| Not implemented.
virtual bool | isPayloadAvailable ()
Public Member Functions inherited from Lucene::TermPositions
virtual | ~TermPositions ()
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.
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.
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr())
| Return clone of this object.
virtual int32_t | hashCode ()
| Return hash code for this object.
virtual bool | equals (const LuceneObjectPtr &other)
| Return whether two objects are equal.
virtual int32_t | compareTo (const LuceneObjectPtr &other)
| Compare two objects.
virtual String | toString ()
| Returns a string representation of the object.
Public Member Functions inherited from Lucene::LuceneSync
virtual | ~LuceneSync ()
virtual SynchronizePtr | getSync ()
| Return this object synchronize lock.
virtual LuceneSignalPtr | getSignal ()
| Return this object signal.
virtual void | lock (int32_t timeout=0)
| Lock this object using an optional timeout.
virtual void | unlock ()
| Unlock this object.
virtual bool | holdsLock ()
| Returns true if this object is currently locked by current thread.
virtual void | wait (int32_t timeout=0)
| Wait for signal using an optional timeout.
virtual void | notifyAll ()
| Notify all threads waiting for signal.

## Static Public Member Functions

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 ()

## Protected Attributes

int32_t | _doc
int32_t | _freq
TermPositionsQueuePtr | termPositionsQueue
IntQueuePtr | posList
Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr | objectLock
LuceneSignalPtr | objectSignal

## 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 ()

## Detailed Description

Allows you to iterate over the `TermPositions` for multiple `Term`s as a single `TermPositions`.

## Constructor & Destructor Documentation

## ◆ MultipleTermPositions()

Lucene::MultipleTermPositions::MultipleTermPositions | ( | const IndexReaderPtr & | indexReader,
|  | Collection< TermPtr > | terms )

Referenced by _getClassName().

## ◆ ~MultipleTermPositions()

virtual Lucene::MultipleTermPositions::~MultipleTermPositions | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

String Lucene::MultipleTermPositions::_getClassName | ( |  | ) |

inline static

References MultipleTermPositions().

## ◆ close()

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

virtual

Frees associated resources.

Implements Lucene::TermDocs.

## ◆ doc()

virtual int32_t Lucene::MultipleTermPositions::doc | ( |  | ) |

virtual

Returns the current document number. This is invalid until `next()` is called for the first time.

Implements Lucene::TermDocs.

## ◆ freq()

virtual int32_t Lucene::MultipleTermPositions::freq | ( |  | ) |

virtual

Returns the frequency of the term within the current document. This is invalid until `next()` is called for the first time.

Implements Lucene::TermDocs.

## ◆ getClassName()

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

inline virtual

Reimplemented from Lucene::TermPositions.

## ◆ getPayload()

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

virtual

Not implemented.

Reimplemented from Lucene::TermPositions.

## ◆ isPayloadAvailable()

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

virtual

Returns
  false

Reimplemented from Lucene::TermPositions.

## ◆ next()

virtual bool Lucene::MultipleTermPositions::next | ( |  | ) |

virtual

Moves to the next pair in the enumeration. Returns true if there is such a next pair in the enumeration.

Implements Lucene::TermDocs.

## ◆ nextPosition()

virtual int32_t Lucene::MultipleTermPositions::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.

## ◆ read()

virtual int32_t Lucene::MultipleTermPositions::read | ( | Collection< int32_t > & | docs,
|  | Collection< int32_t > & | freqs )

virtual

Not implemented.

Implements Lucene::TermDocs.

## ◆ seek() [1/2]

virtual void Lucene::MultipleTermPositions::seek | ( | const TermEnumPtr & | termEnum | ) |

virtual

Not implemented.

Implements Lucene::TermDocs.

## ◆ seek() [2/2]

virtual void Lucene::MultipleTermPositions::seek | ( | const TermPtr & | term | ) |

virtual

Not implemented.

Implements Lucene::TermDocs.

## ◆ shared_from_this()

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

inline

## ◆ skipTo()

virtual bool Lucene::MultipleTermPositions::skipTo | ( | int32_t | target | ) |

virtual

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.

Implements Lucene::TermDocs.

## Field Documentation

## ◆ _doc

int32_t Lucene::MultipleTermPositions::_doc

protected

## ◆ _freq

int32_t Lucene::MultipleTermPositions::_freq

protected

## ◆ posList

IntQueuePtr Lucene::MultipleTermPositions::posList

protected

## ◆ termPositionsQueue

TermPositionsQueuePtr Lucene::MultipleTermPositions::termPositionsQueue

protected

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

- MultipleTermPositions.h

clucene.sourceforge.net