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


lucene::index::TermPositionVector Class Reference

Extends TermFreqVector to provide additional information about positions in which each of the terms is found. More...

#include <TermVector.h>

Inheritance diagram for lucene::index::TermPositionVector:

lucene::index::TermFreqVector

Public Member Functions

virtual lucene::util::Array
< int32_t > * 
getTermPositions (int32_t index)=0
 Returns an array of positions in which the term is found.
virtual lucene::util::Array
< TermVectorOffsetInfo > * 
getOffsets (int32_t index)=0
 Returns an array of TermVectorOffsetInfo in which the term is found.
virtual ~TermPositionVector ()

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

virtual lucene::index::TermPositionVector::~TermPositionVector (  )  [inline, virtual]


Member Function Documentation

virtual lucene:: util ::Array<int32_t>* lucene::index::TermPositionVector::getTermPositions ( int32_t  index  )  [pure 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.

virtual lucene:: util ::Array<TermVectorOffsetInfo>* lucene::index::TermPositionVector::getOffsets ( int32_t  index  )  [pure virtual]

Returns an array of TermVectorOffsetInfo in which the term is found.

May return null if offsets have not been stored.

See also:
org.apache.lucene.analysis.Token
Parameters:
index The position in the array to get the offsets from
Returns:
An array of TermVectorOffsetInfo objects or the empty list


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

clucene.sourceforge.net