final class LatLonShapeBoundingBoxQuery extends LatLonShapeQuery
The field must be indexed using
LatLonShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.Polygon) added per document.
| Modifier and Type | Field and Description |
|---|---|
(package private) Rectangle2D |
rectangle2D |
field, queryRelation| Constructor and Description |
|---|
LatLonShapeBoundingBoxQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
double minLat,
double maxLat,
double minLon,
double maxLon) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Override and implement query instance equivalence properly in a subclass.
|
protected boolean |
equalsTo(java.lang.Object o) |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
protected boolean |
queryMatches(byte[] t,
int[] scratchTriangle,
LatLonShape.QueryRelation queryRelation)
returns true if the query matches the encoded triangle
|
protected PointValues.Relation |
relateRangeBBoxToQuery(int minXOffset,
int minYOffset,
byte[] minTriangle,
int maxXOffset,
int maxYOffset,
byte[] maxTriangle)
relates an internal node (bounding box of a range of triangles) to the target query
Note: logic is specific to query type
see
LatLonShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.LatLonShape.QueryRelation) and LatLonShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.LatLonShape.QueryRelation) |
java.lang.String |
toString(java.lang.String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
createWeight, getField, getQueryRelation, relateRangeToQuery, visitclassHash, rewrite, sameClassAs, toStringfinal Rectangle2D rectangle2D
public LatLonShapeBoundingBoxQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
double minLat,
double maxLat,
double minLon,
double maxLon)
protected PointValues.Relation relateRangeBBoxToQuery(int minXOffset, int minYOffset, byte[] minTriangle, int maxXOffset, int maxYOffset, byte[] maxTriangle)
LatLonShapeQueryLatLonShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.LatLonShape.QueryRelation) and LatLonShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.LatLonShape.QueryRelation)relateRangeBBoxToQuery in class LatLonShapeQueryprotected boolean queryMatches(byte[] t,
int[] scratchTriangle,
LatLonShape.QueryRelation queryRelation)
queryMatches in class LatLonShapeQuerypublic boolean equals(java.lang.Object o)
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 LatLonShapeQueryQuery.sameClassAs(Object),
Query.classHash()protected boolean equalsTo(java.lang.Object o)
equalsTo in class LatLonShapeQuerypublic int hashCode()
QueryQueryCache works properly.hashCode in class LatLonShapeQueryQuery.equals(Object)