Lucene++ - a full-featured, c++ search engine
API Documentation
#include <TermVectorsReader.h>
Public Member Functions | |
TermVectorsReader () | |
TermVectorsReader (DirectoryPtr d, const String &segment, FieldInfosPtr fieldInfos) | |
TermVectorsReader (DirectoryPtr d, const String &segment, 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. More... | |
IndexInputPtr | getTvfStream () |
Used for bulk copy when merging. More... | |
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. More... | |
void | close () |
int32_t | size () |
void | get (int32_t docNum, const String &field, TermVectorMapperPtr mapper) |
TermFreqVectorPtr | get (int32_t docNum, const String &field) |
Retrieve the term vector for the given document and field. More... | |
Collection< TermFreqVectorPtr > | get (int32_t docNum) |
Return all term vectors stored for this document or null if the could not be read in. More... | |
void | get (int32_t docNumber, TermVectorMapperPtr mapper) |
virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr()) |
Return clone of this object. More... | |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. More... | |
virtual int32_t | hashCode () |
Return hash code for this object. More... | |
virtual bool | equals (LuceneObjectPtr other) |
Return whether two objects are equal. More... | |
virtual int32_t | compareTo (LuceneObjectPtr other) |
Compare two objects. More... | |
virtual String | toString () |
Returns a string representation of the object. More... | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. More... | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. More... | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. More... | |
virtual void | unlock () |
Unlock this object. More... | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. More... | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. More... | |
virtual void | notifyAll () |
Notify all threads waiting for signal. More... | |
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. More... | |
static const int32_t | FORMAT_VERSION2 |
Changes to speed up bulk merging of term vectors. More... | |
static const int32_t | FORMAT_UTF8_LENGTH_IN_BYTES |
Changed strings to UTF8 with length-in-bytes not length-in-chars. More... | |
static const int32_t | FORMAT_CURRENT |
NOTE: always change this if you switch to a new format. More... | |
static const int32_t | FORMAT_SIZE |
The size in bytes that the FORMAT_VERSION will take up at the beginning of each file. More... | |
static const uint8_t | STORE_POSITIONS_WITH_TERMVECTOR |
static const uint8_t | STORE_OFFSET_WITH_TERMVECTOR |
Protected Member Functions | |
void | ConstructReader (DirectoryPtr d, const String &segment, FieldInfosPtr fieldInfos, int32_t readBufferSize, int32_t docStoreOffset, int32_t size) |
void | seekTvx (int32_t docNum) |
int32_t | checkValidFormat (IndexInputPtr in) |
Collection< String > | readFields (int32_t fieldCount) |
Reads the String[] fields; you have to pre-seek tvd to the right point. More... | |
Collection< int64_t > | readTvfPointers (int32_t fieldCount) |
Reads the long[] offsets into TVF; you have to pre-seek tvx/tvd to the right point. More... | |
Collection< TermFreqVectorPtr > | readTermVectors (int32_t docNum, Collection< String > fields, Collection< int64_t > tvfPointers) |
void | readTermVectors (Collection< String > fields, Collection< int64_t > tvfPointers, TermVectorMapperPtr mapper) |
void | readTermVector (const String &field, int64_t tvfPointer, 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. More... | |
int32_t | format |
Lucene::TermVectorsReader::TermVectorsReader | ( | ) |
Lucene::TermVectorsReader::TermVectorsReader | ( | DirectoryPtr | d, |
const String & | segment, | ||
FieldInfosPtr | fieldInfos | ||
) |
Lucene::TermVectorsReader::TermVectorsReader | ( | DirectoryPtr | d, |
const String & | segment, | ||
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 |
void Lucene::TermVectorsReader::get | ( | int32_t | docNum, |
const String & | field, | ||
TermVectorMapperPtr | mapper | ||
) |
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 |
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 |
void Lucene::TermVectorsReader::get | ( | int32_t | docNumber, |
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 |