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

clucene.sourceforge.net