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
DefaultSkipListWriter.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2011 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 DEFAULTSKIPLISTWRITER_H
8
#define DEFAULTSKIPLISTWRITER_H
9
10
#include "
MultiLevelSkipListWriter.h
"
11
12
namespace
Lucene
13
{
15
class
DefaultSkipListWriter
:
public
MultiLevelSkipListWriter
16
{
17
public
:
18
DefaultSkipListWriter
(int32_t
skipInterval
, int32_t
numberOfSkipLevels
, int32_t docCount,
IndexOutputPtr
freqOutput
,
IndexOutputPtr
proxOutput
);
19
virtual
~DefaultSkipListWriter
();
20
21
LUCENE_CLASS
(
DefaultSkipListWriter
);
22
23
protected
:
24
Collection<int32_t>
lastSkipDoc
;
25
Collection<int32_t>
lastSkipPayloadLength
;
26
Collection<int64_t>
lastSkipFreqPointer
;
27
Collection<int64_t>
lastSkipProxPointer
;
28
29
IndexOutputPtr
freqOutput
;
30
IndexOutputPtr
proxOutput
;
31
32
int32_t
curDoc
;
33
bool
curStorePayloads
;
34
int32_t
curPayloadLength
;
35
int64_t
curFreqPointer
;
36
int64_t
curProxPointer
;
37
38
public
:
39
void
setFreqOutput
(
IndexOutputPtr
freqOutput);
40
void
setProxOutput
(
IndexOutputPtr
proxOutput);
41
43
void
setSkipData
(int32_t doc,
bool
storePayloads, int32_t payloadLength);
44
45
protected
:
46
virtual
void
resetSkip
();
47
virtual
void
writeSkipData
(int32_t level,
IndexOutputPtr
skipBuffer
);
48
49
friend
class
FormatPostingsTermsWriter
;
50
};
51
}
52
53
#endif
clucene.sourceforge.net