Class FieldCacheRangeFilter
A range filter built on top of a cached single term field (in FieldCache).
FieldCacheRangeFilter builds a single cache for the field the first time it is used.
Each subsequent FieldCacheRangeFilter on the same field then reuses this cache,
even if the range itself changes.
This means that FieldCacheRangeFilter is much faster (sometimes more than 100x as fast)
as building a TermRangeFilter if using a NewStringRange(String, String, String, Boolean, Boolean). However, if the range never changes it
is slower (around 2x as slow) than building a CachingWrapperFilter on top of a single TermRangeFilter.
For numeric data types, this filter may be significantly faster than NumericRangeFilter<T>.
Furthermore, it does not need the numeric values encoded by NumericField. But
it has the problem that it only works with exact one value/document (see below).
As with all FieldCache based functionality, FieldCacheRangeFilter is only valid for
fields which exact one term for each document (except for NewStringRange(String, String, String, Boolean, Boolean)
where 0 terms are also allowed). Due to a restriction of FieldCache, for numeric ranges
all terms that do not have a numeric value, 0 is assumed.
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 FieldCache.
Inheritance
System.Object
FieldCacheRangeFilter
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public static class FieldCacheRangeFilter : object
Methods
Name |
Description |
NewByteRange(String, ByteParser, Nullable<SByte>, Nullable<SByte>, Boolean, Boolean)
|
Creates a numeric range filter using . This works with all
byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewByteRange(String, Nullable<SByte>, Nullable<SByte>, Boolean, Boolean)
|
Creates a numeric range filter using . This works with all
byte fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewDoubleRange(String, DoubleParser, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
double fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewDoubleRange(String, Nullable<Double>, Nullable<Double>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
double fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewFloatRange(String, FloatParser, Nullable<Single>, Nullable<Single>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
float fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewFloatRange(String, Nullable<Single>, Nullable<Single>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
float fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewIntRange(String, IntParser, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
int fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewIntRange(String, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
int fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewLongRange(String, LongParser, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
long fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewLongRange(String, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
long fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewShortRange(String, ShortParser, Nullable<Int16>, Nullable<Int16>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
short fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewShortRange(String, Nullable<Int16>, Nullable<Int16>, Boolean, Boolean)
|
Creates a numeric range query using . This works with all
short fields containing exactly one numeric term in the field. The range can be half-open by setting one
of the values to null .
|
NewStringRange(String, String, String, Boolean, Boolean)
|
Creates a string range filter using . This works with all
fields containing zero or one term in the field. The range can be half-open by setting one
of the values to null .
|