Lucene++ - a full-featured, c++ search engine
API Documentation
#include <TermVectorsReader.h>
Public Member Functions | |
TermVectorsReader () | |
TermVectorsReader (const DirectoryPtr &d, const String &segment, const FieldInfosPtr &fieldInfos) | |
TermVectorsReader (const DirectoryPtr &d, const String &segment, const FieldInfosPtr &fieldInfos, int32_t readBufferSize, int32_t docStoreOffset=-1, int32_t size=0) | |
virtual | ~TermVectorsReader () |
virtual String | getClassName () |
boost::shared_ptr< TermVectorsReader > | shared_from_this () |
IndexInputPtr | getTvdStream () |
Used for bulk copy when merging. | |
IndexInputPtr | getTvfStream () |
Used for bulk copy when merging. | |
bool | canReadRawDocs () |
void | rawDocs (Collection< int32_t > tvdLengths, Collection< int32_t > tvfLengths, int32_t startDocID, int32_t numDocs) |
Retrieve the length (in bytes) of the tvd and tvf entries for the next numDocs starting with startDocID. This is used for bulk copying when merging segments, if the field numbers are congruent. Once this returns, the tvf & tvd streams are seeked to the startDocID. | |
void | close () |
int32_t | size () |
void | get (int32_t docNum, const String &field, const TermVectorMapperPtr &mapper) |
TermFreqVectorPtr | get (int32_t docNum, const String &field) |
Retrieve the term vector for the given document and field. | |
Collection< TermFreqVectorPtr > | get (int32_t docNum) |
Return all term vectors stored for this document or null if the could not be read in. | |
void | get (int32_t docNumber, const TermVectorMapperPtr &mapper) |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
Return clone of this object. | |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual int32_t | hashCode () |
Return hash code for this object. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Return whether two objects are equal. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
virtual String | toString () |
Returns a string representation of the object. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Static Public Member Functions | |
static String | _getClassName () |
Static Public Attributes | |
static const int32_t | FORMAT_VERSION |
NOTE: if you make a new format, it must be larger than the current format. | |
static const int32_t | FORMAT_VERSION2 |
Changes to speed up bulk merging of term vectors. | |
static const int32_t | FORMAT_UTF8_LENGTH_IN_BYTES |
Changed strings to UTF8 with length-in-bytes not length-in-chars. | |
static const int32_t | FORMAT_CURRENT |
NOTE: always change this if you switch to a new format. | |
static const int32_t | FORMAT_SIZE |
The size in bytes that the FORMAT_VERSION will take up at the beginning of each file. | |
static const uint8_t | STORE_POSITIONS_WITH_TERMVECTOR |
static const uint8_t | STORE_OFFSET_WITH_TERMVECTOR |
Protected Member Functions | |
void | ConstructReader (const DirectoryPtr &d, const String &segment, const FieldInfosPtr &fieldInfos, int32_t readBufferSize, int32_t docStoreOffset, int32_t size) |
void | seekTvx (int32_t docNum) |
int32_t | checkValidFormat (const IndexInputPtr &in) |
Collection< String > | readFields (int32_t fieldCount) |
Reads the String[] fields; you have to pre-seek tvd to the right point. | |
Collection< int64_t > | readTvfPointers (int32_t fieldCount) |
Reads the long[] offsets into TVF; you have to pre-seek tvx/tvd to the right point. | |
Collection< TermFreqVectorPtr > | readTermVectors (int32_t docNum, Collection< String > fields, Collection< int64_t > tvfPointers) |
void | readTermVectors (Collection< String > fields, Collection< int64_t > tvfPointers, const TermVectorMapperPtr &mapper) |
void | readTermVector (const String &field, int64_t tvfPointer, const TermVectorMapperPtr &mapper) |
![]() | |
LuceneObject () | |
Protected Attributes | |
FieldInfosPtr | fieldInfos |
IndexInputPtr | tvx |
IndexInputPtr | tvd |
IndexInputPtr | tvf |
int32_t | _size |
int32_t | numTotalDocs |
int32_t | docStoreOffset |
The docID offset where our docs begin in the index file. This will be 0 if we have our own private file. | |
int32_t | format |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Lucene::TermVectorsReader::TermVectorsReader | ( | ) |
Lucene::TermVectorsReader::TermVectorsReader | ( | const DirectoryPtr & | d, |
const String & | segment, | ||
const FieldInfosPtr & | fieldInfos | ||
) |
Lucene::TermVectorsReader::TermVectorsReader | ( | const DirectoryPtr & | d, |
const String & | segment, | ||
const FieldInfosPtr & | fieldInfos, | ||
int32_t | readBufferSize, | ||
int32_t | docStoreOffset = -1 , |
||
int32_t | size = 0 |
||
) |
|
virtual |
|
inlinestatic |
bool Lucene::TermVectorsReader::canReadRawDocs | ( | ) |
|
protected |
|
virtual |
Return clone of this object.
other | clone reference - null when called initially, then set in top virtual override. |
Reimplemented from Lucene::LuceneObject.
void Lucene::TermVectorsReader::close | ( | ) |
|
protected |
Collection< TermFreqVectorPtr > Lucene::TermVectorsReader::get | ( | int32_t | docNum | ) |
Return all term vectors stored for this document or null if the could not be read in.
docNum | The document number to retrieve the vector for |
TermFreqVectorPtr Lucene::TermVectorsReader::get | ( | int32_t | docNum, |
const String & | field | ||
) |
Retrieve the term vector for the given document and field.
docNum | The document number to retrieve the vector for |
field | The field within the document to retrieve |
void Lucene::TermVectorsReader::get | ( | int32_t | docNum, |
const String & | field, | ||
const TermVectorMapperPtr & | mapper | ||
) |
void Lucene::TermVectorsReader::get | ( | int32_t | docNumber, |
const TermVectorMapperPtr & | mapper | ||
) |
|
inlinevirtual |
IndexInputPtr Lucene::TermVectorsReader::getTvdStream | ( | ) |
Used for bulk copy when merging.
IndexInputPtr Lucene::TermVectorsReader::getTvfStream | ( | ) |
Used for bulk copy when merging.
void Lucene::TermVectorsReader::rawDocs | ( | Collection< int32_t > | tvdLengths, |
Collection< int32_t > | tvfLengths, | ||
int32_t | startDocID, | ||
int32_t | numDocs | ||
) |
Retrieve the length (in bytes) of the tvd and tvf entries for the next numDocs starting with startDocID. This is used for bulk copying when merging segments, if the field numbers are congruent. Once this returns, the tvf & tvd streams are seeked to the startDocID.
|
protected |
Reads the String[] fields; you have to pre-seek tvd to the right point.
|
protected |
field | The field to read in |
tvfPointer | The pointer within the tvf file where we should start reading |
mapper | The mapper used to map the TermVector |
|
protected |
|
protected |
|
protected |
Reads the long[] offsets into TVF; you have to pre-seek tvx/tvd to the right point.
|
protected |
|
inline |
int32_t Lucene::TermVectorsReader::size | ( | ) |
|
protected |
|
protected |
The docID offset where our docs begin in the index file. This will be 0 if we have our own private file.
|
protected |
|
protected |
|
static |
NOTE: always change this if you switch to a new format.
|
static |
The size in bytes that the FORMAT_VERSION will take up at the beginning of each file.
|
static |
Changed strings to UTF8 with length-in-bytes not length-in-chars.
|
static |
NOTE: if you make a new format, it must be larger than the current format.
|
static |
Changes to speed up bulk merging of term vectors.
|
protected |
|
static |
|
static |
|
protected |
|
protected |
|
protected |