CLucene - a full-featured, c++ search engine
API Documentation
#include <TermVector.h>
Public Member Functions | |
| SegmentTermPositionVector (const TCHAR *field, TCHAR **terms, Array< int32_t > *termFreqs, Array< Array< int32_t > > *positions, Array< Array< TermVectorOffsetInfo > > *offsets) | |
| ~SegmentTermPositionVector () | |
| Array< TermVectorOffsetInfo > * | getOffsets (int32_t index) |
| Returns an array of TermVectorOffsetInfo in which the term is found. | |
| Array< int32_t > * | getTermPositions (int32_t index) |
| Returns an array of positions in which the term is found. | |
| 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. | |
Protected Attributes | |
| Array< Array< int32_t > > * | positions |
| Array< Array < TermVectorOffsetInfo > > * | offsets |
Static Protected Attributes | |
| static Array< int32_t > | EMPTY_TERM_POS |
| lucene::index::SegmentTermPositionVector::SegmentTermPositionVector | ( | const TCHAR * | field, | |
| TCHAR ** | terms, | |||
| Array< int32_t > * | termFreqs, | |||
| Array< Array< int32_t > > * | positions, | |||
| Array< Array< TermVectorOffsetInfo > > * | offsets | |||
| ) |
| lucene::index::SegmentTermPositionVector::~SegmentTermPositionVector | ( | ) |
| virtual TermPositionVector* lucene::index::SegmentTermPositionVector::__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
Reimplemented from lucene::index::SegmentTermVector.
| const TCHAR* lucene::index::SegmentTermPositionVector::getField | ( | ) | [inline, virtual] |
Reimplemented from lucene::index::SegmentTermVector.
| Array<TermVectorOffsetInfo>* lucene::index::SegmentTermPositionVector::getOffsets | ( | int32_t | index | ) | [virtual] |
Returns an array of TermVectorOffsetInfo in which the term is found.
| index | The position in the array to get the offsets from |
Implements lucene::index::TermPositionVector.
| const Array<int32_t>* lucene::index::SegmentTermPositionVector::getTermFrequencies | ( | ) | [inline, 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()
Reimplemented from lucene::index::SegmentTermVector.
| Array<int32_t>* lucene::index::SegmentTermPositionVector::getTermPositions | ( | int32_t | index | ) | [virtual] |
Returns an array of positions in which the term is found.
Terms are identified by the index at which its number appears in the term String array obtained from the indexOf method.
Implements lucene::index::TermPositionVector.
| const TCHAR** lucene::index::SegmentTermPositionVector::getTerms | ( | ) | [inline, virtual] |
Reimplemented from lucene::index::SegmentTermVector.
| void lucene::index::SegmentTermPositionVector::indexesOf | ( | const TCHAR ** | terms, | |
| const int32_t | start, | |||
| const int32_t | len, | |||
| Array< int32_t > & | ret | |||
| ) | [inline, 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 |
Reimplemented from lucene::index::SegmentTermVector.
| int32_t lucene::index::SegmentTermPositionVector::indexOf | ( | const TCHAR * | term | ) | [inline, 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.
Reimplemented from lucene::index::SegmentTermVector.
| int32_t lucene::index::SegmentTermPositionVector::size | ( | ) | [inline, virtual] |
Reimplemented from lucene::index::SegmentTermVector.
| TCHAR* lucene::index::SegmentTermPositionVector::toString | ( | ) | const [inline] |
Reimplemented from lucene::index::SegmentTermVector.
Array<int32_t> lucene::index::SegmentTermPositionVector::EMPTY_TERM_POS [static, protected] |
Array< Array<TermVectorOffsetInfo> >* lucene::index::SegmentTermPositionVector::offsets [protected] |
Array< Array<int32_t> >* lucene::index::SegmentTermPositionVector::positions [protected] |