public class IndexSortSortedNumericDocValuesRangeQuery extends Query
SortedNumericDocValues or NumericDocValues.
fallbackQuery.
This fallback must be an equivalent range query -- it should produce the same documents and give
constant scores. As an example, an IndexSortSortedNumericDocValuesRangeQuery might be
constructed as follows:
String field = "field";
long lowerValue = 0, long upperValue = 10;
Query fallbackQuery = LongPoint.newRangeQuery(field, lowerValue, upperValue);
Query rangeQuery = new IndexSortSortedNumericDocValuesRangeQuery(
field, lowerValue, upperValue, fallbackQuery);
| Constructor and Description |
|---|
IndexSortSortedNumericDocValuesRangeQuery(String field,
long lowerValue,
long upperValue,
Query fallbackQuery)
Creates a new
IndexSortSortedNumericDocValuesRangeQuery. |
| Modifier and Type | Method and Description |
|---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
equals(Object o) |
Query |
getFallbackQuery() |
int |
hashCode() |
Query |
rewrite(IndexReader reader) |
String |
toString(String field) |
void |
visit(QueryVisitor visitor) |
classHash, sameClassAs, toStringpublic IndexSortSortedNumericDocValuesRangeQuery(String field, long lowerValue, long upperValue, Query fallbackQuery)
IndexSortSortedNumericDocValuesRangeQuery.field - The field name.lowerValue - The lower end of the range (inclusive).upperValue - The upper end of the range (exclusive).fallbackQuery - A query to fall back to if the optimization cannot be applied.public Query getFallbackQuery()
public void visit(QueryVisitor visitor)
public Query rewrite(IndexReader reader) throws IOException
rewrite in class QueryIOExceptionpublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight in class QueryIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.