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


lucene::index::SegmentTermVector Class Reference

#include <TermVector.h>

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

List of all members.

Public Member Functions

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

Constructor & Destructor Documentation

lucene::index::SegmentTermVector::SegmentTermVector ( const TCHAR *  field,
TCHAR **  terms,
Array< int32_t > *  termFreqs 
)
virtual lucene::index::SegmentTermVector::~SegmentTermVector (  )  [virtual]

Member Function Documentation

virtual TermPositionVector* lucene::index::SegmentTermVector::__asTermPositionVector (  )  [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

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

const TCHAR* lucene::index::SegmentTermVector::getField (  )  [virtual]
Returns:
The number of the field this vector is associated with

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

const Array<int32_t>* lucene::index::SegmentTermVector::getTermFrequencies (  )  [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.

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

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

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

void lucene::index::SegmentTermVector::indexesOf ( const TCHAR **  terms,
const int32_t  start,
const int32_t  len,
Array< int32_t > &  ret 
) [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

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

int32_t lucene::index::SegmentTermVector::indexOf ( const TCHAR *  term  )  [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.

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

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

Implements lucene::index::TermFreqVector.

Reimplemented in lucene::index::SegmentTermPositionVector.

TCHAR* lucene::index::SegmentTermVector::toString (  )  const

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

clucene.sourceforge.net