Package org.apache.lucene.facet.range
Class DoubleRange
java.lang.Object
org.apache.lucene.facet.range.Range
org.apache.lucene.facet.range.DoubleRange
Represents a range over double values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal doubleMaximum.final booleanTrue if the maximum value is inclusive.final doubleMinimum.final booleanTrue if the minimum value is inclusive. -
Constructor Summary
ConstructorsConstructorDescriptionDoubleRange(String label, double minIn, boolean minInclusive, double maxIn, boolean maxInclusive) Create a DoubleRange. -
Method Summary
-
Field Details
-
min
public final double minMinimum. -
max
public final double maxMaximum. -
minInclusive
public final boolean minInclusiveTrue if the minimum value is inclusive. -
maxInclusive
public final boolean maxInclusiveTrue if the maximum value is inclusive.
-
-
Constructor Details
-
DoubleRange
public DoubleRange(String label, double minIn, boolean minInclusive, double maxIn, boolean maxInclusive) Create a DoubleRange.
-
-
Method Details
-
accept
public boolean accept(double value) True if this range accepts the provided value. -
toString
-
getFilter
Description copied from class:RangeReturns a newFilteraccepting only documents in this range. This filter is not general-purpose; you should either use it withDrillSidewaysby adding it toDrillDownQuery.add(java.lang.String, java.lang.String...), or pass it toFilteredQueryusing itsFilteredQuery.QUERY_FIRST_FILTER_STRATEGY. If theValueSourceis static, e.g. an indexed numeric field, then it may be more efficient to useNumericRangeFilter. 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.
-