Class DoubleRange
Represents a range over double values.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Facet.Range
Assembly: Lucene.Net.Facet.dll
Syntax
public sealed class DoubleRange : Range
Constructors
DoubleRange(string, double, bool, double, bool)
Create a DoubleRange.
Declaration
public DoubleRange(string label, double minIn, bool minInclusive, double maxIn, bool maxInclusive)
Parameters
Type | Name | Description |
---|---|---|
string | label | |
double | minIn | |
bool | minInclusive | |
double | maxIn | |
bool | maxInclusive |
Properties
Max
Maximum.
Declaration
public double Max { get; }
Property Value
Type | Description |
---|---|
double |
MaxInclusive
True if the maximum value is inclusive.
Declaration
public bool MaxInclusive { get; }
Property Value
Type | Description |
---|---|
bool |
Min
Minimum.
Declaration
public double Min { get; }
Property Value
Type | Description |
---|---|
double |
MinInclusive
True if the minimum value is inclusive.
Declaration
public bool MinInclusive { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Accept(double)
True if this range accepts the provided value.
Declaration
public bool Accept(double value)
Parameters
Type | Name | Description |
---|---|---|
double | value |
Returns
Type | Description |
---|---|
bool |
GetFilter(Filter, ValueSource)
Returns a new Lucene.Net.Search.Filter accepting only documents
in this range. This filter is not general-purpose;
you should either use it with DrillSideways by
adding it to Add(string, Filter), or pass it to
Lucene.Net.Search.FilteredQuery using its
Lucene.Net.Search.FilteredQuery.QUERY_FIRST_FILTER_STRATEGY.
If the Lucene.Net.Queries.Function.ValueSource is static, e.g. an indexed numeric
field, then it may be more efficient to use
Lucene.Net.Search.NumericRangeFilter. The provided fastMatchFilter
,
if non-null, will first be consulted, and only if
that is set for each document will the range then be
checked.
Declaration
public override Filter GetFilter(Filter fastMatchFilter, ValueSource valueSource)
Parameters
Type | Name | Description |
---|---|---|
Filter | fastMatchFilter | |
ValueSource | valueSource |
Returns
Type | Description |
---|---|
Filter |
Overrides
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |