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>
Inheritance diagram for Lucene::TermsHash: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. More... | |
| 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. More... | |
| void | shrinkFreePostings (MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state) |
| virtual void | closeDocStore (const SegmentWriteStatePtr &state) |
| Close doc stores. More... | |
| virtual void | flush (MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state) |
| Flush a new segment. More... | |
| virtual bool | freeRAM () |
| Attempt to free RAM, returning true if any RAM was freed. More... | |
| void | recyclePostings (Collection< RawPostingListPtr > postings, int32_t numPostings) |
| void | getPostings (Collection< RawPostingListPtr > postings) |
Public Member Functions inherited from Lucene::InvertedDocConsumer | |
| virtual | ~InvertedDocConsumer () |
| boost::shared_ptr< InvertedDocConsumer > | shared_from_this () |
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. More... | |
| 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::InvertedDocConsumer | |
| static String | _getClassName () |
Data Fields | |
| TermsHashConsumerPtr | consumer |
| TermsHashPtr | nextTermsHash |
| int32_t | bytesPerPosting |
| int32_t | postingsFreeChunk |
| DocumentsWriterWeakPtr | _docWriter |
| bool | trackAllocations |
Data Fields inherited from Lucene::InvertedDocConsumer | |
| FieldInfosPtr | fieldInfos |
Protected Attributes | |
| Collection< RawPostingListPtr > | postingsFreeList |
| int32_t | postingsFreeCount |
| int32_t | postingsAllocCount |
Protected Attributes inherited from Lucene::LuceneSync | |
| SynchronizePtr | objectLock |
| LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
Protected Member Functions inherited from Lucene::LuceneObject | |
| 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 |