The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader#getTermFreqVector(int,String)
.
More...
#include <TermVectorMapper.h>
|
| TermVectorMapper (bool ignoringPositions=false, bool ignoringOffsets=false) |
|
virtual | ~TermVectorMapper () |
|
virtual String | getClassName () |
|
boost::shared_ptr< TermVectorMapper > | shared_from_this () |
|
virtual void | setExpectations (const String &field, int32_t numTerms, bool storeOffsets, bool storePositions)=0 |
| Tell the mapper what to expect in regards to field, number of terms, offset and position storage. This method will be called once before retrieving the vector for a field.
|
|
virtual void | map (const String &term, int32_t frequency, Collection< TermVectorOffsetInfoPtr > offsets, Collection< int32_t > positions)=0 |
| Map the Term Vector information into your own structure.
|
|
virtual bool | isIgnoringPositions () |
| Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they can be skipped over. Derived classes should set this to true if they want to ignore positions. The default is false, meaning positions will be loaded if they are stored.
|
|
virtual bool | isIgnoringOffsets () |
|
virtual void | setDocumentNumber (int32_t documentNumber) |
| Passes down the index of the document whose term vector is currently being mapped, once for each top level call to a term vector reader.
|
|
virtual | ~LuceneObject () |
|
virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed.
|
|
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Return clone of this object.
|
|
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.
|
|
The TermVectorMapper can be used to map Term Vectors into your own structure instead of the parallel array structure used by IndexReader#getTermFreqVector(int,String)
.
It is up to the implementation to make sure it is thread-safe.
◆ TermVectorMapper()
Lucene::TermVectorMapper::TermVectorMapper |
( |
bool |
ignoringPositions = false , |
|
|
bool |
ignoringOffsets = false |
|
) |
| |
- Parameters
-
ignoringPositions | true if this mapper should tell Lucene to ignore positions even if they are stored. |
ignoringOffsets | similar to ignoringPositions |
◆ ~TermVectorMapper()
virtual Lucene::TermVectorMapper::~TermVectorMapper |
( |
| ) |
|
|
virtual |
◆ _getClassName()
static String Lucene::TermVectorMapper::_getClassName |
( |
| ) |
|
|
inlinestatic |
◆ getClassName()
virtual String Lucene::TermVectorMapper::getClassName |
( |
| ) |
|
|
inlinevirtual |
◆ isIgnoringOffsets()
virtual bool Lucene::TermVectorMapper::isIgnoringOffsets |
( |
| ) |
|
|
virtual |
◆ isIgnoringPositions()
virtual bool Lucene::TermVectorMapper::isIgnoringPositions |
( |
| ) |
|
|
virtual |
Indicate to Lucene that even if there are positions stored, this mapper is not interested in them and they can be skipped over. Derived classes should set this to true if they want to ignore positions. The default is false, meaning positions will be loaded if they are stored.
Reimplemented in Lucene::PositionBasedTermVectorMapper.
◆ map()
◆ setDocumentNumber()
virtual void Lucene::TermVectorMapper::setDocumentNumber |
( |
int32_t |
documentNumber | ) |
|
|
virtual |
Passes down the index of the document whose term vector is currently being mapped, once for each top level call to a term vector reader.
Default implementation IGNORES the document number. Override if your implementation needs the document number.
NOTE: Document numbers are internal to Lucene and subject to change depending on indexing operations.
- Parameters
-
documentNumber | index of document currently being mapped |
◆ setExpectations()
virtual void Lucene::TermVectorMapper::setExpectations |
( |
const String & |
field, |
|
|
int32_t |
numTerms, |
|
|
bool |
storeOffsets, |
|
|
bool |
storePositions |
|
) |
| |
|
pure virtual |
◆ shared_from_this()
boost::shared_ptr< TermVectorMapper > Lucene::TermVectorMapper::shared_from_this |
( |
| ) |
|
|
inline |
◆ ignoringOffsets
bool Lucene::TermVectorMapper::ignoringOffsets |
|
protected |
◆ ignoringPositions
bool Lucene::TermVectorMapper::ignoringPositions |
|
protected |
The documentation for this class was generated from the following file: