abstract class LatLonPointBoxQuery extends Query
PointRangeQuery
. It is fast for actual range queries!Modifier and Type | Field and Description |
---|---|
(package private) int |
bytesPerDim |
(package private) java.lang.String |
field |
(package private) byte[] |
lowerPoint |
(package private) int |
numDims |
(package private) byte[] |
upperPoint |
Modifier | Constructor and Description |
---|---|
protected |
LatLonPointBoxQuery(java.lang.String field,
byte[] lowerPoint,
byte[] upperPoint,
int numDims)
Expert: create a multidimensional range query for point values.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkArgs(java.lang.String field,
java.lang.Object lowerPoint,
java.lang.Object upperPoint)
Check preconditions for all factory methods
|
Weight |
createWeight(IndexSearcher searcher,
boolean needsScores)
Expert: Constructs an appropriate Weight implementation for this query.
|
boolean |
equals(java.lang.Object other)
Override and implement query instance equivalence properly in a subclass.
|
private boolean |
equalsTo(LatLonPointBoxQuery other) |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
protected abstract java.lang.String |
toString(int dimension,
byte[] value)
Returns a string of a single value in a human-readable format for debugging.
|
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, rewrite, sameClassAs, toString
final java.lang.String field
final int numDims
final int bytesPerDim
final byte[] lowerPoint
final byte[] upperPoint
protected LatLonPointBoxQuery(java.lang.String field, byte[] lowerPoint, byte[] upperPoint, int numDims)
field
- field name. must not be null
.lowerPoint
- lower portion of the range (inclusive).upperPoint
- upper portion of the range (inclusive).numDims
- number of dimensions.java.lang.IllegalArgumentException
- if field
is null, or if lowerValue.length != upperValue.length
public static void checkArgs(java.lang.String field, java.lang.Object lowerPoint, java.lang.Object upperPoint)
java.lang.IllegalArgumentException
- if field
, lowerPoint
or upperPoint
are null.public final Weight createWeight(IndexSearcher searcher, boolean needsScores) throws java.io.IOException
Query
Only implemented by primitive queries, which re-write to themselves.
createWeight
in class Query
needsScores
- True if document scores (Scorer.score()
) or match
frequencies (Scorer.freq()
) are needed.java.io.IOException
public final int hashCode()
Query
QueryCache
works properly.hashCode
in class Query
Query.equals(Object)
public final boolean equals(java.lang.Object other)
Query
QueryCache
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 Query
Query.sameClassAs(Object)
,
Query.classHash()
private boolean equalsTo(LatLonPointBoxQuery other)
public final java.lang.String toString(java.lang.String field)
Query
field
assumed to be the
default field and omitted.protected abstract java.lang.String toString(int dimension, byte[] value)
Query.toString()
.dimension
- dimension of the particular valuevalue
- single value, never null