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


lucene::index::TermFreqVector Class Reference

Provides access to stored term vector of a document field. More...

#include <TermVector.h>

Inheritance diagram for lucene::index::TermFreqVector:
lucene::debug::LuceneBase lucene::index::SegmentTermVector lucene::index::TermPositionVector lucene::index::SegmentTermPositionVector lucene::index::SegmentTermPositionVector

List of all members.

Public Member Functions

virtual ~TermFreqVector ()
virtual const TCHAR * getField ()=0
virtual int32_t size ()=0
virtual const TCHAR ** getTerms ()=0
virtual const Array< int32_t > * getTermFrequencies ()=0
 Array of term frequencies.
virtual int32_t indexOf (const TCHAR *term)=0
 Return an index in the term numbers array returned from getTerms at which the term with the specified term appears.
virtual void indexesOf (const TCHAR **terms, const int32_t start, const int32_t len, Array< int32_t > &ret)=0
 Just like indexOf(int32_t) but searches for a number of terms at the same time.
virtual TermPositionVector__asTermPositionVector ()=0
 Solve the diamond inheritence problem by providing a reinterpret function.

Detailed Description

Provides access to stored term vector of a document field.


Constructor & Destructor Documentation

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

Member Function Documentation

virtual TermPositionVector* lucene::index::TermFreqVector::__asTermPositionVector (  )  [pure virtual]

Solve the diamond inheritence problem by providing a reinterpret function.

No dynamic casting is required and no RTTI data is needed to do this

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual const TCHAR* lucene::index::TermFreqVector::getField (  )  [pure virtual]
Returns:
The field this vector is associated with.

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual const Array<int32_t>* lucene::index::TermFreqVector::getTermFrequencies (  )  [pure virtual]

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.

The size of the returned array is size()

Memory management:
Returning a pointer to internal data. Do not delete.

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual const TCHAR** lucene::index::TermFreqVector::getTerms (  )  [pure virtual]
Returns:
An Array of term texts in ascending order.

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual void lucene::index::TermFreqVector::indexesOf ( const TCHAR **  terms,
const int32_t  start,
const int32_t  len,
Array< int32_t > &  ret 
) [pure virtual]

Just like indexOf(int32_t) 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.

Parameters:
terms array containing terms to look for
start index in the array where the list of terms starts
len the number of terms in the list

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual int32_t lucene::index::TermFreqVector::indexOf ( const TCHAR *  term  )  [pure virtual]

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.

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.

virtual int32_t lucene::index::TermFreqVector::size (  )  [pure virtual]
Returns:
The number of terms in the term vector.

Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.


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

clucene.sourceforge.net