java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.document.SpatialQuery
org.apache.lucene.document.LatLonShapeBoundingBoxQuery
Finds all previously indexed geo shapes that intersect the specified bounding box.
The field must be indexed using LatLonShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.Polygon) added per document.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classHolds spatial logic for a bounding box that works in the encoded spaceNested classes/interfaces inherited from class org.apache.lucene.document.SpatialQuery
SpatialQuery.EncodedRectangle, SpatialQuery.SpatialVisitor -
Field Summary
FieldsFields inherited from class org.apache.lucene.document.SpatialQuery
field, geometries, queryComponent2D, queryRelation -
Constructor Summary
ConstructorsConstructorDescriptionLatLonShapeBoundingBoxQuery(String field, ShapeField.QueryRelation queryRelation, Rectangle rectangle) -
Method Summary
Modifier and TypeMethodDescriptionprotected Component2DcreateComponent2D(Geometry... geometries) protected booleanclass specific equals checkprotected SpatialQuery.SpatialVisitorreturns the spatial visitor to be used for this query.inthashCode()Override and implement query hash code properly in a subclass.Prints a query to a string, withfieldassumed to be the default field and omitted.Methods inherited from class org.apache.lucene.document.SpatialQuery
createWeight, equals, getField, getQueryRelation, getScorerSupplier, queryIsCacheable, transposeRelation, visit
-
Field Details
-
rectangle
-
-
Constructor Details
-
LatLonShapeBoundingBoxQuery
LatLonShapeBoundingBoxQuery(String field, ShapeField.QueryRelation queryRelation, Rectangle rectangle)
-
-
Method Details
-
createComponent2D
- Specified by:
createComponent2Din classSpatialQuery
-
getSpatialVisitor
Description copied from class:SpatialQueryreturns the spatial visitor to be used for this query. Called before generating the queryWeight- Specified by:
getSpatialVisitorin classSpatialQuery
-
equalsTo
Description copied from class:SpatialQueryclass specific equals check- Overrides:
equalsToin classSpatialQuery
-
hashCode
public int hashCode()Description copied from class:QueryOverride and implement query hash code properly in a subclass. This is required so thatQueryCacheworks properly.- Overrides:
hashCodein classSpatialQuery- See Also:
-
toString
Description copied from class:QueryPrints a query to a string, withfieldassumed to be the default field and omitted.- Overrides:
toStringin classSpatialQuery
-