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