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

SegmentTermEnum.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 SEGMENTTERMENUM_H
8 #define SEGMENTTERMENUM_H
9
10 #include "TermEnum.h"
11
12 namespace Lucene {
13
14 class LPPAPI SegmentTermEnum : public TermEnum {
15 public:
16 SegmentTermEnum();
17 SegmentTermEnum(const IndexInputPtr& i, const FieldInfosPtr& fis, bool isi);
18 virtual ~SegmentTermEnum();
19
20 LUCENE_CLASS(SegmentTermEnum);
21
22 protected:
23 IndexInputPtr input;
24 TermBufferPtr termBuffer;
25 TermBufferPtr prevBuffer;
26 TermBufferPtr scanBuffer; // used for scanning
27
28 TermInfoPtr _termInfo;
29
30 int32_t format;
31 bool isIndex;
32 int32_t formatM1SkipInterval;
33
34 public:
35 FieldInfosPtr fieldInfos;
36 int64_t size;
37 int64_t position;
38
39 int64_t indexPointer;
40 int32_t indexInterval;
41 int32_t skipInterval;
42 int32_t maxSkipLevels;
43
44 public:
45 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
46
47 void seek(int64_t pointer, int64_t p, const TermPtr& t, const TermInfoPtr& ti);
48
50 virtual bool next();
51
53 int32_t scanTo(const TermPtr& term);
54
57 virtual TermPtr term();
58
60 TermPtr prev();
61
64 TermInfoPtr termInfo();
65
68 void termInfo(const TermInfoPtr& ti);
69
72 virtual int32_t docFreq();
73
76 int64_t freqPointer();
77
80 int64_t proxPointer();
81
83 virtual void close();
84 };
85
86 }
87
88 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
TermEnum.h
Lucene::SegmentTermEnum
Definition: SegmentTermEnum.h:14
Lucene::SegmentTermEnum::termInfo
void termInfo(const TermInfoPtr &ti)
Sets the argument to the current TermInfo in the enumeration. Initially invalid, valid after next() c...
Lucene::SegmentTermEnum::position
int64_t position
Definition: SegmentTermEnum.h:37
Lucene::SegmentTermEnum::freqPointer
int64_t freqPointer()
Returns the freqPointer from the current TermInfo in the enumeration. Initially invalid,...
Lucene::SegmentTermEnum::next
virtual bool next()
Increments the enumeration to the next element. True if one exists.
Lucene::SegmentTermEnum::indexInterval
int32_t indexInterval
Definition: SegmentTermEnum.h:40
Lucene::SegmentTermEnum::seek
void seek(int64_t pointer, int64_t p, const TermPtr &t, const TermInfoPtr &ti)
Lucene::SegmentTermEnum::termBuffer
TermBufferPtr termBuffer
Definition: SegmentTermEnum.h:24
Lucene::SegmentTermEnum::formatM1SkipInterval
int32_t formatM1SkipInterval
Definition: SegmentTermEnum.h:32
Lucene::SegmentTermEnum::input
IndexInputPtr input
Definition: SegmentTermEnum.h:20
Lucene::SegmentTermEnum::~SegmentTermEnum
virtual ~SegmentTermEnum()
Lucene::SegmentTermEnum::format
int32_t format
Definition: SegmentTermEnum.h:30
Lucene::SegmentTermEnum::SegmentTermEnum
SegmentTermEnum()
Lucene::SegmentTermEnum::prev
TermPtr prev()
Returns the previous Term enumerated. Initially null.
Lucene::SegmentTermEnum::maxSkipLevels
int32_t maxSkipLevels
Definition: SegmentTermEnum.h:42
Lucene::SegmentTermEnum::termInfo
TermInfoPtr termInfo()
Returns the current TermInfo in the enumeration. Initially invalid, valid after next() called for the...
Lucene::SegmentTermEnum::close
virtual void close()
Closes the enumeration to further activity, freeing resources.
Lucene::SegmentTermEnum::term
virtual TermPtr term()
Returns the current Term in the enumeration. Initially invalid, valid after next() called for the fir...
Lucene::SegmentTermEnum::fieldInfos
FieldInfosPtr fieldInfos
Definition: SegmentTermEnum.h:35
Lucene::SegmentTermEnum::docFreq
virtual int32_t docFreq()
Returns the docFreq of the current Term in the enumeration. Initially invalid, valid after next() cal...
Lucene::SegmentTermEnum::size
int64_t size
Definition: SegmentTermEnum.h:36
Lucene::SegmentTermEnum::SegmentTermEnum
SegmentTermEnum(const IndexInputPtr &i, const FieldInfosPtr &fis, bool isi)
Lucene::SegmentTermEnum::skipInterval
int32_t skipInterval
Definition: SegmentTermEnum.h:41
Lucene::SegmentTermEnum::isIndex
bool isIndex
Definition: SegmentTermEnum.h:31
Lucene::SegmentTermEnum::prevBuffer
TermBufferPtr prevBuffer
Definition: SegmentTermEnum.h:25
Lucene::SegmentTermEnum::scanTo
int32_t scanTo(const TermPtr &term)
Optimized scan, without allocating new terms. Return number of invocations to next().
Lucene::SegmentTermEnum::_termInfo
TermInfoPtr _termInfo
Definition: SegmentTermEnum.h:28
Lucene::SegmentTermEnum::indexPointer
int64_t indexPointer
Definition: SegmentTermEnum.h:39
Lucene::SegmentTermEnum::proxPointer
int64_t proxPointer()
Returns the proxPointer from the current TermInfo in the enumeration. Initially invalid,...
Lucene::SegmentTermEnum::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Return clone of this object.
Lucene::SegmentTermEnum::scanBuffer
TermBufferPtr scanBuffer
Definition: SegmentTermEnum.h:26
Lucene::TermEnum
Abstract class for enumerating terms.
Definition: TermEnum.h:18
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::TermBufferPtr
boost::shared_ptr< TermBuffer > TermBufferPtr
Definition: LuceneTypes.h:234
Lucene::FieldInfosPtr
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::IndexInputPtr
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
Lucene::TermInfoPtr
boost::shared_ptr< TermInfo > TermInfoPtr
Definition: LuceneTypes.h:239

clucene.sourceforge.net