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


TermRangeTermEnum.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 TERMRANGETERMENUM_H
8 #define TERMRANGETERMENUM_H
9 
10 #include "FilteredTermEnum.h"
11 
12 namespace Lucene {
13 
18 class LPPAPI TermRangeTermEnum : public FilteredTermEnum {
19 public:
34  TermRangeTermEnum(const IndexReaderPtr& reader, const String& field, StringValue lowerTermText, StringValue upperTermText,
35  bool includeLower, bool includeUpper, const CollatorPtr& collator);
36 
37  virtual ~TermRangeTermEnum();
38 
40 
41 protected:
43  bool _endEnum;
44  String field;
45  StringValue upperTermText;
46  StringValue lowerTermText;
49 
50 public:
51  virtual double difference();
52 
53 protected:
54  virtual bool endEnum();
55  virtual bool termCompare(const TermPtr& term);
56 };
57 
58 }
59 
60 #endif
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Abstract class for enumerating a subset of all terms.
Definition: FilteredTermEnum.h:18
Subclass of FilteredTermEnum for enumerating all terms that match the specified range parameters.
Definition: TermRangeTermEnum.h:18
StringValue upperTermText
Definition: TermRangeTermEnum.h:45
bool includeLower
Definition: TermRangeTermEnum.h:47
TermRangeTermEnum(const IndexReaderPtr &reader, const String &field, StringValue lowerTermText, StringValue upperTermText, bool includeLower, bool includeUpper, const CollatorPtr &collator)
Enumerates all terms greater/equal than lowerTerm but less/equal than upperTerm.
bool includeUpper
Definition: TermRangeTermEnum.h:48
CollatorPtr collator
Definition: TermRangeTermEnum.h:39
virtual double difference()
Equality measure on the term.
bool _endEnum
Definition: TermRangeTermEnum.h:43
StringValue lowerTermText
Definition: TermRangeTermEnum.h:46
virtual bool endEnum()
Indicates the end of the enumeration has been reached.
virtual bool termCompare(const TermPtr &term)
Equality compare on the term.
String field
Definition: TermRangeTermEnum.h:44
Definition: AbstractAllTermDocs.h:12
boost::shared_ptr< Collator > CollatorPtr
Definition: LuceneTypes.h:525
boost::shared_ptr< Term > TermPtr
Definition: LuceneTypes.h:233
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157

clucene.sourceforge.net