Lucene++ - a full-featured, c++ search engine
API Documentation
This class implements InvertedDocConsumer
, which is passed each token produced by the analyzer on each field. It stores these tokens in a hash table, and allocates separate byte streams per token. Consumers of this class, eg FreqProxTermsWriter
and TermVectorsTermsWriter
, write their own byte streams under each term.
More...
#include <TermsHash.h>
Public Member Functions | |
TermsHash (const DocumentsWriterPtr &docWriter, bool trackAllocations, const TermsHashConsumerPtr &consumer, const TermsHashPtr &nextTermsHash) | |
virtual | ~TermsHash () |
virtual String | getClassName () |
boost::shared_ptr< TermsHash > | shared_from_this () |
virtual InvertedDocConsumerPerThreadPtr | addThread (const DocInverterPerThreadPtr &docInverterPerThread) |
Add a new thread. | |
virtual TermsHashPerThreadPtr | addThread (const DocInverterPerThreadPtr &docInverterPerThread, const TermsHashPerThreadPtr &primaryPerThread) |
virtual void | setFieldInfos (const FieldInfosPtr &fieldInfos) |
virtual void | abort () |
Abort (called after hitting AbortException) NOTE: do not make this sync'd; it's not necessary (DW ensures all other threads are idle), and it leads to deadlock. | |
void | shrinkFreePostings (MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state) |
virtual void | closeDocStore (const SegmentWriteStatePtr &state) |
Close doc stores. | |
virtual void | flush (MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state) |
Flush a new segment. | |
virtual bool | freeRAM () |
Attempt to free RAM, returning true if any RAM was freed. | |
void | recyclePostings (Collection< RawPostingListPtr > postings, int32_t numPostings) |
void | getPostings (Collection< RawPostingListPtr > postings) |
![]() | |
virtual | ~InvertedDocConsumer () |
boost::shared_ptr< InvertedDocConsumer > | shared_from_this () |
![]() | |
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. | |
Static Public Member Functions | |
static String | _getClassName () |
![]() | |
static String | _getClassName () |
Data Fields | |
TermsHashConsumerPtr | consumer |
TermsHashPtr | nextTermsHash |
int32_t | bytesPerPosting |
int32_t | postingsFreeChunk |
DocumentsWriterWeakPtr | _docWriter |
bool | trackAllocations |
![]() | |
FieldInfosPtr | fieldInfos |
Protected Attributes | |
Collection< RawPostingListPtr > | postingsFreeList |
int32_t | postingsFreeCount |
int32_t | postingsAllocCount |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
![]() | |
LuceneObject () | |
This class implements InvertedDocConsumer
, which is passed each token produced by the analyzer on each field. It stores these tokens in a hash table, and allocates separate byte streams per token. Consumers of this class, eg FreqProxTermsWriter
and TermVectorsTermsWriter
, write their own byte streams under each term.
Lucene::TermsHash::TermsHash | ( | const DocumentsWriterPtr & | docWriter, |
bool | trackAllocations, | ||
const TermsHashConsumerPtr & | consumer, | ||
const TermsHashPtr & | nextTermsHash | ||
) |
|
virtual |
|
inlinestatic |
|
virtual |
Abort (called after hitting AbortException) NOTE: do not make this sync'd; it's not necessary (DW ensures all other threads are idle), and it leads to deadlock.
Implements Lucene::InvertedDocConsumer.
|
virtual |
Add a new thread.
Implements Lucene::InvertedDocConsumer.
|
virtual |
|
virtual |
Close doc stores.
Implements Lucene::InvertedDocConsumer.
|
virtual |
Flush a new segment.
Implements Lucene::InvertedDocConsumer.
|
virtual |
Attempt to free RAM, returning true if any RAM was freed.
Implements Lucene::InvertedDocConsumer.
|
inlinevirtual |
Reimplemented from Lucene::InvertedDocConsumer.
void Lucene::TermsHash::getPostings | ( | Collection< RawPostingListPtr > | postings | ) |
void Lucene::TermsHash::recyclePostings | ( | Collection< RawPostingListPtr > | postings, |
int32_t | numPostings | ||
) |
|
virtual |
Reimplemented from Lucene::InvertedDocConsumer.
|
inline |
void Lucene::TermsHash::shrinkFreePostings | ( | MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField | threadsAndFields, |
const SegmentWriteStatePtr & | state | ||
) |
DocumentsWriterWeakPtr Lucene::TermsHash::_docWriter |
int32_t Lucene::TermsHash::bytesPerPosting |
TermsHashConsumerPtr Lucene::TermsHash::consumer |
TermsHashPtr Lucene::TermsHash::nextTermsHash |
|
protected |
int32_t Lucene::TermsHash::postingsFreeChunk |
|
protected |
|
protected |
bool Lucene::TermsHash::trackAllocations |