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

FilteredTermEnum.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 FILTEREDTERMENUM_H
8 #define FILTEREDTERMENUM_H
9
10 #include "TermEnum.h"
11
12 namespace Lucene {
13
18 class LPPAPI FilteredTermEnum : public TermEnum {
19 public:
20 virtual ~FilteredTermEnum();
21 LUCENE_CLASS(FilteredTermEnum);
22
23 protected:
25 TermPtr currentTerm;
26
28 TermEnumPtr actualEnum;
29
30 public:
32 virtual double difference() = 0;
33
36 virtual int32_t docFreq();
37
39 virtual bool next();
40
43 virtual TermPtr term();
44
46 virtual void close();
47
48 protected:
50 virtual bool termCompare(const TermPtr& term) = 0;
51
53 virtual bool endEnum() = 0;
54
57 virtual void setEnum(const TermEnumPtr& actualEnum);
58 };
59
60 }
61
62 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
TermEnum.h
Lucene::FilteredTermEnum
Abstract class for enumerating a subset of all terms.
Definition: FilteredTermEnum.h:18
Lucene::FilteredTermEnum::next
virtual bool next()
Increments the enumeration to the next element. True if one exists.
Lucene::FilteredTermEnum::currentTerm
TermPtr currentTerm
The current term.
Definition: FilteredTermEnum.h:21
Lucene::FilteredTermEnum::endEnum
virtual bool endEnum()=0
Indicates the end of the enumeration has been reached.
Lucene::FilteredTermEnum::term
virtual TermPtr term()
Returns the current Term in the enumeration. Returns null if no Term matches or all terms have been e...
Lucene::FilteredTermEnum::close
virtual void close()
Closes the enumeration to further activity, freeing resources.
Lucene::FilteredTermEnum::actualEnum
TermEnumPtr actualEnum
The delegate enum - to set this member use setEnum.
Definition: FilteredTermEnum.h:28
Lucene::FilteredTermEnum::~FilteredTermEnum
virtual ~FilteredTermEnum()
Lucene::FilteredTermEnum::docFreq
virtual int32_t docFreq()
Returns the docFreq of the current Term in the enumeration. Returns -1 if no Term matches or all term...
Lucene::FilteredTermEnum::setEnum
virtual void setEnum(const TermEnumPtr &actualEnum)
Use this method to set the actual TermEnum (eg. in ctor), it will be automatically positioned on the ...
Lucene::FilteredTermEnum::termCompare
virtual bool termCompare(const TermPtr &term)=0
Equality compare on the term.
Lucene::FilteredTermEnum::difference
virtual double difference()=0
Equality measure on the term.
Lucene::TermEnum
Abstract class for enumerating terms.
Definition: TermEnum.h:18
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
Lucene::TermEnumPtr
boost::shared_ptr< TermEnum > TermEnumPtr
Definition: LuceneTypes.h:235

clucene.sourceforge.net