CLucene - a full-featured, c++ search engine
API Documentation
#include <TermVector.h>
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. | |
| lucene::index::SegmentTermVector::SegmentTermVector | ( | const TCHAR * | field, | |
| TCHAR ** | terms, | |||
| Array< int32_t > * | termFreqs | |||
| ) |
| virtual lucene::index::SegmentTermVector::~SegmentTermVector | ( | ) | [virtual] |
| 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] |
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()
Implements lucene::index::TermFreqVector.
Reimplemented in lucene::index::SegmentTermPositionVector.
| const TCHAR** lucene::index::SegmentTermVector::getTerms | ( | ) | [virtual] |
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.
| 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] |
Implements lucene::index::TermFreqVector.
Reimplemented in lucene::index::SegmentTermPositionVector.
| TCHAR* lucene::index::SegmentTermVector::toString | ( | ) | const |
Reimplemented in lucene::index::SegmentTermPositionVector.