java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.document.SpatialQuery
org.apache.lucene.document.LatLonShapeQuery
Finds all previously indexed geo shapes that comply the given
ShapeField.QueryRelation
with the
specified array of LatLonGeometry
.
The field must be indexed using LatLonShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.Polygon)
added per document.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.document.SpatialQuery
SpatialQuery.EncodedRectangle, SpatialQuery.SpatialVisitor
-
Field Summary
Fields inherited from class org.apache.lucene.document.SpatialQuery
field, geometries, queryComponent2D, queryRelation
-
Constructor Summary
ConstructorsConstructorDescriptionLatLonShapeQuery
(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries) Creates a query that matches all indexed shapes to the provided array ofLatLonGeometry
-
Method Summary
Modifier and TypeMethodDescriptionprotected Component2D
createComponent2D
(Geometry... geometries) protected SpatialQuery.SpatialVisitor
returns the spatial visitor to be used for this query.(package private) static SpatialQuery.SpatialVisitor
getSpatialVisitor
(Component2D component2D) private static LatLonGeometry[]
validateGeometries
(ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries) Methods inherited from class org.apache.lucene.document.SpatialQuery
createWeight, equals, equalsTo, getField, getQueryRelation, getScorerSupplier, hashCode, queryIsCacheable, toString, transposeRelation, visit
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
Constructor Details
-
LatLonShapeQuery
LatLonShapeQuery(String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries) Creates a query that matches all indexed shapes to the provided array ofLatLonGeometry
-
-
Method Details
-
validateGeometries
private static LatLonGeometry[] validateGeometries(ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries) -
createComponent2D
- Specified by:
createComponent2D
in classSpatialQuery
-
getSpatialVisitor
-
getSpatialVisitor
Description copied from class:SpatialQuery
returns the spatial visitor to be used for this query. Called before generating the queryWeight
- Specified by:
getSpatialVisitor
in classSpatialQuery
-