Method NewDoubleRange
NewDoubleRange(String, Int32, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
Factory that creates a NumericRangeQuery<T>, that queries a
range using the given Lucene.Net.Search.NumericRangeQuery`1.precisionStep.
You can have half-open ranges (which are in fact </<= or >/>= queries)
by setting the min or max value to null
.
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 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<T>, that queries a
range using the default Lucene.Net.Search.NumericRangeQuery`1.precisionStep 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
.
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 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