CLucene - a full-featured, c++ search engine
API Documentation
Provides access to stored term vector of a document field. More...
#include <TermVector.h>
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. | |
Provides access to stored term vector of a document field.
| virtual lucene::index::TermFreqVector::~TermFreqVector | ( | ) | [inline, virtual] |
| 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] |
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()
Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.
| virtual const TCHAR** lucene::index::TermFreqVector::getTerms | ( | ) | [pure virtual] |
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.
| 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] |
Implemented in lucene::index::SegmentTermVector, and lucene::index::SegmentTermPositionVector.