Class NumericRangeFilter
LUCENENET specific static class to provide access to static methods without referring to the
NumericRangeFilter<T>'s generic closing type.
Inheritance
NumericRangeFilter
Assembly: Lucene.Net.dll
Syntax
public static class NumericRangeFilter
Methods
NewDoubleRange(string, int, double?, double?, bool, bool)
Factory that creates a NumericRangeFilter, that filters a double
range using the given PrecisionStep.
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
.
NaN will never match a half-open range, to hit NaN
use a query
with min == max == System.Double.NaN
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
Declaration
public static NumericRangeFilter<double> NewDoubleRange(string field, int precisionStep, double? min, double? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewDoubleRange(string, double?, double?, bool, bool)
Factory that creates a NumericRangeFilter, that queries a double
range using the default PrecisionStepPRECISION_STEP_DEFAULT (4).
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
.
NaN will never match a half-open range, to hit NaN
use a query
with min == max == System.Double.NaN
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
Declaration
public static NumericRangeFilter<double> NewDoubleRange(string field, double? min, double? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewInt32Range(string, int, int?, int?, bool, bool)
Factory that creates a NumericRangeFilter, that filters a int
range using the given PrecisionStep.
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newIntRange() in Lucene
Declaration
public static NumericRangeFilter<int> NewInt32Range(string field, int precisionStep, int? min, int? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewInt32Range(string, int?, int?, bool, bool)
Factory that creates a NumericRangeFilter, that queries a int
range using the default PrecisionStepPRECISION_STEP_DEFAULT (4).
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newIntRange() in Lucene
Declaration
public static NumericRangeFilter<int> NewInt32Range(string field, int? min, int? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewInt64Range(string, int, long?, long?, bool, bool)
Factory that creates a NumericRangeFilter, that filters a long
range using the given PrecisionStep.
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newLongRange() in Lucene
Declaration
public static NumericRangeFilter<long> NewInt64Range(string field, int precisionStep, long? min, long? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewInt64Range(string, long?, long?, bool, bool)
Factory that creates a NumericRangeFilter, that queries a long
range using the default PrecisionStepPRECISION_STEP_DEFAULT (4).
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newLongRange() in Lucene
Declaration
public static NumericRangeFilter<long> NewInt64Range(string field, long? min, long? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewSingleRange(string, int, float?, float?, bool, bool)
Factory that creates a NumericRangeFilter, that filters a float
range using the given PrecisionStep.
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
.
NaN will never match a half-open range, to hit NaN
use a query
with min == max == System.Single.NaN
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newFloatRange() in Lucene
Declaration
public static NumericRangeFilter<float> NewSingleRange(string field, int precisionStep, float? min, float? max, bool minInclusive, bool maxInclusive)
Parameters
Returns
NewSingleRange(string, float?, float?, bool, bool)
Factory that creates a NumericRangeFilter, that queries a float
range using the default PrecisionStepPRECISION_STEP_DEFAULT (4).
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
.
NaN will never match a half-open range, to hit NaN
use a query
with min == max == System.Single.NaN
. By setting inclusive to false
, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
NOTE: This was newFloatRange() in Lucene
Declaration
public static NumericRangeFilter<float> NewSingleRange(string field, float? min, float? max, bool minInclusive, bool maxInclusive)
Parameters
Returns