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


FieldInvertState.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 FIELDINVERTSTATE_H
8 #define FIELDINVERTSTATE_H
9 
10 #include "LuceneObject.h"
11 
12 namespace Lucene {
13 
16 class LPPAPI FieldInvertState : public LuceneObject {
17 public:
18  FieldInvertState(int32_t position = 0, int32_t length = 0, int32_t numOverlap = 0, int32_t offset = 0, double boost = 0);
19  virtual ~FieldInvertState();
20 
22 
23 INTERNAL:
24  int32_t position;
25  int32_t length;
26  int32_t numOverlap;
27  int32_t offset;
28  double boost;
30 
31 public:
34  void reset(double docBoost);
35 
38  int32_t getPosition();
39 
42  int32_t getLength();
43 
46  int32_t getNumOverlap();
47 
50  int32_t getOffset();
51 
55  double getBoost();
56 
58 };
59 
60 }
61 
62 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
This class tracks the number and position / offset parameters of terms being added to the index....
Definition: FieldInvertState.h:16
AttributeSourcePtr attributeSource
Definition: FieldInvertState.h:29
int32_t getOffset()
Get end offset of the last processed term.
int32_t getPosition()
Get the last processed term position.
int32_t offset
Definition: FieldInvertState.h:27
int32_t length
Definition: FieldInvertState.h:25
FieldInvertState(int32_t position=0, int32_t length=0, int32_t numOverlap=0, int32_t offset=0, double boost=0)
int32_t getLength()
Get total number of terms in this field.
int32_t numOverlap
Definition: FieldInvertState.h:26
void reset(double docBoost)
Re-initialize the state, using this boost value.
int32_t getNumOverlap()
Get the number of terms with positionIncrement == 0.
double boost
Definition: FieldInvertState.h:28
double getBoost()
Get boost value. This is the cumulative product of document boost and field boost for all field insta...
AttributeSourcePtr getAttributeSource()
Base class for all Lucene classes.
Definition: LuceneObject.h:31
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< AttributeSource > AttributeSourcePtr
Definition: LuceneTypes.h:520

clucene.sourceforge.net