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


Loading...
Searching...
No Matches
TermsHash.h
Go to the documentation of this file.
1
2// 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
12namespace Lucene {
13
19public:
21 virtual ~TermsHash();
22
24
25public:
32
33protected:
37
38public:
41 virtual TermsHashPerThreadPtr addThread(const DocInverterPerThreadPtr& docInverterPerThread, const TermsHashPerThreadPtr& primaryPerThread);
42
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
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Definition InvertedDocConsumer.h:14
FieldInfosPtr fieldInfos
Definition InvertedDocConsumer.h:21
This class implements InvertedDocConsumer, which is passed each token produced by the analyzer on eac...
Definition TermsHash.h:18
void recyclePostings(Collection< RawPostingListPtr > postings, int32_t numPostings)
DocumentsWriterWeakPtr _docWriter
Definition TermsHash.h:30
bool trackAllocations
Definition TermsHash.h:31
void getPostings(Collection< RawPostingListPtr > postings)
int32_t postingsAllocCount
Definition TermsHash.h:36
int32_t postingsFreeChunk
Definition TermsHash.h:29
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Close doc stores.
int32_t bytesPerPosting
Definition TermsHash.h:28
virtual void flush(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Flush a new segment.
virtual ~TermsHash()
void shrinkFreePostings(MapInvertedDocConsumerPerThreadCollectionInvertedDocConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
virtual TermsHashPerThreadPtr addThread(const DocInverterPerThreadPtr &docInverterPerThread, const TermsHashPerThreadPtr &primaryPerThread)
TermsHashPtr nextTermsHash
Definition TermsHash.h:27
virtual InvertedDocConsumerPerThreadPtr addThread(const DocInverterPerThreadPtr &docInverterPerThread)
Add a new thread.
virtual void setFieldInfos(const FieldInfosPtr &fieldInfos)
TermsHashConsumerPtr consumer
Definition TermsHash.h:26
Collection< RawPostingListPtr > postingsFreeList
Definition TermsHash.h:34
virtual bool freeRAM()
Attempt to free RAM, returning true if any RAM was freed.
virtual void abort()
Abort (called after hitting AbortException) NOTE: do not make this sync'd; it's not necessary (DW ens...
TermsHash(const DocumentsWriterPtr &docWriter, bool trackAllocations, const TermsHashConsumerPtr &consumer, const TermsHashPtr &nextTermsHash)
int32_t postingsFreeCount
Definition TermsHash.h:35
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition LuceneTypes.h:127
boost::shared_ptr< DocumentsWriter > DocumentsWriterPtr
Definition LuceneTypes.h:123
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition LuceneTypes.h:222
boost::weak_ptr< DocumentsWriter > DocumentsWriterWeakPtr
Definition LuceneTypes.h:123
boost::shared_ptr< DocInverterPerThread > DocInverterPerThreadPtr
Definition LuceneTypes.h:121
boost::shared_ptr< TermsHashPerThread > TermsHashPerThreadPtr
Definition LuceneTypes.h:251
boost::shared_ptr< TermsHashConsumer > TermsHashConsumerPtr
Definition LuceneTypes.h:247
boost::shared_ptr< InvertedDocConsumerPerThread > InvertedDocConsumerPerThreadPtr
Definition LuceneTypes.h:165
boost::shared_ptr< TermsHash > TermsHashPtr
Definition LuceneTypes.h:246

clucene.sourceforge.net