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
CheckIndex.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 CHECKINDEX_H
8
#define CHECKINDEX_H
9
10
#include "
SegmentTermDocs.h
"
11
12
namespace
Lucene
13
{
20
class
LPPAPI
CheckIndex
:
public
LuceneObject
21
{
22
public
:
24
CheckIndex
(
DirectoryPtr
dir);
25
virtual
~
CheckIndex
();
26
27
LUCENE_CLASS
(
CheckIndex
);
28
29
protected
:
30
InfoStreamPtr
infoStream;
31
DirectoryPtr
dir
;
32
33
static
bool
_assertsOn
;
34
35
public
:
37
void
setInfoStream(
InfoStreamPtr
out);
38
44
IndexStatusPtr
checkIndex();
45
54
IndexStatusPtr
checkIndex(
Collection<String>
onlySegments);
55
64
void
fixIndex(
IndexStatusPtr
result);
65
66
static
bool
testAsserts();
67
static
bool
assertsOn();
68
90
static
int
main(
Collection<String>
args);
91
92
protected
:
93
void
msg(
const
String& msg);
94
96
FieldNormStatusPtr
testFieldNorms(
Collection<String>
fieldNames,
SegmentReaderPtr
reader);
97
99
TermIndexStatusPtr
testTermIndex(
SegmentInfoPtr
info,
SegmentReaderPtr
reader);
100
102
StoredFieldStatusPtr
testStoredFields(
SegmentInfoPtr
info,
SegmentReaderPtr
reader);
103
105
TermVectorStatusPtr
testTermVectors(
SegmentInfoPtr
info,
SegmentReaderPtr
reader);
106
};
107
109
class
LPPAPI
IndexStatus
:
public
LuceneObject
110
{
111
public
:
112
IndexStatus
();
113
virtual
~
IndexStatus
();
114
115
LUCENE_CLASS
(
IndexStatus
);
116
117
public
:
119
bool
clean;
120
122
bool
missingSegments
;
123
125
bool
cantOpenSegments
;
126
128
bool
missingSegmentVersion
;
129
131
String
segmentsFileName
;
132
134
int32_t
numSegments
;
135
137
String
segmentFormat
;
138
141
Collection<String>
segmentsChecked
;
142
144
bool
toolOutOfDate
;
145
147
Collection<SegmentInfoStatusPtr>
segmentInfos
;
148
150
DirectoryPtr
dir
;
151
154
SegmentInfosPtr
newSegments
;
155
157
int32_t
totLoseDocCount
;
158
160
int32_t
numBadSegments
;
161
163
bool
partial
;
164
166
MapStringString
userData
;
167
};
168
170
class
LPPAPI
SegmentInfoStatus
:
public
LuceneObject
171
{
172
public
:
173
SegmentInfoStatus
();
174
virtual
~
SegmentInfoStatus
();
175
176
LUCENE_CLASS
(
SegmentInfoStatus
);
177
178
public
:
180
String name;
181
183
int32_t
docCount
;
184
186
bool
compound
;
187
189
int32_t
numFiles
;
190
192
double
sizeMB
;
193
196
int32_t
docStoreOffset
;
197
199
String
docStoreSegment
;
200
202
bool
docStoreCompoundFile
;
203
205
bool
hasDeletions
;
206
208
String
deletionsFileName
;
209
211
int32_t
numDeleted
;
212
214
bool
openReaderPassed
;
215
217
int32_t
numFields
;
218
221
bool
hasProx
;
222
224
MapStringString
diagnostics
;
225
227
FieldNormStatusPtr
fieldNormStatus
;
228
230
TermIndexStatusPtr
termIndexStatus
;
231
233
StoredFieldStatusPtr
storedFieldStatus
;
234
236
TermVectorStatusPtr
termVectorStatus
;
237
};
238
240
class
LPPAPI
FieldNormStatus
:
public
LuceneObject
241
{
242
public
:
243
FieldNormStatus
();
244
virtual
~
FieldNormStatus
();
245
246
LUCENE_CLASS
(
FieldNormStatus
);
247
248
public
:
250
int64_t
totFields
;
251
253
LuceneException
error
;
254
};
255
257
class
LPPAPI
TermIndexStatus
:
public
LuceneObject
258
{
259
public
:
260
TermIndexStatus
();
261
virtual
~
TermIndexStatus
();
262
263
LUCENE_CLASS
(
TermIndexStatus
);
264
265
public
:
267
int64_t
termCount
;
268
270
int64_t
totFreq
;
271
273
int64_t
totPos
;
274
276
LuceneException
error
;
277
};
278
280
class
LPPAPI
StoredFieldStatus
:
public
LuceneObject
281
{
282
public
:
283
StoredFieldStatus
();
284
virtual
~
StoredFieldStatus
();
285
286
LUCENE_CLASS
(
StoredFieldStatus
);
287
288
public
:
290
int32_t docCount;
291
293
int64_t
totFields
;
294
296
LuceneException
error
;
297
};
298
300
class
LPPAPI
TermVectorStatus
:
public
LuceneObject
301
{
302
public
:
303
TermVectorStatus
();
304
virtual
~
TermVectorStatus
();
305
306
LUCENE_CLASS
(
TermVectorStatus
);
307
308
public
:
310
int32_t docCount;
311
313
int64_t
totVectors
;
314
316
LuceneException
error
;
317
};
318
}
319
320
#endif
clucene.sourceforge.net