Package org.apache.lucene.facet.range
Class LongRange
java.lang.Object
org.apache.lucene.facet.range.Range
org.apache.lucene.facet.range.LongRange
Represents a range over long values.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionfinal long
Maximum (inclusive).final long
Minimum (inclusive). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(long value) True if this range accepts the provided value.boolean
getQuery
(Query fastMatchQuery, MultiLongValuesSource valuesSource) Create a Query that matches documents in this rangegetQuery
(Query fastMatchQuery, LongValuesSource valueSource) Create a Query that matches documents in this rangeint
hashCode()
toString()
Methods inherited from class org.apache.lucene.facet.range.Range
failNoMatch
-
Field Details
-
min
public final long minMinimum (inclusive). -
max
public final long maxMaximum (inclusive).
-
-
Constructor Details
-
LongRange
Create a LongRange.
-
-
Method Details
-
accept
public boolean accept(long value) True if this range accepts the provided value. -
toString
-
equals
-
hashCode
public int hashCode() -
getQuery
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
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 filtervaluesSource
- the source of values for the range check
-