public class XYShapeBoundingBoxQuery extends ShapeQuery
The field must be indexed using
XYShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.XYPolygon)
added per document.
Modifier and Type | Field and Description |
---|---|
private XYRectangle |
rectangle |
(package private) Component2D |
rectangle2D |
field, queryRelation
Constructor and Description |
---|
XYShapeBoundingBoxQuery(java.lang.String field,
ShapeField.QueryRelation queryRelation,
double minX,
double maxX,
double minY,
double maxY) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Override and implement query instance equivalence properly in a subclass.
|
protected boolean |
equalsTo(java.lang.Object o) |
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
protected boolean |
queryMatches(byte[] t,
ShapeField.DecodedTriangle scratchTriangle,
ShapeField.QueryRelation queryRelation)
returns true if the query matches the encoded triangle
|
protected Component2D.WithinRelation |
queryWithin(byte[] t,
ShapeField.DecodedTriangle scratchTriangle)
Return the within relationship between the query and the indexed shape.
|
protected PointValues.Relation |
relateRangeBBoxToQuery(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
see
ShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation) and ShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation) |
java.lang.String |
toString(java.lang.String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
createWeight, getField, getQueryRelation, relateRangeToQuery, visit
classHash, rewrite, sameClassAs, toString
final Component2D rectangle2D
private final XYRectangle rectangle
public XYShapeBoundingBoxQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, double minX, double maxX, double minY, double maxY)
protected PointValues.Relation relateRangeBBoxToQuery(int minXOffset, int minYOffset, byte[] minTriangle, int maxXOffset, int maxYOffset, byte[] maxTriangle)
ShapeQuery
ShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)
and ShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)
relateRangeBBoxToQuery
in class ShapeQuery
protected boolean queryMatches(byte[] t, ShapeField.DecodedTriangle scratchTriangle, ShapeField.QueryRelation queryRelation)
queryMatches
in class ShapeQuery
protected Component2D.WithinRelation queryWithin(byte[] t, ShapeField.DecodedTriangle scratchTriangle)
ShapeQuery
queryWithin
in class ShapeQuery
public boolean equals(java.lang.Object o)
Query
QueryCache
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 ShapeQuery
Query.sameClassAs(Object)
,
Query.classHash()
protected boolean equalsTo(java.lang.Object o)
equalsTo
in class ShapeQuery
public int hashCode()
Query
QueryCache
works properly.hashCode
in class ShapeQuery
Query.equals(Object)