Class NumericRangeQuery
LUCENENET specific class to provide access to static factory metods of NumericRangeQuery<T>
without referring to its genereic closing type.
Inheritance
System.Object
NumericRangeQuery
Assembly: Lucene.Net.dll
Syntax
public static class NumericRangeQuery : object
Methods
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
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
|
Improve this Doc
View Source
NewInt32Range(String, Int32, Nullable<Int32>, Nullable<Int32>, 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
. 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
Type |
Name |
Description |
System.String |
field |
|
System.Int32 |
precisionStep |
|
System.Nullable<System.Int32> |
min |
|
System.Nullable<System.Int32> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
|
Improve this Doc
View Source
NewInt32Range(String, Nullable<Int32>, Nullable<Int32>, 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
. 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
Type |
Name |
Description |
System.String |
field |
|
System.Nullable<System.Int32> |
min |
|
System.Nullable<System.Int32> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
|
Improve this Doc
View Source
NewInt64Range(String, Int32, Nullable<Int64>, Nullable<Int64>, 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
. 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
Type |
Name |
Description |
System.String |
field |
|
System.Int32 |
precisionStep |
|
System.Nullable<System.Int64> |
min |
|
System.Nullable<System.Int64> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
|
Improve this Doc
View Source
NewInt64Range(String, Nullable<Int64>, Nullable<Int64>, 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
. 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
Type |
Name |
Description |
System.String |
field |
|
System.Nullable<System.Int64> |
min |
|
System.Nullable<System.Int64> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
|
Improve this Doc
View Source
NewSingleRange(String, Int32, Nullable<Single>, Nullable<Single>, 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.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
Type |
Name |
Description |
System.String |
field |
|
System.Int32 |
precisionStep |
|
System.Nullable<System.Single> |
min |
|
System.Nullable<System.Single> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns
|
Improve this Doc
View Source
NewSingleRange(String, Nullable<Single>, Nullable<Single>, 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.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
Type |
Name |
Description |
System.String |
field |
|
System.Nullable<System.Single> |
min |
|
System.Nullable<System.Single> |
max |
|
System.Boolean |
minInclusive |
|
System.Boolean |
maxInclusive |
|
Returns