Lucene++ - a full-featured, c++ search engine
API Documentation

Loading...
Searching...
No Matches
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
AttributeSource.h
DocFieldConsumerPerThread.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::AttributeSource::AttributeSource
AttributeSource()
An AttributeSource using the default attribute factory DefaultAttributeFactory.
Lucene::DocFieldConsumerPerThread
Definition DocFieldConsumerPerThread.h:14
Lucene::DocInverterPerThread::singleToken
SingleTokenAttributeSourcePtr singleToken
Definition DocInverterPerThread.h:28
Lucene::DocInverterPerThread::DocInverterPerThread
DocInverterPerThread(const DocFieldProcessorPerThreadPtr &docFieldProcessorPerThread, const DocInverterPtr &docInverter)
Lucene::DocInverterPerThread::initialize
virtual void initialize()
Called directly after instantiation to create objects that depend on this object being fully construc...
Lucene::DocInverterPerThread::~DocInverterPerThread
virtual ~DocInverterPerThread()
Lucene::DocInverterPerThread::fieldState
FieldInvertStatePtr fieldState
Definition DocInverterPerThread.h:31
Lucene::DocInverterPerThread::startDocument
virtual void startDocument()
Lucene::DocInverterPerThread::finishDocument
virtual DocWriterPtr finishDocument()
Lucene::DocInverterPerThread::docState
DocStatePtr docState
Definition DocInverterPerThread.h:30
Lucene::DocInverterPerThread::abort
virtual void abort()
Lucene::DocInverterPerThread::endConsumer
InvertedDocEndConsumerPerThreadPtr endConsumer
Definition DocInverterPerThread.h:27
Lucene::DocInverterPerThread::consumer
InvertedDocConsumerPerThreadPtr consumer
Definition DocInverterPerThread.h:26
Lucene::DocInverterPerThread::addField
virtual DocFieldConsumerPerFieldPtr addField(const FieldInfoPtr &fi)
Lucene::DocInverterPerThread::stringReader
ReusableStringReaderPtr stringReader
Used to read a string value for a field.
Definition DocInverterPerThread.h:34
Lucene::DocInverterPerThread::_docInverter
DocInverterWeakPtr _docInverter
Definition DocInverterPerThread.h:25
Lucene::SingleTokenAttributeSource::reinit
void reinit(const String &stringValue, int32_t startOffset, int32_t endOffset)
Lucene::SingleTokenAttributeSource::termAttribute
TermAttributePtr termAttribute
Definition DocInverterPerThread.h:52
Lucene::SingleTokenAttributeSource::~SingleTokenAttributeSource
virtual ~SingleTokenAttributeSource()
Lucene::SingleTokenAttributeSource::offsetAttribute
OffsetAttributePtr offsetAttribute
Definition DocInverterPerThread.h:53
Lucene::SingleTokenAttributeSource::SingleTokenAttributeSource
SingleTokenAttributeSource()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::ReusableStringReaderPtr
boost::shared_ptr< ReusableStringReader > ReusableStringReaderPtr
Definition LuceneTypes.h:207
Lucene::DocInverterPtr
boost::shared_ptr< DocInverter > DocInverterPtr
Definition LuceneTypes.h:119
Lucene::FieldInvertStatePtr
boost::shared_ptr< FieldInvertState > FieldInvertStatePtr
Definition LuceneTypes.h:128
Lucene::DocFieldConsumerPerFieldPtr
boost::shared_ptr< DocFieldConsumerPerField > DocFieldConsumerPerFieldPtr
Definition LuceneTypes.h:109
Lucene::TermAttributePtr
boost::shared_ptr< TermAttribute > TermAttributePtr
Definition LuceneTypes.h:58
Lucene::InvertedDocEndConsumerPerThreadPtr
boost::shared_ptr< InvertedDocEndConsumerPerThread > InvertedDocEndConsumerPerThreadPtr
Definition LuceneTypes.h:168
Lucene::SingleTokenAttributeSourcePtr
boost::shared_ptr< SingleTokenAttributeSource > SingleTokenAttributeSourcePtr
Definition LuceneTypes.h:224
Lucene::DocWriterPtr
boost::shared_ptr< DocWriter > DocWriterPtr
Definition LuceneTypes.h:125
Lucene::FieldInfoPtr
boost::shared_ptr< FieldInfo > FieldInfoPtr
Definition LuceneTypes.h:126
Lucene::DocStatePtr
boost::shared_ptr< DocState > DocStatePtr
Definition LuceneTypes.h:122
Lucene::DocInverterWeakPtr
boost::weak_ptr< DocInverter > DocInverterWeakPtr
Definition LuceneTypes.h:119
Lucene::InvertedDocConsumerPerThreadPtr
boost::shared_ptr< InvertedDocConsumerPerThread > InvertedDocConsumerPerThreadPtr
Definition LuceneTypes.h:165
Lucene::OffsetAttributePtr
boost::shared_ptr< OffsetAttribute > OffsetAttributePtr
Definition LuceneTypes.h:40
Lucene::DocFieldProcessorPerThreadPtr
boost::shared_ptr< DocFieldProcessorPerThread > DocFieldProcessorPerThreadPtr
Definition LuceneTypes.h:117

clucene.sourceforge.net