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 longmaxMaximum.booleanmaxInclusiveTrue if the maximum value is inclusive.longminMinimum.booleanminInclusiveTrue 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 booleanaccept(long value)True if this range accepts the provided value.FiltergetFilter(Filter fastMatchFilter, ValueSource valueSource)Returns a newFilteraccepting only documents in this range.java.lang.StringtoString()
-
-
-
Method Detail
-
accept
public boolean accept(long value)
True if this range accepts the provided value.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFilter
public Filter getFilter(Filter fastMatchFilter, ValueSource valueSource)
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.
-
-