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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 using XYPoint.It expects either {code indexed} or has 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 using XYShape.It expects either {code indexed} or has docValues to be true or both to be true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 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, boolean indexed, boolean hasDocValues)
      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.