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

TermRangeFilter.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 TERMRANGEFILTER_H
8 #define TERMRANGEFILTER_H
9
10 #include "MultiTermQueryWrapperFilter.h"
11
12 namespace Lucene {
13
22 class LPPAPI TermRangeFilter : public MultiTermQueryWrapperFilter {
23 public:
33 TermRangeFilter(const String& fieldName, StringValue lowerTerm, StringValue upperTerm, bool includeLower,
34 bool includeUpper, CollatorPtr collator = CollatorPtr());
35
36 virtual ~TermRangeFilter();
37
38 LUCENE_CLASS(TermRangeFilter);
39
40 public:
42 static TermRangeFilterPtr Less(const String& fieldName, StringValue upperTerm);
43
45 static TermRangeFilterPtr More(const String& fieldName, StringValue lowerTerm);
46
48 String getField();
49
51 String getLowerTerm();
52
54 String getUpperTerm();
55
57 bool includesLower();
58
60 bool includesUpper();
61
63 CollatorPtr getCollator();
64 };
65
66 }
67
68 #endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
MultiTermQueryWrapperFilter.h
Lucene::MultiTermQueryWrapperFilter
A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
Definition: MultiTermQueryWrapperFilter.h:22
Lucene::TermRangeFilter
A Filter that restricts search results to a range of term values in a given field.
Definition: TermRangeFilter.h:22
Lucene::TermRangeFilter::~TermRangeFilter
virtual ~TermRangeFilter()
Lucene::TermRangeFilter::getUpperTerm
String getUpperTerm()
Returns the upper value of this range filter.
Lucene::TermRangeFilter::includesLower
bool includesLower()
Returns true if the lower endpoint is inclusive.
Lucene::TermRangeFilter::TermRangeFilter
TermRangeFilter(const String &fieldName, StringValue lowerTerm, StringValue upperTerm, bool includeLower, bool includeUpper, CollatorPtr collator=CollatorPtr())
Warning: Using this constructor and supplying a non-null value in the collator parameter will cause e...
Lucene::TermRangeFilter::getLowerTerm
String getLowerTerm()
Returns the lower value of this range filter.
Lucene::TermRangeFilter::Less
static TermRangeFilterPtr Less(const String &fieldName, StringValue upperTerm)
Constructs a filter for field fieldName matching less than or equal to upperTerm.
Lucene::TermRangeFilter::getCollator
CollatorPtr getCollator()
Returns the collator used to determine range inclusion, if any.
Lucene::TermRangeFilter::getField
String getField()
Returns the field name for this filter.
Lucene::TermRangeFilter::More
static TermRangeFilterPtr More(const String &fieldName, StringValue lowerTerm)
Constructs a filter for field fieldName matching greater than or equal to lowerTerm.
Lucene::TermRangeFilter::includesUpper
bool includesUpper()
Returns true if the upper endpoint is inclusive.
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::CollatorPtr
boost::shared_ptr< Collator > CollatorPtr
Definition: LuceneTypes.h:525
Lucene::TermRangeFilterPtr
boost::shared_ptr< TermRangeFilter > TermRangeFilterPtr
Definition: LuceneTypes.h:464

clucene.sourceforge.net