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
DocInverterPerThread.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 DOCINVERTERPERTHREAD_H
8
#define DOCINVERTERPERTHREAD_H
9
10
#include "
DocFieldConsumerPerThread.h
"
11
#include "
AttributeSource.h
"
12
13
namespace
Lucene {
14
17
class
DocInverterPerThread
:
public
DocFieldConsumerPerThread
{
18
public
:
19
DocInverterPerThread
(
const
DocFieldProcessorPerThreadPtr
& docFieldProcessorPerThread,
const
DocInverterPtr
& docInverter);
20
virtual
~DocInverterPerThread
();
21
22
LUCENE_CLASS
(
DocInverterPerThread
);
23
24
public
:
25
DocInverterWeakPtr
_docInverter
;
26
InvertedDocConsumerPerThreadPtr
consumer
;
27
InvertedDocEndConsumerPerThreadPtr
endConsumer
;
28
SingleTokenAttributeSourcePtr
singleToken
;
29
30
DocStatePtr
docState
;
31
FieldInvertStatePtr
fieldState
;
32
34
ReusableStringReaderPtr
stringReader
;
35
36
public
:
37
virtual
void
initialize
();
38
virtual
void
startDocument
();
39
virtual
DocWriterPtr
finishDocument
();
40
virtual
void
abort
();
41
virtual
DocFieldConsumerPerFieldPtr
addField
(
const
FieldInfoPtr
& fi);
42
};
43
44
class
SingleTokenAttributeSource
:
public
AttributeSource
{
45
public
:
46
SingleTokenAttributeSource
();
47
virtual
~SingleTokenAttributeSource
();
48
49
LUCENE_CLASS
(
SingleTokenAttributeSource
);
50
51
public
:
52
TermAttributePtr
termAttribute
;
53
OffsetAttributePtr
offsetAttribute
;
54
55
public
:
56
void
reinit
(
const
String& stringValue, int32_t startOffset, int32_t endOffset);
57
};
58
59
}
60
61
#endif
clucene.sourceforge.net