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);
| 构造器和说明 |
|---|
IndexSortSortedNumericDocValuesRangeQuery(String field,
long lowerValue,
long upperValue,
Query fallbackQuery)
Creates a new
IndexSortSortedNumericDocValuesRangeQuery. |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 QueryIOExceptionpublic Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) throws IOException
createWeight 在类中 QueryIOExceptionCopyright © 2022. All rights reserved.