Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
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
12
namespace
Lucene {
13
18
class
TermsHash
:
public
InvertedDocConsumer
{
19
public
:
20
TermsHash
(
const
DocumentsWriterPtr
& docWriter,
bool
trackAllocations
,
const
TermsHashConsumerPtr
&
consumer
,
const
TermsHashPtr
&
nextTermsHash
);
21
virtual
~TermsHash
();
22
23
LUCENE_CLASS
(
TermsHash
);
24
25
public
:
26
TermsHashConsumerPtr
consumer
;
27
TermsHashPtr
nextTermsHash
;
28
int32_t
bytesPerPosting
;
29
int32_t
postingsFreeChunk
;
30
DocumentsWriterWeakPtr
_docWriter
;
31
bool
trackAllocations
;
32
33
protected
:
34
Collection<RawPostingListPtr>
postingsFreeList
;
35
int32_t
postingsFreeCount
;
36
int32_t
postingsAllocCount
;
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
63
void
getPostings
(
Collection<RawPostingListPtr>
postings);
64
};
65
66
}
67
68
#endif
clucene.sourceforge.net