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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
Lucene::TermsHashPerField Class Reference

#include <TermsHashPerField.h>

+ Inheritance diagram for Lucene::TermsHashPerField:

Public Member Functions

 TermsHashPerField (const DocInverterPerFieldPtr &docInverterPerField, const TermsHashPerThreadPtr &perThread, const TermsHashPerThreadPtr &nextPerThread, const FieldInfoPtr &fieldInfo)
 
virtual ~TermsHashPerField ()
 
virtual String getClassName ()
 
boost::shared_ptr
< TermsHashPerField
shared_from_this ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed. More...
 
void shrinkHash (int32_t targetSize)
 
void reset ()
 
virtual void abort ()
 Called on hitting an aborting exception. More...
 
void initReader (const ByteSliceReaderPtr &reader, const RawPostingListPtr &p, int32_t stream)
 
Collection< RawPostingListPtrsortPostings ()
 Collapse the hash table and sort in-place. More...
 
virtual void start (const FieldablePtr &field)
 Called before a field instance is being processed. More...
 
virtual bool start (Collection< FieldablePtr > fields, int32_t count)
 Called once per field, and is given all Fieldable occurrences for this field in the document. More...
 
void add (int32_t textStart)
 
virtual void add ()
 Primary entry point (for first TermsHash) More...
 
void writeByte (int32_t stream, int8_t b)
 
void writeBytes (int32_t stream, const uint8_t *b, int32_t offset, int32_t length)
 
void writeVInt (int32_t stream, int32_t i)
 
virtual void finish ()
 Called once per field per document, after all Fieldable occurrences are inverted. More...
 
void rehashPostings (int32_t newSize)
 Called when postings hash is too small (> 50% occupied) or too large (< 20% occupied). More...
 
- Public Member Functions inherited from Lucene::InvertedDocConsumerPerField
virtual ~InvertedDocConsumerPerField ()
 
boost::shared_ptr
< InvertedDocConsumerPerField
shared_from_this ()
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object. More...
 
virtual int32_t hashCode ()
 Return hash code for this object. More...
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal. More...
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects. More...
 
virtual String toString ()
 Returns a string representation of the object. More...
 
- Public Member Functions inherited from Lucene::LuceneSync
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 Member Functions inherited from Lucene::InvertedDocConsumerPerField
static String _getClassName ()
 

Data Fields

TermsHashConsumerPerFieldPtr consumer
 
TermsHashPerFieldPtr nextPerField
 
DocInverterPerFieldWeakPtr _docInverterPerField
 
TermsHashPerThreadPtr nextPerThread
 
TermsHashPerThreadWeakPtr _perThread
 
DocStatePtr docState
 
FieldInvertStatePtr fieldState
 
TermAttributePtr termAtt
 
CharBlockPoolPtr charPool
 
IntBlockPoolPtr intPool
 
ByteBlockPoolPtr bytePool
 
int32_t streamCount
 
int32_t numPostingInt
 
FieldInfoPtr fieldInfo
 
bool postingsCompacted
 
int32_t numPostings
 
IntArray intUptos
 
int32_t intUptoStart
 

Protected Member Functions

void compactPostings ()
 
bool postingEquals (const wchar_t *tokenText, int32_t tokenTextLen)
 Test whether the text for current RawPostingList p equals current tokenText. More...
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 

Protected Attributes

int32_t postingsHashSize
 
int32_t postingsHashHalfSize
 
int32_t postingsHashMask
 
Collection< RawPostingListPtrpostingsHash
 
RawPostingListPtr p
 
bool doCall
 
bool doNextCall
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Constructor & Destructor Documentation

Lucene::TermsHashPerField::TermsHashPerField ( const DocInverterPerFieldPtr docInverterPerField,
const TermsHashPerThreadPtr perThread,
const TermsHashPerThreadPtr nextPerThread,
const FieldInfoPtr fieldInfo 
)
virtual Lucene::TermsHashPerField::~TermsHashPerField ( )
virtual

Member Function Documentation

static String Lucene::TermsHashPerField::_getClassName ( )
inlinestatic
virtual void Lucene::TermsHashPerField::abort ( )
virtual

Called on hitting an aborting exception.

Implements Lucene::InvertedDocConsumerPerField.

