Class GeoBoundingBoxQueryBuilder

All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, QueryBuilder, Rewriteable<QueryBuilder>

public class GeoBoundingBoxQueryBuilder extends AbstractQueryBuilder<GeoBoundingBoxQueryBuilder>
Creates a Lucene query that will filter for all documents that lie within the specified bounding box. This query can only operate on fields of type geo_point that have latitude and longitude enabled.
  • Field Details

    • NAME

      public static final String NAME
      See Also:
      Constant Field Values
    • DEFAULT_TYPE

      public static final GeoExecType DEFAULT_TYPE
      Default type for executing this query (memory as of this writing).
    • DEFAULT_IGNORE_UNMAPPED

      public static final boolean DEFAULT_IGNORE_UNMAPPED
      The default value for ignore_unmapped.
      See Also:
      Constant Field Values
  • Constructor Details

    • GeoBoundingBoxQueryBuilder

      public GeoBoundingBoxQueryBuilder(String fieldName)
      Create new bounding box query.
      Parameters:
      fieldName - name of index field containing geo coordinates to operate on.
    • GeoBoundingBoxQueryBuilder

      public GeoBoundingBoxQueryBuilder(StreamInput in) throws IOException
      Read from a stream.
      Throws:
      IOException
  • Method Details