Class XYQueriesUtils

java.lang.Object
org.elasticsearch.lucene.spatial.XYQueriesUtils

public class XYQueriesUtils extends Object
Utility methods that generate a lucene query for a spatial query over a cartesian field.*
  • Constructor Details

    • XYQueriesUtils

      public XYQueriesUtils()
  • Method Details

    • toXYPointQuery

      public static org.apache.lucene.search.Query toXYPointQuery(Geometry geometry, String fieldName, ShapeRelation relation, IndexType indexType)
      Generates a lucene query for a field that has been previously indexed using XYPoint.It expects either {code indexed} or has 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, IndexType indexType)
      Generates a lucene query for a field that has been previously indexed using XYShape.It expects either {code indexed} or has docValues to be true or both to be true.