final class LatLonShapePolygonQuery 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 |
|---|---|
private Polygon2D |
poly2D |
(package private) Polygon[] |
polygons |
field, queryRelation| Constructor and Description |
|---|
LatLonShapePolygonQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
Polygon... polygons)
Creates a query that matches all indexed shapes to the provided polygons
|
| Modifier and Type | Method and Description |
|---|---|
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 provided triangle matches the query
|
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, equals, getField, getQueryRelation, relateRangeToQuery, visitclassHash, rewrite, sameClassAs, toStringpublic LatLonShapePolygonQuery(java.lang.String field,
LatLonShape.QueryRelation queryRelation,
Polygon... polygons)
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)
LatLonShapeQueryqueryMatches in class LatLonShapeQuerypublic java.lang.String toString(java.lang.String field)
Queryfield assumed to be the
default field and omitted.protected boolean equalsTo(java.lang.Object o)
equalsTo in class LatLonShapeQuerypublic int hashCode()
QueryQueryCache works properly.hashCode in class LatLonShapeQueryQuery.equals(Object)