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


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

clucene.sourceforge.net