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

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

Extends TermFreqVector to provide additional information about positions in which each of the terms is found. A TermPositionVector not necessarily contains both positions and offsets, but at least one of these arrays exists. More...

`#include <TermPositionVector.h>`

Inheritance diagram for Lucene::TermPositionVector:

## Public Member Functions

virtual | ~TermPositionVector ()
virtual String | getClassName ()
virtual Collection< int32_t > | getTermPositions (int32_t index)
| Returns an array of positions in which the term is found. Terms are identified by the index at which its number appears in the term String array obtained from the indexOf method. May return null if positions have not been stored.
virtual Collection< TermVectorOffsetInfoPtr > | getOffsets (int32_t index)
| Returns an array of TermVectorOffsetInfo in which the term is found. May return null if offsets have not been stored.
Public Member Functions inherited from Lucene::TermFreqVector
virtual | ~TermFreqVector ()
virtual String | getField ()
| The `Fieldable` name.
virtual int32_t | size ()
virtual Collection< String > | getTerms ()
virtual Collection< int32_t > | getTermFrequencies ()
| Array of term frequencies. Locations of the array correspond one to one to the terms in the array obtained from getTerms method. Each location in the array contains the number of times this term occurs in the document or the document field.
virtual int32_t | indexOf (const String &term)
| Return an index in the term numbers array returned from getTerms at which the term with the specified term appears. If this term does not appear in the array, return -1.
virtual Collection< int32_t > | indexesOf (Collection< String > terms, int32_t start, int32_t length)
| Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has the same size as the number of terms searched for, each slot containing the result of searching for that term number.

## Static Public Member Functions

static String | _getClassName ()
Static Public Member Functions inherited from Lucene::TermFreqVector
static String | _getClassName ()

## Protected Member Functions

| TermPositionVector ()
Protected Member Functions inherited from Lucene::TermFreqVector
| TermFreqVector ()

## Detailed Description

Extends TermFreqVector to provide additional information about positions in which each of the terms is found. A TermPositionVector not necessarily contains both positions and offsets, but at least one of these arrays exists.

## Constructor & Destructor Documentation

## ◆ TermPositionVector()

Lucene::TermPositionVector::TermPositionVector | ( |  | ) |

protected

## ◆ ~TermPositionVector()

virtual Lucene::TermPositionVector::~TermPositionVector | ( |  | ) |

virtual

## Member Function Documentation

## ◆ _getClassName()

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

inline static

## ◆ getClassName()

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

inline virtual

Reimplemented from Lucene::TermFreqVector.

Reimplemented in Lucene::SegmentTermPositionVector, and Lucene::SegmentTermVector.

## ◆ getOffsets()

virtual Collection< TermVectorOffsetInfoPtr > Lucene::TermPositionVector::getOffsets | ( | int32_t | index | ) |

virtual

Returns an array of TermVectorOffsetInfo in which the term is found. May return null if offsets have not been stored.

See also
  Token

Parameters

  index | The position in the array to get the offsets from

Returns
  An array of TermVectorOffsetInfo objects or the empty list

Reimplemented in Lucene::SegmentTermPositionVector.

## ◆ getTermPositions()

virtual Collection< int32_t > Lucene::TermPositionVector::getTermPositions | ( | int32_t | index | ) |

virtual

Returns an array of positions in which the term is found. Terms are identified by the index at which its number appears in the term String array obtained from the indexOf method. May return null if positions have not been stored.

Reimplemented in Lucene::SegmentTermPositionVector.

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

- TermPositionVector.h

clucene.sourceforge.net