Class NumericRangeFilter<T>
A Filter that only accepts numeric values within a specified range. To use this, you must first index the numeric values using NumericField (expert: NumericTokenStream ).
You create a new NumericRangeFilter with the static factory methods, eg:
Filter f = NumericRangeFilter.newFloatRange("weight",
new Float(0.3f), new Float(0.10f),
true, true);
accepts all documents whose float valued "weight" field ranges from 0.3 to 0.10, inclusive. See NumericRangeQuery<T> for details on how Lucene indexes and searches numeric valued fields.
NOTE: This API is experimental and might change in incompatible ways in the next release.
Inheritance
System.Object
NumericRangeFilter<T>
Inherited Members
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public sealed class NumericRangeFilter<T> : MultiTermQueryWrapperFilter<NumericRangeQuery<T>> where T : struct, IComparable<T>
Type Parameters
Name | Description |
---|---|
T |
Properties
Name | Description |
---|---|
Field | Returns the field name for this filter |
IncludesMax | Returns |
IncludesMin | Returns |
Max | Returns the upper value of this range filter |
Min | Returns the lower value of this range filter |