Package org.apache.lucene.document
Class LatLonShapeBoundingBoxQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.document.ShapeQuery
-
- org.apache.lucene.document.LatLonShapeBoundingBoxQuery
-
final class LatLonShapeBoundingBoxQuery extends ShapeQuery
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 Classes Modifier and Type Class Description private static classLatLonShapeBoundingBoxQuery.EncodedRectangleHolds spatial logic for a bounding box that works in the encoded space
-
Field Summary
Fields Modifier and Type Field Description private LatLonShapeBoundingBoxQuery.EncodedRectangleencodedRectangleprivate Rectanglerectangle-
Fields inherited from class org.apache.lucene.document.ShapeQuery
field, queryRelation
-
-
Constructor Summary
Constructors Constructor Description LatLonShapeBoundingBoxQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Rectangle rectangle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanequalsTo(java.lang.Object o)class specific equals checkinthashCode()Override and implement query hash code properly in a subclass.protected booleanqueryContains(byte[] t, ShapeField.DecodedTriangle scratchTriangle)returns true if the provided triangle is within the queryprotected booleanqueryIntersects(byte[] t, ShapeField.DecodedTriangle scratchTriangle)returns true if the provided triangle intersects the queryprotected Component2D.WithinRelationqueryWithin(byte[] t, ShapeField.DecodedTriangle scratchTriangle)Return the within relationship between the query and the indexed shape.protected PointValues.RelationrelateRangeBBoxToQuery(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 seeShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)andShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)java.lang.StringtoString(java.lang.String field)Prints a query to a string, withfieldassumed to be the default field and omitted.-
Methods inherited from class org.apache.lucene.document.ShapeQuery
createWeight, equals, getField, getQueryRelation, queryMatches, relateRangeToQuery, visit
-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Field Detail
-
rectangle
private final Rectangle rectangle
-
encodedRectangle
private final LatLonShapeBoundingBoxQuery.EncodedRectangle encodedRectangle
-
-
Constructor Detail
-
LatLonShapeBoundingBoxQuery
LatLonShapeBoundingBoxQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, Rectangle rectangle)
-
-
Method Detail
-
relateRangeBBoxToQuery
protected PointValues.Relation relateRangeBBoxToQuery(int minXOffset, int minYOffset, byte[] minTriangle, int maxXOffset, int maxYOffset, byte[] maxTriangle)
Description copied from class:ShapeQueryrelates an internal node (bounding box of a range of triangles) to the target query Note: logic is specific to query type seeShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)andShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)- Specified by:
relateRangeBBoxToQueryin classShapeQuery
-
queryIntersects
protected boolean queryIntersects(byte[] t, ShapeField.DecodedTriangle scratchTriangle)Description copied from class:ShapeQueryreturns true if the provided triangle intersects the query- Specified by:
queryIntersectsin classShapeQuery
-
queryContains
protected boolean queryContains(byte[] t, ShapeField.DecodedTriangle scratchTriangle)Description copied from class:ShapeQueryreturns true if the provided triangle is within the query- Specified by:
queryContainsin classShapeQuery
-
queryWithin
protected Component2D.WithinRelation queryWithin(byte[] t, ShapeField.DecodedTriangle scratchTriangle)
Description copied from class:ShapeQueryReturn the within relationship between the query and the indexed shape.- Specified by:
queryWithinin classShapeQuery
-
equalsTo
protected boolean equalsTo(java.lang.Object o)
Description copied from class:ShapeQueryclass specific equals check- Overrides:
equalsToin classShapeQuery
-
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 classShapeQuery- See Also:
Query.equals(Object)
-
-