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::index::TermPositionVector

Public Member Functions

virtual ~TermFreqVector ()
virtual const TCHAR * getField ()=0
 The org.apache.lucene.document.Fieldable name.
virtual int32_t size ()=0
virtual const TCHAR ** getTerms ()=0
virtual const
lucene::util::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, lucene::util::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.

The vector consists of the name of the field, an array of the terms tha occur in the field of the org.apache.lucene.document.Document and a parallel array of frequencies. Thus, getTermFrequencies()[5] corresponds with the frequency of getTerms()[5], assuming there are at least 5 terms in the Document.


Constructor & Destructor Documentation

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


Member Function Documentation

virtual const TCHAR* lucene::index::TermFreqVector::getField (  )  [pure virtual]

The org.apache.lucene.document.Fieldable name.

Returns:
The name of the field this vector is associated with.

virtual int32_t lucene::index::TermFreqVector::size (  )  [pure virtual]

Returns:
The number of terms in the term vector.

virtual const TCHAR** lucene::index::TermFreqVector::getTerms (  )  [pure virtual]

Returns:
An Array of term texts in ascending order.

virtual const lucene:: util ::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.

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.

virtual void lucene::index::TermFreqVector::indexesOf ( const TCHAR **  terms,
const int32_t  start,
const int32_t  len,
lucene::util::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

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


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

clucene.sourceforge.net