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

NormsWriterPerField.h
Go to the documentation of this file.
1 // 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 NORMSWRITERPERFIELD_H
8 #define NORMSWRITERPERFIELD_H
9
10 #include "InvertedDocEndConsumerPerField.h"
11
12 namespace Lucene {
13
16 class NormsWriterPerField : public InvertedDocEndConsumerPerField {
17 public:
18 NormsWriterPerField(const DocInverterPerFieldPtr& docInverterPerField, const NormsWriterPerThreadPtr& perThread, const FieldInfoPtr& fieldInfo);
19 virtual ~NormsWriterPerField();
20
21 LUCENE_CLASS(NormsWriterPerField);
22
23 public:
24 NormsWriterPerThreadWeakPtr _perThread;
25 FieldInfoPtr fieldInfo;
26 DocStatePtr docState;
27
28 // Holds all docID/norm pairs we've seen
29 Collection<int32_t> docIDs;
30 ByteArray norms;
31 int32_t upto;
32
33 FieldInvertStatePtr fieldState;
34
35 public:
36 void reset();
37 virtual void abort();
38
40 virtual int32_t compareTo(const LuceneObjectPtr& other);
41
42 virtual void finish();
43 };
44
45 }
46
47 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::Collection< int32_t >
Lucene::NormsWriterPerField::finish
virtual void finish()
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
InvertedDocEndConsumerPerField.h
Lucene::NormsWriterPerField
Taps into DocInverter, as an InvertedDocEndConsumer, which is called at the end of inverting each fie...
Definition: NormsWriterPerField.h:16
Lucene::InvertedDocEndConsumerPerField
Definition: InvertedDocEndConsumerPerField.h:14
Lucene::FieldInvertStatePtr
boost::shared_ptr< FieldInvertState > FieldInvertStatePtr
Definition: LuceneTypes.h:128
Lucene::NormsWriterPerThreadWeakPtr
boost::weak_ptr< NormsWriterPerThread > NormsWriterPerThreadWeakPtr
Definition: LuceneTypes.h:190
Lucene::NormsWriterPerThreadPtr
boost::shared_ptr< NormsWriterPerThread > NormsWriterPerThreadPtr
Definition: LuceneTypes.h:190
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::FieldInfoPtr
boost::shared_ptr< FieldInfo > FieldInfoPtr
Definition: LuceneTypes.h:126
Lucene::DocInverterPerFieldPtr
boost::shared_ptr< DocInverterPerField > DocInverterPerFieldPtr
Definition: LuceneTypes.h:120
Lucene::NormsWriterPerField::abort
virtual void abort()
Lucene::NormsWriterPerField::NormsWriterPerField
NormsWriterPerField(const DocInverterPerFieldPtr &docInverterPerField, const NormsWriterPerThreadPtr &perThread, const FieldInfoPtr &fieldInfo)
Lucene::NormsWriterPerField::docIDs
Collection< int32_t > docIDs
Definition: NormsWriterPerField.h:29
Lucene::NormsWriterPerField::reset
void reset()
Lucene::NormsWriterPerField::norms
ByteArray norms
Definition: NormsWriterPerField.h:30
Lucene::NormsWriterPerField::_perThread
NormsWriterPerThreadWeakPtr _perThread
Definition: NormsWriterPerField.h:21
Lucene::NormsWriterPerField::upto
int32_t upto
Definition: NormsWriterPerField.h:31
Lucene::DocStatePtr
boost::shared_ptr< DocState > DocStatePtr
Definition: LuceneTypes.h:122
Lucene::NormsWriterPerField::fieldInfo
FieldInfoPtr fieldInfo
Definition: NormsWriterPerField.h:25
Lucene::NormsWriterPerField::~NormsWriterPerField
virtual ~NormsWriterPerField()
Lucene::NormsWriterPerField::docState
DocStatePtr docState
Definition: NormsWriterPerField.h:26
Lucene::NormsWriterPerField::fieldState
FieldInvertStatePtr fieldState
Definition: NormsWriterPerField.h:33
Lucene::NormsWriterPerField::compareTo
virtual int32_t compareTo(const LuceneObjectPtr &other)
Compare two objects.

clucene.sourceforge.net