Class FieldCacheRangeFilter
A range filter built on top of a cached single term field (in IField
Field
this means that Field
For numeric data types, this filter may be significantly faster than Numeric
As with all IField
Thus it works on dates, prices and other single value fields but will not work on regular text fields. It is preferable to use a NOT_ANALYZED field to ensure that there is only a single term.
This class does not have an constructor, use one of the static factory methods available,
that create a correct instance for different data types supported by IField
Inheritance
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public static class FieldCacheRangeFilter : object
Methods
| Improve this Doc View SourceNewByteRange(String, FieldCache.IByteParser, Nullable<SByte>, Nullable<SByte>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, FieldCache.IByteParser parser, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewByteRange(String, Nullable<SByte>, Nullable<SByte>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<sbyte?> NewByteRange(string field, sbyte? lowerVal, sbyte? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewBytesRefRange(String, BytesRef, BytesRef, Boolean, Boolean)
Creates a Bytesnull
.
Declaration
public static FieldCacheRangeFilter<BytesRef> NewBytesRefRange(string field, BytesRef lowerVal, BytesRef upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Bytes |
lowerVal | |
Bytes |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewDoubleRange(String, FieldCache.IDoubleParser, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, FieldCache.IDoubleParser parser, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewDoubleRange(String, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<double?> NewDoubleRange(string field, double? lowerVal, double? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt16Range(String, FieldCache.IInt16Parser, Nullable<Int16>, Nullable<Int16>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newShortRange() in Lucene
Declaration
public static FieldCacheRangeFilter<short?> NewInt16Range(string field, FieldCache.IInt16Parser parser, short? lowerVal, short? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt16Range(String, Nullable<Int16>, Nullable<Int16>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newShortRange() in Lucene
Declaration
public static FieldCacheRangeFilter<short?> NewInt16Range(string field, short? lowerVal, short? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt32Range(String, FieldCache.IInt32Parser, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newIntRange() in Lucene
Declaration
public static FieldCacheRangeFilter<int?> NewInt32Range(string field, FieldCache.IInt32Parser parser, int? lowerVal, int? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt32Range(String, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newIntRange() in Lucene
Declaration
public static FieldCacheRangeFilter<int?> NewInt32Range(string field, int? lowerVal, int? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt64Range(String, FieldCache.IInt64Parser, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newLongRange() in Lucene
Declaration
public static FieldCacheRangeFilter<long?> NewInt64Range(string field, FieldCache.IInt64Parser parser, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewInt64Range(String, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<long?> NewInt64Range(string field, long? lowerVal, long? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewSingleRange(String, FieldCache.ISingleParser, Nullable<Single>, Nullable<Single>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newFloatRange() in Lucene
Declaration
public static FieldCacheRangeFilter<float?> NewSingleRange(string field, FieldCache.ISingleParser parser, float? lowerVal, float? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
Field |
parser | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewSingleRange(String, Nullable<Single>, Nullable<Single>, Boolean, Boolean)
Creates a numeric range filter using Getnull
.
NOTE: this was newFloatRange() in Lucene
Declaration
public static FieldCacheRangeFilter<float?> NewSingleRange(string field, float? lowerVal, float? upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |
NewStringRange(String, String, String, Boolean, Boolean)
Creates a string range filter using Getnull
.
Declaration
public static FieldCacheRangeFilter<string> NewStringRange(string field, string lowerVal, string upperVal, bool includeLower, bool includeUpper)
Parameters
Type | Name | Description |
---|---|---|
System. |
field | |
System. |
lowerVal | |
System. |
upperVal | |
System. |
includeLower | |
System. |
includeUpper |
Returns
Type | Description |
---|---|
Field |