Package org.apache.lucene.facet.range
Class DoubleRange
- java.lang.Object
-
- org.apache.lucene.facet.range.Range
-
- org.apache.lucene.facet.range.DoubleRange
-
public final class DoubleRange extends Range
Represents a range over double values.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description DoubleRange(String label, double minIn, boolean minInclusive, double maxIn, boolean maxInclusive)
Create a DoubleRange.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(double value)
True if this range accepts the provided value.boolean
equals(Object _that)
Query
getQuery(Query fastMatchQuery, MultiDoubleValuesSource valueSource)
Create a Query that matches documents in this rangeQuery
getQuery(Query fastMatchQuery, DoubleValuesSource valueSource)
Create a Query that matches documents in this rangeint
hashCode()
String
toString()
-
Methods inherited from class org.apache.lucene.facet.range.Range
failNoMatch
-
-
-
-
Constructor Detail
-
DoubleRange
public DoubleRange(String label, double minIn, boolean minInclusive, double maxIn, boolean maxInclusive)
Create a DoubleRange.
-
-
Method Detail
-
accept
public boolean accept(double value)
True if this range accepts the provided value.
-
getQuery
public Query getQuery(Query fastMatchQuery, DoubleValuesSource valueSource)
Create a Query that matches documents in this rangeThe query will check all documents that match the provided match query, or every document in the index if the match query is null.
If the value source is static, eg an indexed numeric field, it may be faster to use
PointRangeQuery
- Parameters:
fastMatchQuery
- a query to use as a filtervalueSource
- the source of values for the range check
-
getQuery
public Query getQuery(Query fastMatchQuery, MultiDoubleValuesSource valueSource)
Create a Query that matches documents in this rangeThe query will check all documents that match the provided match query, or every document in the index if the match query is null.
If the value source is static, eg an indexed numeric field, it may be faster to use
PointRangeQuery
- Parameters:
fastMatchQuery
- a query to use as a filtervalueSource
- the source of values for the range check
-
-