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

Loading...
Searching...
No Matches
DocFieldConsumers.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 DOCFIELDCONSUMERS_H
8#define DOCFIELDCONSUMERS_H
9
10#include "DocFieldConsumer.h"
11#include "DocumentsWriter.h"
12
13 namespace Lucene {
14
16 class DocFieldConsumers : public DocFieldConsumer {
17 public:
18 DocFieldConsumers(const DocFieldConsumerPtr& one, const DocFieldConsumerPtr& two);
19 virtual ~DocFieldConsumers();
20
21 LUCENE_CLASS(DocFieldConsumers);
22
23 public:
24 DocFieldConsumerPtr one;
25 DocFieldConsumerPtr two;
26
27 Collection<DocFieldConsumersPerDocPtr> docFreeList;
28 int32_t freeCount;
29 int32_t allocCount;
30
31 public:
32 virtual void setFieldInfos(const FieldInfosPtr& fieldInfos);
33
35 virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, const SegmentWriteStatePtr& state);
36
38 virtual void closeDocStore(const SegmentWriteStatePtr& state);
39
41 virtual bool freeRAM();
42
44 virtual DocFieldConsumerPerThreadPtr addThread(const DocFieldProcessorPerThreadPtr& docFieldProcessorPerThread);
45
46 DocFieldConsumersPerDocPtr getPerDoc();
47 void freePerDoc(const DocFieldConsumersPerDocPtr& perDoc);
48};
49
50 class DocFieldConsumersPerDoc : public DocWriter {
51 public:
52 DocFieldConsumersPerDoc(const DocFieldConsumersPtr& fieldConsumers);
53 virtual ~DocFieldConsumersPerDoc();
54
55 LUCENE_CLASS(DocFieldConsumersPerDoc);
56
57 protected:
58 DocFieldConsumersWeakPtr _fieldConsumers;
59
60 public:
61 DocWriterPtr one;
62 DocWriterPtr two;
63
64 public:
65 virtual int64_t sizeInBytes();
66 virtual void finish();
67 virtual void abort();
68};
69
70}
71
72#endif
DocFieldConsumer.h
DocumentsWriter.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::DocFieldConsumer
Definition DocFieldConsumer.h:14
Lucene::DocFieldConsumer::fieldInfos
FieldInfosPtr fieldInfos
Definition DocFieldConsumer.h:21
Lucene::DocFieldConsumersPerDoc::_fieldConsumers
DocFieldConsumersWeakPtr _fieldConsumers
Definition DocFieldConsumers.h:58
Lucene::DocFieldConsumersPerDoc::one
DocWriterPtr one
Definition DocFieldConsumers.h:61
Lucene::DocFieldConsumersPerDoc::two
DocWriterPtr two
Definition DocFieldConsumers.h:62
Lucene::DocFieldConsumersPerDoc::finish
virtual void finish()
Lucene::DocFieldConsumersPerDoc::~DocFieldConsumersPerDoc
virtual ~DocFieldConsumersPerDoc()
Lucene::DocFieldConsumersPerDoc::sizeInBytes
virtual int64_t sizeInBytes()
Lucene::DocFieldConsumersPerDoc::DocFieldConsumersPerDoc
DocFieldConsumersPerDoc(const DocFieldConsumersPtr &fieldConsumers)
Lucene::DocFieldConsumersPerDoc::abort
virtual void abort()
Lucene::DocFieldConsumers::addThread
virtual DocFieldConsumerPerThreadPtr addThread(const DocFieldProcessorPerThreadPtr &docFieldProcessorPerThread)
Add a new thread.
Lucene::DocFieldConsumers::docFreeList
Collection< DocFieldConsumersPerDocPtr > docFreeList
Definition DocFieldConsumers.h:27
Lucene::DocFieldConsumers::DocFieldConsumers
DocFieldConsumers(const DocFieldConsumerPtr &one, const DocFieldConsumerPtr &two)
Lucene::DocFieldConsumers::allocCount
int32_t allocCount
Definition DocFieldConsumers.h:29
Lucene::DocFieldConsumers::closeDocStore
virtual void closeDocStore(const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to close the doc stores.
Lucene::DocFieldConsumers::~DocFieldConsumers
virtual ~DocFieldConsumers()
Lucene::DocFieldConsumers::freeCount
int32_t freeCount
Definition DocFieldConsumers.h:28
Lucene::DocFieldConsumers::two
DocFieldConsumerPtr two
Definition DocFieldConsumers.h:25
Lucene::DocFieldConsumers::freeRAM
virtual bool freeRAM()
Called when DocumentsWriter is using too much RAM.
Lucene::DocFieldConsumers::freePerDoc
void freePerDoc(const DocFieldConsumersPerDocPtr &perDoc)
Lucene::DocFieldConsumers::one
DocFieldConsumerPtr one
Definition DocFieldConsumers.h:24
Lucene::DocFieldConsumers::flush
virtual void flush(MapDocFieldConsumerPerThreadCollectionDocFieldConsumerPerField threadsAndFields, const SegmentWriteStatePtr &state)
Called when DocumentsWriter decides to create a new segment.
Lucene::DocFieldConsumers::setFieldInfos
virtual void setFieldInfos(const FieldInfosPtr &fieldInfos)
Lucene::DocFieldConsumers::getPerDoc
DocFieldConsumersPerDocPtr getPerDoc()
Lucene::DocWriter::DocWriter
DocWriter()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::DocFieldConsumersPtr
boost::shared_ptr< DocFieldConsumers > DocFieldConsumersPtr
Definition LuceneTypes.h:111
Lucene::FieldInfosPtr
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition LuceneTypes.h:127
Lucene::DocFieldConsumersPerDocPtr
boost::shared_ptr< DocFieldConsumersPerDoc > DocFieldConsumersPerDocPtr
Definition LuceneTypes.h:112
Lucene::SegmentWriteStatePtr
boost::shared_ptr< SegmentWriteState > SegmentWriteStatePtr
Definition LuceneTypes.h:222
Lucene::DocFieldConsumerPtr
boost::shared_ptr< DocFieldConsumer > DocFieldConsumerPtr
Definition LuceneTypes.h:108
Lucene::DocFieldConsumersWeakPtr
boost::weak_ptr< DocFieldConsumers > DocFieldConsumersWeakPtr
Definition LuceneTypes.h:111
Lucene::DocWriterPtr
boost::shared_ptr< DocWriter > DocWriterPtr
Definition LuceneTypes.h:125
Lucene::DocFieldConsumerPerThreadPtr
boost::shared_ptr< DocFieldConsumerPerThread > DocFieldConsumerPerThreadPtr
Definition LuceneTypes.h:110
Lucene::DocFieldProcessorPerThreadPtr
boost::shared_ptr< DocFieldProcessorPerThread > DocFieldProcessorPerThreadPtr
Definition LuceneTypes.h:117

clucene.sourceforge.net