|
5 | 5 | ++++
|
6 | 6 |
|
7 | 7 | The `geo_shape` data type facilitates the indexing of and searching
|
8 |
| -with arbitrary geoshapes such as rectangles and polygons. It should be |
9 |
| -used when either the data being indexed or the queries being executed |
10 |
| -contain shapes other than just points. |
| 8 | +with arbitrary geoshapes such as rectangles, lines and polygons. If the data being |
| 9 | +indexed contains shapes other than just points, it is necessary to use this mapping. |
| 10 | +If the data contains only points, it can be indexed as either |
| 11 | +<<geo-point,`geo_point`>> or `geo_shape`. |
11 | 12 |
|
12 |
| -You can query documents using this type using |
13 |
| -a <<query-dsl-geo-shape-query,`geo_shape` query>>. |
| 13 | +Documents using this type can be used: |
| 14 | + |
| 15 | +* to find geoshapes within: |
| 16 | +** a <<query-dsl-geo-bounding-box-query,bounding box>> |
| 17 | +** a certain <<query-dsl-geo-distance-query,distance>> of a central point |
| 18 | +** a <<query-dsl-geo-shape-query,`geo_shape` query>> (for example, intersecting polygons). |
| 19 | +* to aggregate documents by geographic grids: |
| 20 | +** either <<search-aggregations-bucket-geohashgrid-aggregation,`geo_hash`>> |
| 21 | +** or <<search-aggregations-bucket-geotilegrid-aggregation,`geo_tile`>>. |
| 22 | + |
| 23 | +Grid aggregations over `geo_hex` grids are not supported for `geo_shape` fields. |
14 | 24 |
|
15 | 25 | [[geo-shape-mapping-options]]
|
16 | 26 | [discrete]
|
17 | 27 | ==== Mapping Options
|
18 | 28 |
|
19 |
| -The `geo_shape` mapping maps GeoJSON geometry objects to the `geo_shape` |
| 29 | +The `geo_shape` mapping maps GeoJSON or WKT geometry objects to the `geo_shape` |
20 | 30 | type. To enable it, users must explicitly map fields to the `geo_shape`
|
21 | 31 | type.
|
22 | 32 |
|
@@ -258,7 +268,7 @@ POST /example/_doc
|
258 | 268 |
|
259 | 269 | A polygon's orientation indicates the order of its vertices: `RIGHT`
|
260 | 270 | (counterclockwise) or `LEFT` (clockwise). {es} uses a polygon’s orientation to
|
261 |
| -determine if it crosses the international dateline (+/-180° longitude). |
| 271 | +determine if it crosses the international dateline (+/-180° longitude). |
262 | 272 |
|
263 | 273 | You can set a default orientation for WKT polygons using the
|
264 | 274 | <<geo-shape-mapping-options,`orientation` mapping parameter>>. This is because
|
|
0 commit comments