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


TermsHash.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6 
7 #ifndef TERMSHASH_H
8 #define TERMSHASH_H
9 
10 #include "InvertedDocConsumer.h"
11 
12 namespace Lucene {
13 
19 public:
21  virtual ~TermsHash();
22 
24 
25 public:
28  int32_t bytesPerPosting;
32 
33 protected:
37 
38 public:
40  virtual InvertedDocConsumerPerThreadPtr addThread(const DocInverterPerThreadPtr& docInverterPerThread);
41  virtual TermsHashPerThreadPtr addThread(const DocInverterPerThreadPtr& docInverterPerThread, const TermsHashPerThreadPtr& primaryPerThread);
42 
43  virtual void setFieldInfos(const FieldInfosPtr& fieldInfos);
44 
48  virtual void abort();
49 
50  void shrinkFreePostings(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr& state);
51 
53  virtual void closeDocStore(const SegmentWriteStatePtr& state);
54 
56  virtual void flush(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr& state);
57 
59  virtual bool freeRAM();
60 
61  void recyclePostings(Collection<RawPostingListPtr> postings, int32_t numPostings);
62 
64 };
65 
66 }
67 
68 #endif
boost::shared_ptr< TermsHash > TermsHashPtr
Definition: LuceneTypes.h:246
virtual void flush(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Flush a new segment.
void recyclePostings(Collection< RawPostingListPtr > postings, int32_t numPostings)
Collection< RawPostingListPtr > postingsFreeList
Definition: TermsHash.h:34
FieldInfosPtr fieldInfos
Definition: InvertedDocConsumer.h:18
TermsHash(const DocumentsWriterPtr &docWriter, bool trackAllocations, const TermsHashConsumerPtr &consumer, const TermsHashPtr &nextTermsHash)
boost::shared_ptr< DocInverterPerThread > DocInverterPerThreadPtr
Definition: LuceneTypes.h:121
boost::shared_ptr< TermsHashConsumer > TermsHashConsumerPtr
Definition: LuceneTypes.h:247
virtual void abort()
Abort (called after hitting AbortException) NOTE: do not make this sync&#39;d; it&#39;s not necessary (DW ens...
int32_t bytesPerPosting
Definition: TermsHash.h:28
virtual void setFieldInfos(const FieldInfosPtr &fieldInfos)
int32_t postingsAllocCount
Definition: TermsHash.h:36
boost::weak_ptr< DocumentsWriter > DocumentsWriterWeakPtr
Definition: LuceneTypes.h:123
virtual bool freeRAM()
Attempt to free RAM, returning true if any RAM was freed.
bool trackAllocations
Definition: TermsHash.h:31
boost::shared_ptr< DocumentsWriter > DocumentsWriterPtr
Definition: LuceneTypes.h:123
Definition: InvertedDocConsumer.h:14
This class implements InvertedDocConsumer, which is passed each token produced by the analyzer on eac...
Definition: TermsHash.h:18
int32_t postingsFreeCount
Definition: TermsHash.h:35
int32_t postingsFreeChunk
Definition: TermsHash.h:29
DocumentsWriterWeakPtr _docWriter
Definition: TermsHash.h:30
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
TermsHashConsumerPtr consumer
Definition: TermsHash.h:23
boost::shared_ptr< TermsHashPerThread > TermsHashPerThreadPtr
Definition: LuceneTypes.h:251
void getPostings(Collection< RawPostingListPtr > postings)
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Close doc stores.
boost::shared_ptr< InvertedDocConsumerPerThread > InvertedDocConsumerPerThreadPtr
Definition: LuceneTypes.h:165
TermsHashPtr nextTermsHash
Definition: TermsHash.h:27
virtual InvertedDocConsumerPerThreadPtr addThread(const DocInverterPerThreadPtr &docInverterPerThread)
Add a new thread.
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition: LuceneTypes.h:222
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
virtual ~TermsHash()
void shrinkFreePostings(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)

clucene.sourceforge.net