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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 SegmentTermEnum : public TermEnum {
15 public:
17  SegmentTermEnum(const IndexInputPtr& i, const FieldInfosPtr& fis, bool isi);
18  virtual ~SegmentTermEnum();
19 
21 
22 protected:
26  TermBufferPtr scanBuffer; // used for scanning
27 
29 
30  int32_t format;
31  bool isIndex;
33 
34 public:
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 
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
virtual bool next()
Increments the enumeration to the next element. True if one exists.
int32_t format
Definition: SegmentTermEnum.h:30
Abstract class for enumerating terms.
Definition: TermEnum.h:18
int64_t size
Definition: SegmentTermEnum.h:36
int64_t position
Definition: SegmentTermEnum.h:37
boost::shared_ptr< TermBuffer > TermBufferPtr
Definition: LuceneTypes.h:234
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
TermInfoPtr _termInfo
Definition: SegmentTermEnum.h:28
int32_t scanTo(const TermPtr &term)
Optimized scan, without allocating new terms. Return number of invocations to next().
TermBufferPtr scanBuffer
Definition: SegmentTermEnum.h:26
TermBufferPtr prevBuffer
Definition: SegmentTermEnum.h:25
TermInfoPtr termInfo()
Returns the current TermInfo in the enumeration. Initially invalid, valid after next() called for the...
Definition: SegmentTermEnum.h:14
TermBufferPtr termBuffer
Definition: SegmentTermEnum.h:24
bool isIndex
Definition: SegmentTermEnum.h:31
IndexInputPtr input
Definition: SegmentTermEnum.h:20
int64_t freqPointer()
Returns the freqPointer from the current TermInfo in the enumeration. Initially invalid, valid after next() called for the first time.
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Return clone of this object.
void seek(int64_t pointer, int64_t p, const TermPtr &t, const TermInfoPtr &ti)
TermPtr prev()
Returns the previous Term enumerated. Initially null.
boost::shared_ptr< IndexInput > IndexInputPtr
Definition: LuceneTypes.h:493
virtual TermPtr term()
Returns the current Term in the enumeration. Initially invalid, valid after next() called for the fir...
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
int32_t formatM1SkipInterval
Definition: SegmentTermEnum.h:32
int64_t proxPointer()
Returns the proxPointer from the current TermInfo in the enumeration. Initially invalid, valid after next() called for the first time.
int32_t indexInterval
Definition: SegmentTermEnum.h:40
int64_t indexPointer
Definition: SegmentTermEnum.h:39
int32_t maxSkipLevels
Definition: SegmentTermEnum.h:42
boost::shared_ptr< TermInfo > TermInfoPtr
Definition: LuceneTypes.h:239
virtual int32_t docFreq()
Returns the docFreq of the current Term in the enumeration. Initially invalid, valid after next() cal...
FieldInfosPtr fieldInfos
Definition: SegmentTermEnum.h:35
virtual void close()
Closes the enumeration to further activity, freeing resources.
boost::shared_ptr< FieldInfos > FieldInfosPtr
Definition: LuceneTypes.h:127
int32_t skipInterval
Definition: SegmentTermEnum.h:41

clucene.sourceforge.net