- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.document.SpatialQuery
-
- org.apache.lucene.document.LatLonPointQuery
-
final class LatLonPointQuery extends SpatialQuery
Finds all previously indexed geo points that comply the givenShapeField.QueryRelation
with the specified array ofLatLonGeometry
.The field must be indexed using one or more
LatLonPoint
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 LatLonPointQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries)
Creates a query that matches all indexed shapes to the provided array ofLatLonGeometry
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Component2D
createComponent2D(Geometry... geometries)
protected boolean
equalsTo(java.lang.Object o)
class specific equals checkprotected SpatialQuery.SpatialVisitor
getSpatialVisitor()
returns the spatial visitor to be used for this query.int
hashCode()
Override and implement query hash code properly in a subclass.java.lang.String
toString(java.lang.String field)
Prints a query to a string, withfield
assumed to be the default field and omitted.private static LatLonGeometry[]
validateGeometry(ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries)
-
Methods inherited from class org.apache.lucene.document.SpatialQuery
createWeight, equals, getField, getQueryRelation, getScorerSupplier, queryIsCacheable, transposeRelation, visit
-
-
-
-
Constructor Detail
-
LatLonPointQuery
LatLonPointQuery(java.lang.String field, ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries)
Creates a query that matches all indexed shapes to the provided array ofLatLonGeometry
-
-
Method Detail
-
validateGeometry
private static LatLonGeometry[] validateGeometry(ShapeField.QueryRelation queryRelation, LatLonGeometry... geometries)
-
createComponent2D
protected Component2D createComponent2D(Geometry... geometries)
- Specified by:
createComponent2D
in classSpatialQuery
-
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
-
toString
public java.lang.String toString(java.lang.String field)
Description copied from class:Query
Prints a query to a string, withfield
assumed to be the default field and omitted.- Overrides:
toString
in classSpatialQuery
-
equalsTo
protected boolean equalsTo(java.lang.Object o)
Description copied from class:SpatialQuery
class specific equals check- Overrides:
equalsTo
in classSpatialQuery
-
hashCode
public int hashCode()
Description copied from class:Query
Override and implement query hash code properly in a subclass. This is required so thatQueryCache
works properly.- Overrides:
hashCode
in classSpatialQuery
- See Also:
Query.equals(Object)
-
-