Link Search Menu Expand Document Documentation Menu

This is an earlier version of the OpenSearch documentation. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

Geographic queries

Geographic queries let you search fields that contain points and shapes on a map or coordinate plane. Geographic queries work on geospatial data and searches geographic fields.

Geographic queries

Geographic queries search for documents that contain geospatial geometries. These geometries can be specified in geo_point fields, which support points on a map, and geo_shape fields, which support points, lines, circles, and polygons.

OpenSearch provides the following geographic query types:

  • Geo-bounding box queries: Return documents with geopoint field values that are within a bounding box.
  • Geodistance queries return documents with geopoints that are within a specified distance from the provided geopoint.
  • Geopolygon queries return documents with geopoints that are within a polygon.
  • Geoshape queries return documents that contain:
    • geoshapes and geopoints that have one of four spatial relations to the provided shape: INTERSECTS, DISJOINT, WITHIN, or CONTAINS.
    • geopoints that intersect the provided shape.

Related articles

350 characters left

Have a question? .

Want to contribute? or .