public final class GeoPointInPolygonQuery extends GeoPointInBBoxQuery
GeoPointInBBoxQueryImpl and is implemented using a
three phase approach. First, like GeoPointInBBoxQueryImpl
candidate terms are queried using a numeric range based on the morton codes
of the min and max lat/lon pairs. Terms passing this initial filter are passed
to a secondary filter that verifies whether the decoded lat/lon point falls within
(or on the boundary) of the bounding box query. Finally, the remaining candidate
term is passed to the final point in polygon check.Polygonfield, maxLat, maxLon, minLat, minLon, termEncoding| Constructor and Description |
|---|
GeoPointInPolygonQuery(String field,
double[] polyLats,
double[] polyLons)
Deprecated.
|
GeoPointInPolygonQuery(String field,
GeoPointField.TermEncoding termEncoding,
double[] polyLats,
double[] polyLons)
Deprecated.
|
GeoPointInPolygonQuery(String field,
GeoPointField.TermEncoding termEncoding,
Polygon... polygons)
Constructs a new GeoPolygonQuery that will match encoded
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters. |
GeoPointInPolygonQuery(String field,
Polygon... polygons)
Constructs a new GeoPolygonQuery that will match encoded
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Override and implement query instance equivalence properly in a subclass.
|
Polygon[] |
getPolygons()
API utility method for returning copy of the polygon array
|
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
Query |
rewrite(IndexReader reader)
throw exception if trying to change rewrite method
|
String |
toString(String field)
print out this polygon query
|
getField, getMaxLat, getMaxLon, getMinLat, getMinLonclassHash, createWeight, sameClassAs, toStringpublic GeoPointInPolygonQuery(String field, Polygon... polygons)
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters.@Deprecated public GeoPointInPolygonQuery(String field, double[] polyLats, double[] polyLons)
GeoPointInPolygonQuery(String, Polygon[]).GeoPointField terms
that fall within or on the boundary of the polygon defined by the input parameters.@Deprecated public GeoPointInPolygonQuery(String field, GeoPointField.TermEncoding termEncoding, double[] polyLats, double[] polyLons)
GeoPointInPolygonQuery(String, GeoPointField.TermEncoding, Polygon[]) instead.GeoPointField terms
that fall within or on the boundary of the polygon defined by the input parameters.public GeoPointInPolygonQuery(String field, GeoPointField.TermEncoding termEncoding, Polygon... polygons)
GeoPointField terms
that fall within or on the boundary of the polygons defined by the input parameters.public Query rewrite(IndexReader reader)
rewrite in class GeoPointInBBoxQuerypublic int hashCode()
QueryQueryCache works properly.hashCode in class GeoPointInBBoxQueryQuery.equals(Object)public boolean equals(Object obj)
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 GeoPointInBBoxQueryQuery.sameClassAs(Object),
Query.classHash()public String toString(String field)
toString in class GeoPointInBBoxQuerypublic Polygon[] getPolygons()
Copyright © 2000–2017 The Apache Software Foundation. All rights reserved.