public final class LongRange extends Range
Modifier and Type | Field and Description |
---|---|
long |
max
Maximum (inclusive).
|
long |
min
Minimum (inclusive).
|
Constructor and Description |
---|
LongRange(String label,
long minIn,
boolean minInclusive,
long maxIn,
boolean maxInclusive)
Create a LongRange.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(long value)
True if this range accepts the provided value.
|
Query |
getQuery(Query fastMatchQuery,
ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
String |
toString() |
failNoMatch, getQuery
public final long min
public final long max
public LongRange(String label, long minIn, boolean minInclusive, long maxIn, boolean maxInclusive)
public boolean accept(long value)
public Query getQuery(Query fastMatchQuery, ValueSource valueSource)
Range
Query
accepting only documents
in this range. This query might not be very efficient
when run on its own since it is optimized towards
random-access, so it is best used either with
DrillDownQuery
or when intersected with another query that can lead the
iteration. If the ValueSource
is static, e.g. an
indexed numeric field, then it may be more efficient to use
PointRangeQuery
. The provided fastMatchQuery,
if non-null, will first be consulted, and only if
that is set for each document will the range then be
checked.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.