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

Loading...
Searching...
No Matches
NumericRangeFilter.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 NUMERICRANGEFILTER_H
8#define NUMERICRANGEFILTER_H
9
10#include "MultiTermQueryWrapperFilter.h"
11
12 namespace Lucene {
13
24 class LPPAPI NumericRangeFilter : public MultiTermQueryWrapperFilter {
25 public:
26 NumericRangeFilter(const NumericRangeQueryPtr& query);
27 virtual ~NumericRangeFilter();
28
29 LUCENE_CLASS(NumericRangeFilter);
30
31 public:
33 static NumericRangeFilterPtr newLongRange(const String& field, int32_t precisionStep, int64_t min, int64_t max, bool minInclusive, bool maxInclusive);
34
37 static NumericRangeFilterPtr newLongRange(const String& field, int64_t min, int64_t max, bool minInclusive, bool maxInclusive);
38
40 static NumericRangeFilterPtr newIntRange(const String& field, int32_t precisionStep, int32_t min, int32_t max, bool minInclusive, bool maxInclusive);
41
44 static NumericRangeFilterPtr newIntRange(const String& field, int32_t min, int32_t max, bool minInclusive, bool maxInclusive);
45
47 static NumericRangeFilterPtr newDoubleRange(const String& field, int32_t precisionStep, double min, double max, bool minInclusive, bool maxInclusive);
48
51 static NumericRangeFilterPtr newDoubleRange(const String& field, double min, double max, bool minInclusive, bool maxInclusive);
52
57 static NumericRangeFilterPtr newNumericRange(const String& field, int32_t precisionStep, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive);
58
63 static NumericRangeFilterPtr newNumericRange(const String& field, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive);
64
66 String getField();
67
69 bool includesMin();
70
72 bool includesMax();
73
75 NumericValue getMin();
76
78 NumericValue getMax();
79};
80
81}
82
83#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::MultiTermQueryWrapperFilter::query
MultiTermQueryPtr query
Definition MultiTermQueryWrapperFilter.h:33
Lucene::NumericRangeFilter::newNumericRange
static NumericRangeFilterPtr newNumericRange(const String &field, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a int, long or double range range using the d...
Lucene::NumericRangeFilter::getField
String getField()
Returns the field name for this filter.
Lucene::NumericRangeFilter::getMax
NumericValue getMax()
Returns the upper value of this range filter.
Lucene::NumericRangeFilter::includesMax
bool includesMax()
Returns true if the upper endpoint is inclusive.
Lucene::NumericRangeFilter::newLongRange
static NumericRangeFilterPtr newLongRange(const String &field, int64_t min, int64_t max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a long range using the default precisionStep ...
Lucene::NumericRangeFilter::newIntRange
static NumericRangeFilterPtr newIntRange(const String &field, int32_t min, int32_t max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a int range using the default precisionStep N...
Lucene::NumericRangeFilter::getMin
NumericValue getMin()
Returns the lower value of this range filter.
Lucene::NumericRangeFilter::NumericRangeFilter
NumericRangeFilter(const NumericRangeQueryPtr &query)
Lucene::NumericRangeFilter::includesMin
bool includesMin()
Returns true if the lower endpoint is inclusive.
Lucene::NumericRangeFilter::newLongRange
static NumericRangeFilterPtr newLongRange(const String &field, int32_t precisionStep, int64_t min, int64_t max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a long range using the given precisionStep.
Lucene::NumericRangeFilter::newIntRange
static NumericRangeFilterPtr newIntRange(const String &field, int32_t precisionStep, int32_t min, int32_t max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a int range using the given precisionStep.
Lucene::NumericRangeFilter::newDoubleRange
static NumericRangeFilterPtr newDoubleRange(const String &field, int32_t precisionStep, double min, double max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a double range using the given precisionStep.
Lucene::NumericRangeFilter::~NumericRangeFilter
virtual ~NumericRangeFilter()
Lucene::NumericRangeFilter::newNumericRange
static NumericRangeFilterPtr newNumericRange(const String &field, int32_t precisionStep, NumericValue min, NumericValue max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a int, long or double range using the given p...
Lucene::NumericRangeFilter::newDoubleRange
static NumericRangeFilterPtr newDoubleRange(const String &field, double min, double max, bool minInclusive, bool maxInclusive)
Factory that creates a NumericRangeFilter, that filters a double range using the default precisionSte...
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::NumericRangeFilterPtr
boost::shared_ptr< NumericRangeFilter > NumericRangeFilterPtr
Definition LuceneTypes.h:393
Lucene::NumericRangeQueryPtr
boost::shared_ptr< NumericRangeQuery > NumericRangeQueryPtr
Definition LuceneTypes.h:394

clucene.sourceforge.net