- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.document.SpatialQuery
-
- org.apache.lucene.document.XYShapeQuery
-
final class XYShapeQuery extends SpatialQuery
Finds all previously indexed cartesian shapes that comply the givenShapeField.QueryRelation
with the specified array ofXYGeometry
.The field must be indexed using
XYShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.XYPolygon)
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
Constructors Constructor Description XYShapeQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYGeometry... geometries)
Creates a query that matches all indexed shapes to the provided polygons
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Component2D
createComponent2D(Geometry... geometries)
protected SpatialQuery.SpatialVisitor
getSpatialVisitor()
returns the spatial visitor to be used for this query.(package private) static SpatialQuery.SpatialVisitor
getSpatialVisitor(Component2D component2D)
-
Methods inherited from class org.apache.lucene.document.SpatialQuery
createWeight, equals, equalsTo, getField, getQueryRelation, getScorerSupplier, hashCode, queryIsCacheable, toString, transposeRelation, visit
-
-
-
-
Constructor Detail
-
XYShapeQuery
XYShapeQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, XYGeometry... geometries)
Creates a query that matches all indexed shapes to the provided polygons
-
-
Method Detail
-
createComponent2D
protected Component2D createComponent2D(Geometry... geometries)
- Specified by:
createComponent2D
in classSpatialQuery
-
getSpatialVisitor
static SpatialQuery.SpatialVisitor getSpatialVisitor(Component2D component2D)
-
getSpatialVisitor
protected SpatialQuery.SpatialVisitor 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
-
-