24 namespace Lucene.Net.Search
55 public sealed
class NumericRangeFilter<T> : MultiTermQueryWrapperFilter<NumericRangeQuery<T>>
56 where T : struct, IComparable<T>
67 get {
return query.
Field; }
71 public bool IncludesMin
77 public bool IncludesMax
85 get {
return query.
Min; }
91 get {
return query.
Max; }
95 public static class NumericRangeFilter
103 public static NumericRangeFilter<long> NewLongRange(System.String field,
int precisionStep,
long? min,
long? max,
bool minInclusive,
bool maxInclusive)
105 return new NumericRangeFilter<long>(NumericRangeQuery.NewLongRange(field, precisionStep, min, max, minInclusive, maxInclusive));
114 public static NumericRangeFilter<long> NewLongRange(System.String field,
long? min,
long? max,
bool minInclusive,
bool maxInclusive)
116 return new NumericRangeFilter<long>(NumericRangeQuery.NewLongRange(field, min, max, minInclusive, maxInclusive));
125 public static NumericRangeFilter<int> NewIntRange(System.String field,
int precisionStep,
int? min,
int? max,
bool minInclusive,
bool maxInclusive)
127 return new NumericRangeFilter<int>(NumericRangeQuery.NewIntRange(field, precisionStep, min, max, minInclusive, maxInclusive));
136 public static NumericRangeFilter<int> NewIntRange(System.String field,
int? min,
int? max,
bool minInclusive,
bool maxInclusive)
138 return new NumericRangeFilter<int>(NumericRangeQuery.NewIntRange(field, min, max, minInclusive, maxInclusive));
147 public static NumericRangeFilter<double> NewDoubleRange(System.String field,
int precisionStep,
double? min,
double? max,
bool minInclusive,
bool maxInclusive)
149 return new NumericRangeFilter<double>(NumericRangeQuery.NewDoubleRange(field, precisionStep, min, max, minInclusive, maxInclusive));
158 public static NumericRangeFilter<double> NewDoubleRange(System.String field,
double? min,
double? max,
bool minInclusive,
bool maxInclusive)
160 return new NumericRangeFilter<double>(NumericRangeQuery.NewDoubleRange(field, min, max, minInclusive, maxInclusive));
169 public static NumericRangeFilter<float> NewFloatRange(System.String field,
int precisionStep,
float? min,
float? max,
bool minInclusive,
bool maxInclusive)
171 return new NumericRangeFilter<float>(NumericRangeQuery.NewFloatRange(field, precisionStep, min, max, minInclusive, maxInclusive));
180 public static NumericRangeFilter<float> NewFloatRange(System.String field,
float? min,
float? max,
bool minInclusive,
bool maxInclusive)
182 return new NumericRangeFilter<float>(NumericRangeQuery.NewFloatRange(field, min, max, minInclusive, maxInclusive));