Package org.apache.lucene.facet.range
Class LongRange
- java.lang.Object
-
- org.apache.lucene.facet.range.Range
-
- org.apache.lucene.facet.range.LongRange
-
public final class LongRange extends Range
Represents a range over long values.
-
-
Field Summary
Fields Modifier and Type Field Description long
max
Maximum.boolean
maxInclusive
True if the maximum value is inclusive.long
min
Minimum.boolean
minInclusive
True if the minimum value is inclusive.
-
Constructor Summary
Constructors Constructor Description LongRange(java.lang.String label, long minIn, boolean minInclusive, long maxIn, boolean maxInclusive)
Create a LongRange.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(long value)
True if this range accepts the provided value.Filter
getFilter(Filter fastMatchFilter, ValueSource valueSource)
Returns a newFilter
accepting only documents in this range.java.lang.String
toString()
-
-
-
Method Detail
-
accept
public boolean accept(long value)
True if this range accepts the provided value.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getFilter
public Filter getFilter(Filter fastMatchFilter, ValueSource valueSource)
Description copied from class:Range
Returns a newFilter
accepting only documents in this range. This filter is not general-purpose; you should either use it withDrillSideways
by adding it toDrillDownQuery.add(java.lang.String, java.lang.String...)
, or pass it toFilteredQuery
using itsFilteredQuery.QUERY_FIRST_FILTER_STRATEGY
. If theValueSource
is 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.
-
-