public abstract class Range extends Object
Modifier and Type | Field and Description |
---|---|
String |
label
Label that identifies this range.
|
Modifier | Constructor and Description |
---|---|
protected |
Range(String label)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
failNoMatch()
Invoke this for a useless range.
|
abstract Query |
getQuery(Query fastMatchQuery,
ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
Query |
getQuery(ValueSource valueSource)
Returns a new
Query accepting only documents
in this range. |
public final String label
protected Range(String label)
public abstract Query getQuery(Query fastMatchQuery, ValueSource valueSource)
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
NumericRangeQuery
. 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.public Query getQuery(ValueSource valueSource)
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 NumericRangeQuery
.protected void failNoMatch()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.