public final class DocValuesRangeQuery extends Query
PointRangeQuery.
NOTE: be very careful using this query: it is
typically much slower than using TermsQuery,
but in certain specialized cases may be faster.
| Modifier and Type | Method and Description |
|---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(Object other)
Override and implement query instance equivalence properly in a subclass.
|
String |
getField() |
Object |
getLowerVal() |
Object |
getUpperVal() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
boolean |
isIncludeLower() |
boolean |
isIncludeUpper() |
static Query |
newBytesRefRange(String field,
BytesRef lowerVal,
BytesRef upperVal,
boolean includeLower,
boolean includeUpper)
Create a new numeric range query on a numeric doc-values field.
|
static Query |
newLongRange(String field,
Long lowerVal,
Long upperVal,
boolean includeLower,
boolean includeUpper)
Create a new numeric range query on a numeric doc-values field.
|
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
classHash, sameClassAs, toStringpublic static Query newLongRange(String field, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)
DocValuesType.NUMERIC or
DocValuesType.SORTED_NUMERIC doc values.public static Query newBytesRefRange(String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)
DocValuesType.SORTED or
DocValuesType.SORTED_SET doc values.public boolean equals(Object other)
QueryQueryCache works properly.
Typically a query will be equal to another only if it's an instance of
the same class and its document-filtering properties are identical that other
instance. Utility methods are provided for certain repetitive code.equals in class QueryQuery.sameClassAs(Object),
Query.classHash()public int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)public String getField()
public Object getLowerVal()
public Object getUpperVal()
public boolean isIncludeLower()
public boolean isIncludeUpper()
public String toString(String field)
Queryfield assumed to be the
default field and omitted.public Query rewrite(IndexReader reader) throws IOException
Queryrewrite in class QueryIOExceptionpublic Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException
QueryOnly implemented by primitive queries, which re-write to themselves.
createWeight in class QueryneedsScores - True if document scores (Scorer.score()) or match
frequencies (Scorer.freq()) are needed.IOExceptionCopyright © 2000–2017 The Apache Software Foundation. All rights reserved.