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 | Field and Description |
|---|---|
private java.lang.String |
field |
private boolean |
includeLower |
private boolean |
includeUpper |
private java.lang.Object |
lowerVal |
private java.lang.Object |
upperVal |
| Modifier | Constructor and Description |
|---|---|
private |
DocValuesRangeQuery(java.lang.String field,
java.lang.Object lowerVal,
java.lang.Object upperVal,
boolean includeLower,
boolean includeUpper) |
| Modifier and Type | Method and Description |
|---|---|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
private static BytesRef |
deepCopyOf(BytesRef b) |
boolean |
equals(java.lang.Object other)
Override and implement query instance equivalence properly in a subclass.
|
private boolean |
equalsTo(DocValuesRangeQuery other) |
java.lang.String |
getField() |
java.lang.Object |
getLowerVal() |
java.lang.Object |
getUpperVal() |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
boolean |
isIncludeLower() |
boolean |
isIncludeUpper() |
static Query |
newBytesRefRange(java.lang.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(java.lang.String field,
java.lang.Long lowerVal,
java.lang.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.
|
java.lang.String |
toString(java.lang.String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
classHash, sameClassAs, toStringprivate final java.lang.String field
private final java.lang.Object lowerVal
private final java.lang.Object upperVal
private final boolean includeLower
private final boolean includeUpper
private DocValuesRangeQuery(java.lang.String field,
java.lang.Object lowerVal,
java.lang.Object upperVal,
boolean includeLower,
boolean includeUpper)
public static Query newLongRange(java.lang.String field, java.lang.Long lowerVal, java.lang.Long upperVal, boolean includeLower, boolean includeUpper)
DocValuesType.NUMERIC or
DocValuesType.SORTED_NUMERIC doc values.public static Query newBytesRefRange(java.lang.String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)
DocValuesType.SORTED or
DocValuesType.SORTED_SET doc values.public boolean equals(java.lang.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()private boolean equalsTo(DocValuesRangeQuery other)
public int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)public java.lang.String getField()
public java.lang.Object getLowerVal()
public java.lang.Object getUpperVal()
public boolean isIncludeLower()
public boolean isIncludeUpper()
public java.lang.String toString(java.lang.String field)
Queryfield assumed to be the
default field and omitted.public Query rewrite(IndexReader reader) throws java.io.IOException
Querypublic Weight createWeight(IndexSearcher searcher, boolean needsScores) throws java.io.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.java.io.IOException