CLucene - a full-featured, c++ search engine
API Documentation
#include <TermVector.h>
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. |
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.
virtual lucene::index::TermFreqVector::~TermFreqVector | ( | ) | [inline, virtual] |
virtual const TCHAR* lucene::index::TermFreqVector::getField | ( | ) | [pure virtual] |
The org.apache.lucene.document.Fieldable name.
virtual int32_t lucene::index::TermFreqVector::size | ( | ) | [pure virtual] |
virtual const TCHAR** lucene::index::TermFreqVector::getTerms | ( | ) | [pure virtual] |
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()
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.
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