Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes
Lucene::SortedTermVectorMapper Class Reference

Store a sorted collection of TermVectorEntrys. Collects all term information into a single, sorted set. More...

#include <SortedTermVectorMapper.h>

+ Inheritance diagram for Lucene::SortedTermVectorMapper:

Public Member Functions

 SortedTermVectorMapper (TermVectorEntryComparator comparator)
 
 SortedTermVectorMapper (bool ignoringPositions, bool ignoringOffsets, TermVectorEntryComparator comparator)
 
virtual ~SortedTermVectorMapper ()
 
virtual String getClassName ()
 
boost::shared_ptr< SortedTermVectorMappershared_from_this ()
 
virtual void map (const String &term, int32_t frequency, Collection< TermVectorOffsetInfoPtr > offsets, Collection< int32_t > positions)
 Map the Term Vector information into your own structure.
 
virtual void setExpectations (const String &field, int32_t numTerms, bool storeOffsets, bool storePositions)
 Tell the mapper what to expect in regards to field, number of terms, offset and position storage.
 
Collection< TermVectorEntryPtrgetTermVectorEntrySet ()
 The TermVectorEntrySet. A SortedSet of TermVectorEntry objects. Sort is by the comparator passed into the constructor.
 
- Public Member Functions inherited from Lucene::TermVectorMapper
 TermVectorMapper (bool ignoringPositions=false, bool ignoringOffsets=false)
 
virtual ~TermVectorMapper ()
 
boost::shared_ptr< TermVectorMappershared_from_this ()
 
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.
 
- Public Member Functions inherited from Lucene::LuceneObject
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.
 
- Public Member Functions inherited from Lucene::LuceneSync
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 Member Functions inherited from Lucene::TermVectorMapper
static String _getClassName ()
 

Static Public Attributes

static const wchar_t * ALL
 

Protected Attributes

Collection< TermVectorEntryPtrcurrentSet
 
MapStringTermVectorEntry termToTVE
 
bool storeOffsets
 
bool storePositions
 
TermVectorEntryComparator comparator
 
- Protected Attributes inherited from Lucene::TermVectorMapper
bool ignoringPositions
 
bool ignoringOffsets
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Detailed Description

Store a sorted collection of TermVectorEntrys. Collects all term information into a single, sorted set.

NOTE: This Mapper ignores all Field information for the Document. This means that if you are using offset/ positions you will not know what Fields they correlate with.

This is not thread-safe

Constructor & Destructor Documentation

◆ SortedTermVectorMapper() [1/2]

Lucene::SortedTermVectorMapper::SortedTermVectorMapper ( TermVectorEntryComparator  comparator)
Parameters
comparatorA Comparator for sorting TermVectorEntrys

◆ SortedTermVectorMapper() [2/2]

Lucene::SortedTermVectorMapper::SortedTermVectorMapper ( bool  ignoringPositions,
bool  ignoringOffsets,
TermVectorEntryComparator  comparator 
)

◆ ~SortedTermVectorMapper()

virtual Lucene::SortedTermVectorMapper::~SortedTermVectorMapper ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::SortedTermVectorMapper::_getClassName ( )
inlinestatic

◆ getClassName()

virtual String Lucene::SortedTermVectorMapper::getClassName ( )
inlinevirtual

Reimplemented from Lucene::TermVectorMapper.

◆ getTermVectorEntrySet()

Collection< TermVectorEntryPtr > Lucene::SortedTermVectorMapper::getTermVectorEntrySet ( )

The TermVectorEntrySet. A SortedSet of TermVectorEntry objects. Sort is by the comparator passed into the constructor.

This set will be empty until after the mapping process takes place.

Returns
The sorted set of TermVectorEntry.

◆ map()

virtual void Lucene::SortedTermVectorMapper::map ( const String &  term,
int32_t  frequency,
Collection< TermVectorOffsetInfoPtr offsets,
Collection< int32_t >  positions 
)
virtual

Map the Term Vector information into your own structure.

Implements Lucene::TermVectorMapper.

◆ setExpectations()

virtual void Lucene::SortedTermVectorMapper::setExpectations ( const String &  field,
int32_t  numTerms,
bool  storeOffsets,
bool  storePositions 
)
virtual

Tell the mapper what to expect in regards to field, number of terms, offset and position storage.

Implements Lucene::TermVectorMapper.

◆ shared_from_this()

boost::shared_ptr< SortedTermVectorMapper > Lucene::SortedTermVectorMapper::shared_from_this ( )
inline

Field Documentation

◆ ALL

const wchar_t* Lucene::SortedTermVectorMapper::ALL
static

◆ comparator

TermVectorEntryComparator Lucene::SortedTermVectorMapper::comparator
protected

◆ currentSet

Collection<TermVectorEntryPtr> Lucene::SortedTermVectorMapper::currentSet
protected

◆ storeOffsets

bool Lucene::SortedTermVectorMapper::storeOffsets
protected

◆ storePositions

bool Lucene::SortedTermVectorMapper::storePositions
protected

◆ termToTVE

MapStringTermVectorEntry Lucene::SortedTermVectorMapper::termToTVE
protected

The documentation for this class was generated from the following file:

clucene.sourceforge.net