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


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

clucene.sourceforge.net