Class NumericRangeQuery
LUCENENET specific class to provide access to static factory metods of NumericRangeQuery<T>
without referring to its genereic closing type.
Inheritance
NumericRangeQuery
Assembly: Lucene.Net.dll
Syntax
public static class NumericRangeQuery
Methods
NewDoubleRange(string, int, double?, double?, bool, bool)
Factory that creates a NumericRangeQuery<T>, 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
.
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 NumericRangeQuery<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 NumericRangeQuery<T>, 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 NumericRangeQuery<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 NumericRangeQuery<T>, that queries 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 NumericRangeQuery<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 NumericRangeQuery<T>, 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 NumericRangeQuery<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 NumericRangeQuery<T>, that queries 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 NumericRangeQuery<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 NumericRangeQuery<T>, 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 NumericRangeQuery<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 NumericRangeQuery<T>, that queries 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 NumericRangeQuery<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 NumericRangeQuery<T>, 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 NumericRangeQuery<float> NewSingleRange(string field, float? min, float? max, bool minInclusive, bool maxInclusive)
Parameters
Returns