public class XYShapeBoundingBoxQuery extends Query
The field must be indexed using
XYShape.createIndexableFields(java.lang.String, org.apache.lucene.geo.XYPolygon)
added per document.
Constructor and Description |
---|
XYShapeBoundingBoxQuery(String field,
ShapeField.QueryRelation queryRelation,
double minX,
double maxX,
double minY,
double maxY) |
Modifier and Type | Method and Description |
---|---|
Weight |
createWeight(IndexSearcher searcher,
ScoreMode scoreMode,
float boost) |
boolean |
equals(Object o) |
protected boolean |
equalsTo(Object o) |
String |
getField()
returns the field name
|
ShapeField.QueryRelation |
getQueryRelation()
returns the query relation
|
int |
hashCode() |
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) |
protected PointValues.Relation |
relateRangeToQuery(byte[] minTriangle,
byte[] maxTriangle,
ShapeField.QueryRelation queryRelation)
relates a range of triangles (internal node) to the query
|
String |
toString(String field) |
void |
visit(QueryVisitor visitor) |
classHash, rewrite, sameClassAs, toString
public XYShapeBoundingBoxQuery(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.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)
and ShapeQuery.relateRangeToQuery(byte[], byte[], org.apache.lucene.document.ShapeField.QueryRelation)
protected boolean queryMatches(byte[] t, ShapeField.DecodedTriangle scratchTriangle, ShapeField.QueryRelation queryRelation)
protected Component2D.WithinRelation queryWithin(byte[] t, ShapeField.DecodedTriangle scratchTriangle)
public boolean equals(Object o)
protected boolean equalsTo(Object o)
public int hashCode()
protected PointValues.Relation relateRangeToQuery(byte[] minTriangle, byte[] maxTriangle, ShapeField.QueryRelation queryRelation)
public void visit(QueryVisitor visitor)
public final Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
createWeight
in class Query
public String getField()
public ShapeField.QueryRelation getQueryRelation()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.