diff --git a/docs/reference/mapping/types/geo-point.asciidoc b/docs/reference/mapping/types/geo-point.asciidoc index fad74ba733cc2..3f08234a98b04 100644 --- a/docs/reference/mapping/types/geo-point.asciidoc +++ b/docs/reference/mapping/types/geo-point.asciidoc @@ -8,9 +8,12 @@ Fields of type `geo_point` accept latitude-longitude pairs, which can be used: * to find geopoints within a <>, within a certain <> of a central point, - or within a <> or within a <>. -* to aggregate documents <> - or by <> from a central point. + or within a <> (for example, points in a polygon). +* to aggregate documents by <> from a central point +* to aggregate documents by geographic grids: either + <>, + <> or + <>. * to integrate distance into a document's <>. * to <> documents by distance. diff --git a/docs/reference/mapping/types/geo-shape.asciidoc b/docs/reference/mapping/types/geo-shape.asciidoc index 0eee58a1a2f90..1d1da12ccf95f 100644 --- a/docs/reference/mapping/types/geo-shape.asciidoc +++ b/docs/reference/mapping/types/geo-shape.asciidoc @@ -5,18 +5,28 @@ ++++ The `geo_shape` data type facilitates the indexing of and searching -with arbitrary geoshapes such as rectangles and polygons. It should be -used when either the data being indexed or the queries being executed -contain shapes other than just points. +with arbitrary geoshapes such as rectangles, lines and polygons. If the data being +indexed contains shapes other than just points, it is necessary to use this mapping. +If the data contains only points, it can be indexed as either +<> or `geo_shape`. -You can query documents using this type using -a <>. +Documents using this type can be used: + +* to find geoshapes within: +** a <> +** a certain <> of a central point +** a <> (for example, intersecting polygons). +* to aggregate documents by geographic grids: +** either <> +** or <>. + +Grid aggregations over `geo_hex` grids are not supported for `geo_shape` fields. [[geo-shape-mapping-options]] [discrete] ==== Mapping Options -The `geo_shape` mapping maps GeoJSON geometry objects to the `geo_shape` +The `geo_shape` mapping maps GeoJSON or WKT geometry objects to the `geo_shape` type. To enable it, users must explicitly map fields to the `geo_shape` type. @@ -258,7 +268,7 @@ POST /example/_doc A polygon's orientation indicates the order of its vertices: `RIGHT` (counterclockwise) or `LEFT` (clockwise). {es} uses a polygon’s orientation to -determine if it crosses the international dateline (+/-180° longitude). +determine if it crosses the international dateline (+/-180° longitude). You can set a default orientation for WKT polygons using the <>. This is because diff --git a/docs/reference/query-dsl/geo-shape-query.asciidoc b/docs/reference/query-dsl/geo-shape-query.asciidoc index 570a104a18480..e05cf61d0872d 100644 --- a/docs/reference/query-dsl/geo-shape-query.asciidoc +++ b/docs/reference/query-dsl/geo-shape-query.asciidoc @@ -4,16 +4,14 @@ Geoshape ++++ -Filter documents indexed using the `geo_shape` or `geo_point` type. +Filter documents indexed using either the <> or the +<> type. -Requires the <> or the -<>. - -The `geo_shape` query uses the same grid square representation as the -`geo_shape` mapping to find documents that have a shape that is related -to the query shape, using a specified spatial relationship: either intersects, +The `geo_shape` query uses the same <> as +the `geo_shape` or `geo_point` mapping to find documents that have a shape that +is related to the query shape, using a specified +<>: either intersects, contained, within or disjoint. -It will also use the same Prefix Tree configuration as defined for the field mapping. The query supports two ways of defining the query shape, either by providing a whole shape definition, or by referencing the name of a shape @@ -229,6 +227,7 @@ GET /example/_search -------------------------------------------------- +[[geo-shape-spatial-relations]] ==== Spatial relations The following is a complete list of spatial relation operators available when