Method NewDoubleRange
NewDoubleRange(String, Int32, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
Factory that creates a NumericRangeQuery
, that queries 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
. By setting inclusive to false, it will
match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
Declaration
public static NumericRangeQuery<double> NewDoubleRange(String field, int precisionStep, double? min, double? max, bool minInclusive, bool maxInclusive)
Parameters
Type |
Name |
Description |
System.String |
field |
|
System.Int32 |
precisionStep |
|
System.Nullable<System.Double> |
min |
|
System.Nullable<System.Double> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
NewDoubleRange(String, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
Factory that creates a NumericRangeQuery
, that queries a double
range using the default precisionStep
Lucene.Net.Util.NumericUtils.PRECISION_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.
Declaration
public static NumericRangeQuery<double> NewDoubleRange(String field, double? min, double? max, bool minInclusive, bool maxInclusive)
Parameters
Type |
Name |
Description |
System.String |
field |
|
System.Nullable<System.Double> |
min |
|
System.Nullable<System.Double> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns