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


Loading...
Searching...
No Matches
TermRangeFilter.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 TERMRANGEFILTER_H
8#define TERMRANGEFILTER_H
9
11
12namespace Lucene {
13
23public:
33 TermRangeFilter(const String& fieldName, StringValue lowerTerm, StringValue upperTerm, bool includeLower,
34 bool includeUpper, CollatorPtr collator = CollatorPtr());
35
37
39
40public:
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
58
61
64};
65
66}
67
68#endif
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
A wrapper for MultiTermQuery, that exposes its functionality as a Filter.
Definition MultiTermQueryWrapperFilter.h:22
A Filter that restricts search results to a range of term values in a given field.
Definition TermRangeFilter.h:22
String getUpperTerm()
Returns the upper value of this range filter.
bool includesLower()
Returns true if the lower endpoint is inclusive.
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...
String getLowerTerm()
Returns the lower value of this range filter.
static TermRangeFilterPtr Less(const String &fieldName, StringValue upperTerm)
Constructs a filter for field fieldName matching less than or equal to upperTerm.
CollatorPtr getCollator()
Returns the collator used to determine range inclusion, if any.
String getField()
Returns the field name for this filter.
static TermRangeFilterPtr More(const String &fieldName, StringValue lowerTerm)
Constructs a filter for field fieldName matching greater than or equal to lowerTerm.
bool includesUpper()
Returns true if the upper endpoint is inclusive.
Definition AbstractAllTermDocs.h:12
boost::shared_ptr< Collator > CollatorPtr
Definition LuceneTypes.h:525
boost::shared_ptr< TermRangeFilter > TermRangeFilterPtr
Definition LuceneTypes.h:464

clucene.sourceforge.net