java.lang.Object
org.elasticsearch.lucene.spatial.XYQueriesUtils
Utility methods that generate a lucene query for a spatial query over a cartesian field.*
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.lucene.search.Query
toXYPointQuery
(Geometry geometry, String fieldName, ShapeRelation relation, boolean indexed, boolean hasDocValues) Generates a lucene query for a field that has been previously indexed usingXYPoint
.It expects either {code indexed} orhas docValues
to be true or or both to be true.static org.apache.lucene.search.Query
toXYShapeQuery
(Geometry geometry, String fieldName, ShapeRelation relation, boolean indexed, boolean hasDocValues) Generates a lucene query for a field that has been previously indexed usingXYShape
.It expects either {code indexed} orhas docValues
to be true or both to be true.
-
Constructor Details
-
XYQueriesUtils
public XYQueriesUtils()
-
-
Method Details
-
toXYPointQuery
public static org.apache.lucene.search.Query toXYPointQuery(Geometry geometry, String fieldName, ShapeRelation relation, boolean indexed, boolean hasDocValues) Generates a lucene query for a field that has been previously indexed usingXYPoint
.It expects either {code indexed} orhas docValues
to be true or or both to be true. Note that lucene only supports intersects spatial relation so we build other relations using just that one. -
toXYShapeQuery
public static org.apache.lucene.search.Query toXYShapeQuery(Geometry geometry, String fieldName, ShapeRelation relation, boolean indexed, boolean hasDocValues) Generates a lucene query for a field that has been previously indexed usingXYShape
.It expects either {code indexed} orhas docValues
to be true or both to be true.
-