void Lucene::TermsHashPerField::add ( int32_t  textStart)
virtual void Lucene::TermsHashPerField::add ( )
virtual

Primary entry point (for first TermsHash)

Implements Lucene::InvertedDocConsumerPerField.

void Lucene::TermsHashPerField::compactPostings ( )
protected
virtual void Lucene::TermsHashPerField::finish ( )
virtual

Called once per field per document, after all Fieldable occurrences are inverted.

Implements Lucene::InvertedDocConsumerPerField.

virtual String Lucene::TermsHashPerField::getClassName ( )
inlinevirtual
virtual void Lucene::TermsHashPerField::initialize ( )
virtual

Called directly after instantiation to create objects that depend on this object being fully constructed.

Reimplemented from Lucene::LuceneObject.

void Lucene::TermsHashPerField::initReader ( const ByteSliceReaderPtr reader,
const RawPostingListPtr p,
int32_t  stream 
)
bool Lucene::TermsHashPerField::postingEquals ( const wchar_t *  tokenText,
int32_t  tokenTextLen 
)
protected

Test whether the text for current RawPostingList p equals current tokenText.

void Lucene::TermsHashPerField::rehashPostings ( int32_t  newSize)

Called when postings hash is too small (> 50% occupied) or too large (< 20% occupied).

void Lucene::TermsHashPerField::reset ( )
boost::shared_ptr< TermsHashPerField > Lucene::TermsHashPerField::shared_from_this ( )
inline
void Lucene::TermsHashPerField::shrinkHash ( int32_t  targetSize)
Collection<RawPostingListPtr> Lucene::TermsHashPerField::sortPostings ( )

Collapse the hash table and sort in-place.

virtual void Lucene::TermsHashPerField::start ( const FieldablePtr field)
virtual

Called before a field instance is being processed.

Implements Lucene::InvertedDocConsumerPerField.

virtual bool Lucene::TermsHashPerField::start ( Collection< FieldablePtr fields,
int32_t  count 
)
virtual

Called once per field, and is given all Fieldable occurrences for this field in the document.

Implements Lucene::InvertedDocConsumerPerField.

void Lucene::TermsHashPerField::writeByte ( int32_t  stream,
int8_t  b 
)
void Lucene::TermsHashPerField::writeBytes ( int32_t  stream,
const uint8_t *  b,
int32_t  offset,
int32_t  length 
)
void Lucene::TermsHashPerField::writeVInt ( int32_t  stream,
int32_t  i 
)

Field Documentation

DocInverterPerFieldWeakPtr Lucene::TermsHashPerField::_docInverterPerField
TermsHashPerThreadWeakPtr Lucene::TermsHashPerField::_perThread
ByteBlockPoolPtr Lucene::TermsHashPerField::bytePool
CharBlockPoolPtr Lucene::TermsHashPerField::charPool
TermsHashConsumerPerFieldPtr Lucene::TermsHashPerField::consumer
bool Lucene::TermsHashPerField::doCall
protected
DocStatePtr Lucene::TermsHashPerField::docState
bool Lucene::TermsHashPerField::doNextCall
protected
FieldInfoPtr Lucene::TermsHashPerField::fieldInfo
FieldInvertStatePtr Lucene::TermsHashPerField::fieldState
IntBlockPoolPtr Lucene::TermsHashPerField::intPool
IntArray Lucene::TermsHashPerField::intUptos
int32_t Lucene::TermsHashPerField::intUptoStart
TermsHashPerFieldPtr Lucene::TermsHashPerField::nextPerField
TermsHashPerThreadPtr Lucene::TermsHashPerField::nextPerThread
int32_t Lucene::TermsHashPerField::numPostingInt
int32_t Lucene::TermsHashPerField::numPostings
RawPostingListPtr Lucene::TermsHashPerField::p
protected
bool Lucene::TermsHashPerField::postingsCompacted
Collection<RawPostingListPtr> Lucene::TermsHashPerField::postingsHash
protected
int32_t Lucene::TermsHashPerField::postingsHashHalfSize
protected
int32_t Lucene::TermsHashPerField::postingsHashMask
protected
int32_t Lucene::TermsHashPerField::postingsHashSize
protected
int32_t Lucene::TermsHashPerField::streamCount
TermAttributePtr Lucene::TermsHashPerField::termAtt

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

clucene.sourceforge.net