From f730d3f7fac30bb72094fa4813480b71bcbbfd27 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Fri, 14 Oct 2022 09:18:20 -0400 Subject: [PATCH 1/9] Adds xy point and shape documentation Signed-off-by: Fanit Kolchina --- _opensearch/query-dsl/xy.md | 184 +++++++++ _opensearch/supported-field-types/xy-point.md | 85 ++++ _opensearch/supported-field-types/xy-shape.md | 379 ++++++++++++++++++ _opensearch/supported-field-types/xy.md | 26 ++ 4 files changed, 674 insertions(+) create mode 100644 _opensearch/query-dsl/xy.md create mode 100644 _opensearch/supported-field-types/xy-point.md create mode 100644 _opensearch/supported-field-types/xy-shape.md create mode 100644 _opensearch/supported-field-types/xy.md diff --git a/_opensearch/query-dsl/xy.md b/_opensearch/query-dsl/xy.md new file mode 100644 index 0000000000..3868a4e562 --- /dev/null +++ b/_opensearch/query-dsl/xy.md @@ -0,0 +1,184 @@ +--- +layout: default +title: xy queries +parent: Query DSL +nav_order: 65 +--- + +# xy queries + +To search for documents that contain xy point and xy shape fields, use an xy query. + +## Spatial relations + +When you provide an xy shape to the xy query, the xy fields are matched using following spatial relationships to the provided shape: + +Relation | Description | Supporting xy Field Type +:--- | :--- | :--- | :--- +`INTERSECTS` | (Default) Matches documents whose xy point or xy shape intersects the shape provided in the query. | `xy_point`, `xy_shape` +`DISJOINT` | Matches documents whose xy shape does not intersect with the shape provided in the query. | `xy_shape` +`WITHIN` | Matches documents whose xy shape is completely within the shape provided in the query. | `xy_shape` +`CONTAINS` | Matches documents whose xy shape completely contains the shape provided in the query. | `xy_shape` + +## Defining the shape in an xy query + +You can define the shape in an xy query either by providing a new shape definition at query time, or by referencing the name of a shape pre-indexed in another index. + +### Using a new shape definition + +To provide a new shape to an xy query, define it in the `xy_shape` field. + +The following example illustrates searching for documents that match an xy shape defined at query time. + +First, create an index and map the `point` field as an `xy_point` and the `rectangle` field as an `xy_shape`: + +```json +PUT testindex1 +{ + "mappings": { + "properties": { + "point": { + "type": "xy_point" + }, + "rectangle": { + "type": "xy_shape" + } + } + } +} +``` + +Index a document with an xy point and a document with an xy shape: + +```json +PUT testindex1/_doc/1 +{ + "point": { + "x": 0.5, + "y": 4.5 + } +} + +PUT testindex1/_doc/2 +{ + "location" : { + "type" : "polygon", + "coordinates" : [ + [[2.5, 6.0], + [1.5, 2.0], + [3.5, 3.5], + [0.5, 4.5]] + ] + } +} +``` + +Define an [`envelope`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape#envelope)—a bounding rectangle in the `[[minX, maxY], [maxX, minY]]` format. Search for documents with xy points or shapes that intersect that envelope: + +```json +GET testindex1/_search +{ + "query": { + "xy_shape": { + "geometry": { + "query_shape": { + "type": "envelope", + "coordinates": [ [ 0.0, 6.0], [ 4.0, 2.0] ] + }, + "relation": "intersect" + } + } + } +} + +The response contains both documents: + +```json +``` + +### Using a pre-indexed shape definition + +When constructing an xy query, you can also reference the name of a shape pre-indexed in another index. Using this method, you can define an xy shape at index time and refer to it by name, providing the following parameters in the `indexed_shape` object: + +Parameter | Description +:--- | :--- +index | The name of the index that contains the pre-indexed shape. +id | The document ID of the document that contains the pre-indexed shape. +path | The field name of the field that contains the pre-indexed shape as a path. + +The following example illustrates referencing the name of a shape pre-indexed in another index. + +First, create an index `pre-indexed-shapes` and map the `geometry` field for this index as an `xy_shape`: + +```json +PUT pre-indexed-shapes +{ + "mappings": { + "properties": { + "geometry": { + "type": "xy_shape" + } + } + } +} +``` + +Index an envelope and name it `rectangle`: + +```json +PUT testindex1/_doc/rectangle +{ + "geometry": { + "type": "envelope", + "coordinates" : [ [ 0.0, 6.0], [ 4.0, 2.0] ] + } +} +``` + +Index a document with an xy point and a document with an xy shape into the index `testindex1`: + +```json +PUT testindex1/_doc/1 +{ + "point": { + "x": 0.5, + "y": 4.5 + } +} + +PUT testindex1/_doc/2 +{ + "location" : { + "type" : "polygon", + "coordinates" : [ + [[2.5, 6.0], + [1.5, 2.0], + [3.5, 3.5], + [0.5, 4.5]] + ] + } +} +``` + +Search for documents with shapes that intersect `rectangle` in the index `testindex1` using a filter: + +```json +GET testindex1/_search +{ + "query": { + "bool": { + "filter": { + "xy_shape": { + "geometry": { + "indexed_shape": { + "index": "pre-indexed-shapes", + "id": "rectangle", + "path": "geometry" + } + } + } + } + } + } +} +``` \ No newline at end of file diff --git a/_opensearch/supported-field-types/xy-point.md b/_opensearch/supported-field-types/xy-point.md new file mode 100644 index 0000000000..a3b3f66219 --- /dev/null +++ b/_opensearch/supported-field-types/xy-point.md @@ -0,0 +1,85 @@ +--- +layout: default +title: xy point +nav_order: 58 +has_children: false +parent: Cartesian field types +grand_parent: Supported field types +--- + +# xy point field type + +An xy point field type contains a point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. It is based on the Lucene [XYPoint](https://lucene.apache.org/core/8_5_1/core/org/apache/lucene/geo/XYPoint.html) field type. The xy point field type is similar to the [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) field type, but does not have the range limitations of geopoint. The coordinates of an xy point are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). + +## Example + +Create a mapping with an xy point field type: + +```json +PUT testindex1 +{ + "mappings": { + "properties": { + "point": { + "type": "xy_point" + } + } + } +} +``` + +## Formats + +xy points can be indexed in the following formats: + +- An object with an x and y coordinate + +```json +PUT testindex1/_doc/1 +{ + "point": { + "x": 0.5, + "y": 4.5 + } +} +``` + +- A string in the "`x`,`y`" format + +```json +PUT testindex1/_doc/2 +{ + "point": "0.5,4.5" +} +``` + +- An array in the [`x`, `y`] format + +```json +PUT testindex1/_doc/3 +{ + "point": [0.5, 4.5] +} +``` + +- A [Well-Known Text](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) POINT in the "POINT(`x` `y`)" format + +```json +PUT testindex1/_doc/4 +{ + "point": "POINT (0.5 4.5)" +} +``` + +In all xy point formats the coordinates must be specified in the `x, y` order. +{: .note} + +## Parameters + +The following table lists the parameters accepted by xy point field types. All parameters are optional. + +Parameter | Description +:--- | :--- +`ignore_malformed` | A Boolean value that specifies to ignore malformed values and not to throw an exception. Default is `false`. +`ignore_z_value` | Specific to points with three coordinates. If `ignore_z_value` is `true`, the third coordinate is not indexed but is still stored in the _source field. If `ignore_z_value` is `false`, an exception is thrown. +[`null_value`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/index#null-value) | A value to be used in place of `null`. Must be of the same type as the field. If this parameter is not specified, the field is treated as missing when its value is `null`. Default is `null`. \ No newline at end of file diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md new file mode 100644 index 0000000000..c0ec23524e --- /dev/null +++ b/_opensearch/supported-field-types/xy-shape.md @@ -0,0 +1,379 @@ +--- +layout: default +title: xy shape +nav_order: 59 +has_children: false +parent: Cartesian field types +grand_parent: Supported field types +--- + +# xy shape field type + +An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/8_3_0/sandbox/org/apache/lucene/document/XYShape.html) field type. To index a geoshape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. + +The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). + +## Example + +Create a mapping with an xy shape field type: + +```json +PUT testindex +{ + "mappings": { + "properties": { + "location": { + "type": "xy_shape" + } + } + } +} +``` + +## Formats + +xy shapes can be indexed in the following formats: + +- [GeoJSON](https://geojson.org/) +- [Well-Known Text (WKT)](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) + +In both GeoJSON and WKT, the coordinates must be specified in the `x, y` order within coordinate arrays. +{: .note} + +## xy shape types + +The following table describes the possible xy shape types and their relationship to the GeoJSON and WKT types. + +OpenSearch type | GeoJSON type | WKT type | Description +:--- | :--- | :--- | :--- +[`point`](#point) | Point | POINT | A geographic point specified by the x and y coordinates. +[`linestring`](#line-string) | LineString | LINESTRING | A line specified by two or more points. May be a straight line or a path of connected line segments. +[`polygon`](#polygon) | Polygon | POLYGON | A polygon specified by a list of vertices in coordinate form. The polygon must be closed, meaning the last point must be the same as the first point. Therefore, to create an n-gon, n+1 vertices are required. The minimum number of vertices is four, which creates a triangle. +[`multipoint`](#multi-point) | MultiPoint | MULTIPOINT | An array of discrete related points that are not connected. +[`multilinestring`](#multiline-string) | MultiLineString | MULTILINESTRING | An array of linestrings. +[`multipolygon`](#multi-polygon) | MultiPolygon | MULTIPOLYGON | An array of polygons. +[`geometrycollection`](#geometry-collection) | GeometryCollection | GEOMETRYCOLLECTION | A collection of xy shapes that may be of different types. +[`envelope`](#envelope) | N/A | BBOX | A bounding rectangle specified by top-left and bottom-right vertices. + +## Point + +A point is specified by a single pair of coordinates. + +Index a point in GeoJSON format: + +```json +PUT testindex/_doc/1 +{ + "location" : { + "type" : "point", + "coordinates" : [0.5, 4.5] + } +} +``` + +Index a point in WKT format: + +```json +PUT testindex/_doc/1 +{ + "location" : "POINT (0.5 4.5)" +} +``` + +## Line string + +A line string is a line specified by two or more points. If the points are collinear, the line string is a straight line. Otherwise, the line string represents a path made of line segments. + +Index a line string in GeoJSON format: + +```json +PUT testindex/_doc/2 +{ + "location" : { + "type" : "linestring", + "coordinates" : [[0.5, 4.5], [-1.5, 2.3]] + } +} +``` + +Index a line string in WKT format: + +```json +PUT testindex/_doc/2 +{ + "location" : "LINESTRING (0.5 4.5, -1.5 2.3)" +} +``` + +## Polygon + +A polygon is specified by a list of vertices in coordinate form. The polygon must be closed, meaning the last point must be the same as the first point. In the following example, a triangle is created using four points. + +GeoJSON requires that you list the vertices of the polygon counterclockwise. WKT does not impose a specific order on vertices. +{: .note} + +Index a polygon (triangle) in GeoJSON format: + +```json +PUT testindex/_doc/3 +{ + "location" : { + "type" : "polygon", + "coordinates" : [ + [[0.5, 4.5], + [2.5, 6.0], + [1.5, 2.0], + [0.5, 4.5]] + ] + } +} +``` + +Index a polygon (triangle) in WKT format: + +```json +PUT testindex/_doc/3 +{ + "location" : "POLYGON ((0.5 4.5, 2.5 6.0, 1.5 2.0, 0.5 4.5))" +} +``` + +The polygon may have holes inside. In this case, the `coordinates` field will contain multiple arrays. The first array represents the outer polygon, and each subsequent array represents a hole. Holes are represented as polygons and specified as arrays of coordinates. + +GeoJSON requires that you list the vertices of the polygon counterclockwise and the vertices of the hole clockwise. WKT does not impose a specific order on vertices. +{: .note} + +Index a polygon (triangle) with a triangular hole in GeoJSON format: + +```json +PUT testindex/_doc/4 +{ + "location" : { + "type" : "polygon", + "coordinates" : [ + [[0.5, 4.5], + [2.5, 6.0], + [1.5, 2.0], + [0.5, 4.5]], + + [[1.0, 4.5], + [1.5, 4.5], + [1.5, 4.0], + [1.0, 4.5]] + ] + } +} +``` + +Index a polygon (triangle) with a triangular hole in WKT format: + +```json +PUT testindex/_doc/4 +{ + "location" : "POLYGON ((0.5 4.5, 2.5 6.0, 1.5 2.0, 0.5 4.5), (1.0 4.5, 1.5 4.5, 1.5 4.0, 1.0 4.5))" +} +``` +By default, the vertices of the polygon are traversed in a counterclockwise order. You can define an [`orientation`](#parameters) parameter to specify the vertex traversal order at mapping time: + +```json +PUT testindex +{ + "mappings": { + "properties": { + "location": { + "type": "xy_shape", + "orientation" : "left" + } + } + } +} +``` + +Subsequently indexed documents can override the `orientation` setting: + +```json +PUT testindex/_doc/3 +{ + "location" : { + "type" : "polygon", + "orientation" : "cw", + "coordinates" : [ + [[0.5, 4.5], + [2.5, 6.0], + [1.5, 2.0], + [0.5, 4.5]] + ] + } +} +``` + +## Multi point + +A multi point is an array of discrete related points that are not connected. + +Index a multi point in GeoJSON format: + +```json +PUT testindex/_doc/6 +{ + "location" : { + "type" : "multipoint", + "coordinates" : [ + [0.5, 4.5], + [2.5, 6.0] + ] + } +} +``` + +Index a multi point in WKT format: + +```json +PUT testindex/_doc/6 +{ + "location" : "MULTIPOINT (0.5 4.5, 2.5 6.0)" +} +``` + +## Multiline string + +A multiline string is an array of line strings. + +Index a line string in GeoJSON format: + +```json +PUT testindex/_doc/2 +{ + "location" : { + "type" : "multilinestring", + "coordinates" : [ + [[0.5, 4.5], [2.5, 6.0]], + [[1.5, 2.0], [3.5, 3.5]] + ] + } +} +``` + +Index a line string in WKT format: + +```json +PUT testindex/_doc/2 +{ + "location" : "MULTILINESTRING ((0.5 4.5, 2.5 6.0), (1.5 2.0, 3.5 3.5))" +} +``` + +## Multi polygon + +A multi polygon is an array of polygons. In this example, the first polygon contains a hole, and the second does not. + +Index a multi polygon in GeoJSON format: + +```json +PUT testindex/_doc/4 +{ + "location" : { + "type" : "multipolygon", + "coordinates" : [ + [ + [[0.5, 4.5], + [2.5, 6.0], + [1.5, 2.0], + [0.5, 4.5]], + + [[1.0, 4.5], + [1.5, 4.5], + [1.5, 4.0], + [1.0, 4.5]] + ], + [ + [[2.0, 0.0], + [1.0, 2.0], + [3.0, 1.0], + [2.0, 0.0]] + ] + ] + } +} +``` + +Index a multi polygon in WKT format: + +```json +PUT testindex/_doc/4 +{ + "location" : "MULTIPOLYGON (((0.5 4.5, 2.5 6.0, 1.5 2.0, 0.5 4.5), (1.0 4.5, 1.5 4.5, 1.5 4.0, 1.0 4.5)), ((2.0 0.0, 1.0 2.0, 3.0 1.0, 2.0 0.0)))" +} +``` + +## Geometry collection + +A geometry collection is a collection of xy shapes that may be of different types. + +Index a geometry collection in GeoJSON format: + +```json +PUT testindex/_doc/7 +{ + "location" : { + "type": "geometrycollection", + "geometries": [ + { + "type": "point", + "coordinates": [0.5, 4.5] + }, + { + "type": "linestring", + "coordinates": [[2.5, 6.0], [1.5, 2.0]] + } + ] + } +} +``` + +Index a geometry collection in WKT format: + +```json +PUT testindex/_doc/7 +{ + "location" : "GEOMETRYCOLLECTION (POINT (0.5 4.5), LINESTRING(2.5 6.0, 1.5 2.0))" +} +``` + +## Envelope + +An envelope is a bounding rectangle specified by top-left and bottom-right vertices. The GeoJSON format is `[[minX, maxY], [maxX, minY]]`. + +Index an envelope in GeoJSON format: + +```json +PUT testindex/_doc/2 +{ + "location" : { + "type" : "envelope", + "coordinates" : [[3.0, 2.0], [6.0, 0.0]] + } +} +``` + +In WKT format, use `BBOX (minX, maxX, maxY, minY)`. + +Index an envelope in WKT BBOX format: + +```json +PUT testindex/_doc/8 +{ + "location" : "BBOX (3.0, 6.0, 2.0, 0.0)" +} +``` + +## Parameters + +The following table lists the parameters accepted by xy shape field types. All parameters are optional. + +Parameter | Description +:--- | :--- +`coerce` | A Boolean value that specifies whether to automatically close unclosed linear rings. Default is `false`. +`ignore_malformed` | A Boolean value that specifies to ignore malformed GeoJSON or WKT xy shapes and not to throw an exception. Default is `false` (throw an exception when xy shapes are malformed). +`ignore_z_value` | Specific to points with three coordinates. If `ignore_z_value` is `true`, the third coordinate is not indexed but is still stored in the _source field. If `ignore_z_value` is `false`, an exception is thrown. Default is `true`. +`orientation` | Specifies the traversal order of the vertices in the xy shape's list of coordinates. `orientation` takes the following values:
1. RIGHT: counterclockwise. Specify RIGHT orientation by using one of the following strings (uppercase or lowercase): `right`, `counterclockwise`, `ccw`.
2. LEFT: clockwise. Specify LEFT orientation by using one of the following strings (uppercase or lowercase): `left`, `clockwise`, `cw`. This value can be overridden by individual documents.
Default is `RIGHT`. diff --git a/_opensearch/supported-field-types/xy.md b/_opensearch/supported-field-types/xy.md new file mode 100644 index 0000000000..ab332b5ed1 --- /dev/null +++ b/_opensearch/supported-field-types/xy.md @@ -0,0 +1,26 @@ +--- +layout: default +title: Cartesian field types +nav_order: 57 +has_children: true +has_toc: false +parent: Supported field types +--- + +# Cartesian field types + +Cartesian field types facilitate indexing and searching of points and shapes in a two-dimensional Cartesian coordinate system. Cartesian field types are similar to [geographic]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geographic/) field types, except they represent points and shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. Calculating distances on a plane is more efficient than calculating distances on a sphere, so distance sorting is faster for Cartesian field types. + +Cartesian field types work well for spatial applications like virtual reality, CAD, and amusement park and sporting venue mapping. + +The coordinates for the Cartesian field types are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). + +Currently, OpenSearch supports indexing and searching cartesian field types, but not aggregations on cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). +{: .note} + +The following table lists all Cartesian field types that OpenSearch supports. + +Field data type | Description +:--- | :--- +[`xy_point`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-point/) | A point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. +[`xy_shape`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape/) | A shape, such as a polygon or a collection of xy points, in a two-dimensional Cartesian coordinate system. From 2791105f6bb8d020ee4a493617db9cb9a6e3ba06 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Fri, 14 Oct 2022 09:28:33 -0400 Subject: [PATCH 2/9] Moved the github link Signed-off-by: Fanit Kolchina --- _opensearch/supported-field-types/xy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_opensearch/supported-field-types/xy.md b/_opensearch/supported-field-types/xy.md index ab332b5ed1..cb70c7e564 100644 --- a/_opensearch/supported-field-types/xy.md +++ b/_opensearch/supported-field-types/xy.md @@ -15,12 +15,12 @@ Cartesian field types work well for spatial applications like virtual reality, C The coordinates for the Cartesian field types are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). -Currently, OpenSearch supports indexing and searching cartesian field types, but not aggregations on cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). -{: .note} - The following table lists all Cartesian field types that OpenSearch supports. Field data type | Description :--- | :--- [`xy_point`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-point/) | A point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. [`xy_shape`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape/) | A shape, such as a polygon or a collection of xy points, in a two-dimensional Cartesian coordinate system. + +Currently OpenSearch supports indexing and searching Cartesian field types, but not aggregations on Cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). +{: .note} \ No newline at end of file From c6ed43f3acbd96ec9c39a10497aedd412591e9bc Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Thu, 27 Oct 2022 11:55:43 -0400 Subject: [PATCH 3/9] Adds documentation for cartesian shapes Signed-off-by: Fanit Kolchina --- _opensearch/query-dsl/xy.md | 320 ++++++++++++++++-- _opensearch/supported-field-types/xy-point.md | 4 +- _opensearch/supported-field-types/xy-shape.md | 2 +- images/xy_query.png | Bin 0 -> 14737 bytes images/xy_query_point.png | Bin 0 -> 13201 bytes 5 files changed, 288 insertions(+), 38 deletions(-) create mode 100644 images/xy_query.png create mode 100644 images/xy_query_point.png diff --git a/_opensearch/query-dsl/xy.md b/_opensearch/query-dsl/xy.md index 3868a4e562..18c8da27e4 100644 --- a/_opensearch/query-dsl/xy.md +++ b/_opensearch/query-dsl/xy.md @@ -7,11 +7,11 @@ nav_order: 65 # xy queries -To search for documents that contain xy point and xy shape fields, use an xy query. +To search for documents that contain [xy point]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-point) and [xy shape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape) fields, use an xy query. ## Spatial relations -When you provide an xy shape to the xy query, the xy fields are matched using following spatial relationships to the provided shape: +When you provide an xy shape to the xy query, the xy fields are matched using following spatial relations to the provided shape: Relation | Description | Supporting xy Field Type :--- | :--- | :--- | :--- @@ -20,6 +20,8 @@ Relation | Description | Supporting xy Field Type `WITHIN` | Matches documents whose xy shape is completely within the shape provided in the query. | `xy_shape` `CONTAINS` | Matches documents whose xy shape completely contains the shape provided in the query. | `xy_shape` +The examples below illustrate searching for documents that contain xy shapes. To learn how to search for documents that contain xy points, see the [Querying xy points](#querying-xy-points) section. + ## Defining the shape in an xy query You can define the shape in an xy query either by providing a new shape definition at query time, or by referencing the name of a shape pre-indexed in another index. @@ -28,19 +30,16 @@ You can define the shape in an xy query either by providing a new shape definiti To provide a new shape to an xy query, define it in the `xy_shape` field. -The following example illustrates searching for documents that match an xy shape defined at query time. +The following example illustrates searching for documents with xy shapes that match an xy shape defined at query time. -First, create an index and map the `point` field as an `xy_point` and the `rectangle` field as an `xy_shape`: +First, create an index and map the `geometry` field as an `xy_shape`: ```json -PUT testindex1 +PUT testindex { "mappings": { "properties": { - "point": { - "type": "xy_point" - }, - "rectangle": { + "geometry": { "type": "xy_shape" } } @@ -48,26 +47,27 @@ PUT testindex1 } ``` -Index a document with an xy point and a document with an xy shape: +Index a document with a point and a document with a polygon: ```json -PUT testindex1/_doc/1 +PUT testindex/_doc/1 { - "point": { - "x": 0.5, - "y": 4.5 + "geometry": { + "type": "point", + "coordinates": [0.5, 3.0] } } -PUT testindex1/_doc/2 +PUT testindex/_doc/2 { - "location" : { + "geometry" : { "type" : "polygon", "coordinates" : [ - [[2.5, 6.0], + [[2.5, 6.0], + [0.5, 4.5], [1.5, 2.0], [3.5, 3.5], - [0.5, 4.5]] + [2.5, 6.0]] ] } } @@ -76,24 +76,97 @@ PUT testindex1/_doc/2 Define an [`envelope`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape#envelope)—a bounding rectangle in the `[[minX, maxY], [maxX, minY]]` format. Search for documents with xy points or shapes that intersect that envelope: ```json -GET testindex1/_search +GET testindex/_search { "query": { "xy_shape": { "geometry": { - "query_shape": { + "shape": { "type": "envelope", "coordinates": [ [ 0.0, 6.0], [ 4.0, 2.0] ] }, - "relation": "intersect" + "relation": "WITHIN" } } } } +``` + +Refer to the following image to visualize the example. Both the point and the polygon are within the bounding envelope: + +xy shape query + The response contains both documents: ```json +{ + "took" : 363, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 2, + "relation" : "eq" + }, + "max_score" : 0.0, + "hits" : [ + { + "_index" : "testindex", + "_id" : "1", + "_score" : 0.0, + "_source" : { + "geometry" : { + "type" : "point", + "coordinates" : [ + 0.5, + 3.0 + ] + } + } + }, + { + "_index" : "testindex", + "_id" : "2", + "_score" : 0.0, + "_source" : { + "geometry" : { + "type" : "polygon", + "coordinates" : [ + [ + [ + 2.5, + 6.0 + ], + [ + 0.5, + 4.5 + ], + [ + 1.5, + 2.0 + ], + [ + 3.5, + 3.5 + ], + [ + 2.5, + 6.0 + ] + ] + ] + } + } + } + ] + } +} ``` ### Using a pre-indexed shape definition @@ -106,7 +179,7 @@ index | The name of the index that contains the pre-indexed shape. id | The document ID of the document that contains the pre-indexed shape. path | The field name of the field that contains the pre-indexed shape as a path. -The following example illustrates referencing the name of a shape pre-indexed in another index. +The following example illustrates referencing the name of a shape pre-indexed in another index. In this example, the index `pre-indexed-shapes` contains the shape that defines the boundaries, and the index `testindex` contains the shapes whose locations are checked against those boundaries. First, create an index `pre-indexed-shapes` and map the `geometry` field for this index as an `xy_shape`: @@ -123,10 +196,10 @@ PUT pre-indexed-shapes } ``` -Index an envelope and name it `rectangle`: +Index an envelope that specifies the boundaries and name it `rectangle`: ```json -PUT testindex1/_doc/rectangle +PUT pre-indexed-shapes/_doc/rectangle { "geometry": { "type": "envelope", @@ -135,35 +208,36 @@ PUT testindex1/_doc/rectangle } ``` -Index a document with an xy point and a document with an xy shape into the index `testindex1`: +Index a document with a point and a document with a polygon into the index `testindex`: ```json -PUT testindex1/_doc/1 +PUT testindex/_doc/1 { - "point": { - "x": 0.5, - "y": 4.5 + "geometry": { + "type": "point", + "coordinates": [0.5, 3.0] } } -PUT testindex1/_doc/2 +PUT testindex/_doc/2 { - "location" : { + "geometry" : { "type" : "polygon", "coordinates" : [ - [[2.5, 6.0], + [[2.5, 6.0], + [0.5, 4.5], [1.5, 2.0], [3.5, 3.5], - [0.5, 4.5]] + [2.5, 6.0]] ] } } ``` -Search for documents with shapes that intersect `rectangle` in the index `testindex1` using a filter: +Search for documents with shapes that intersect `rectangle` in the index `testindex` using a filter: ```json -GET testindex1/_search +GET testindex/_search { "query": { "bool": { @@ -181,4 +255,180 @@ GET testindex1/_search } } } +``` + +The above query uses the default spatial relation `INTERSECTS` and returns both the point and the polygon: + +```json +{ + "took" : 26, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 2, + "relation" : "eq" + }, + "max_score" : 0.0, + "hits" : [ + { + "_index" : "testindex", + "_id" : "1", + "_score" : 0.0, + "_source" : { + "geometry" : { + "type" : "point", + "coordinates" : [ + 0.5, + 3.0 + ] + } + } + }, + { + "_index" : "testindex", + "_id" : "2", + "_score" : 0.0, + "_source" : { + "geometry" : { + "type" : "polygon", + "coordinates" : [ + [ + [ + 2.5, + 6.0 + ], + [ + 0.5, + 4.5 + ], + [ + 1.5, + 2.0 + ], + [ + 3.5, + 3.5 + ], + [ + 2.5, + 6.0 + ] + ] + ] + } + } + } + ] + } +} +``` + +## Querying xy points + +You can also use an xy query to search for documents that contain xy points. + +Create a mapping with `point` as `xy_point`: + +```json +PUT testindex1 +{ + "mappings": { + "properties": { + "point": { + "type": "xy_point" + } + } + } +} +``` + +Index three points: + +```json +PUT testindex1/_doc/1 +{ + "point": "1.0, 1.0" +} + +PUT testindex1/_doc/2 +{ + "point": "2.0, 0.0" +} + +PUT testindex1/_doc/3 +{ + "point": "-2.0, 2.0" +} +``` + +Search for points that lie within the circle with the center (0, 0) and radius 2: + +```json +GET testindex1/_search +{ + "query": { + "xy_shape": { + "point": { + "shape": { + "type": "circle", + "coordinates": [0.0, 0.0], + "radius": 2 + } + } + } + } +} +``` + +xy point only supports the default `INTERSECTS` spatial relation, so you don't need to provide the `relation` parameter. +{: .note} + +Refer to the following image to visualize the example. Points 1 and 2 are within the circle, and point 3 is outside the circle: + +xy point query + +The response returns documents 1 and 2: + +```json +{ + "took" : 575, + "timed_out" : false, + "_shards" : { + "total" : 1, + "successful" : 1, + "skipped" : 0, + "failed" : 0 + }, + "hits" : { + "total" : { + "value" : 2, + "relation" : "eq" + }, + "max_score" : 0.0, + "hits" : [ + { + "_index" : "testindex1", + "_id" : "1", + "_score" : 0.0, + "_source" : { + "point" : "1.0, 1.0" + } + }, + { + "_index" : "testindex1", + "_id" : "2", + "_score" : 0.0, + "_source" : { + "point" : "2.0, 0.0" + } + } + ] + } +} ``` \ No newline at end of file diff --git a/_opensearch/supported-field-types/xy-point.md b/_opensearch/supported-field-types/xy-point.md index a3b3f66219..d042985e47 100644 --- a/_opensearch/supported-field-types/xy-point.md +++ b/_opensearch/supported-field-types/xy-point.md @@ -44,12 +44,12 @@ PUT testindex1/_doc/1 } ``` -- A string in the "`x`,`y`" format +- A string in the "`x`, `y`" format ```json PUT testindex1/_doc/2 { - "point": "0.5,4.5" + "point": "0.5, 4.5" } ``` diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index c0ec23524e..8f9224b6d3 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -376,4 +376,4 @@ Parameter | Description `coerce` | A Boolean value that specifies whether to automatically close unclosed linear rings. Default is `false`. `ignore_malformed` | A Boolean value that specifies to ignore malformed GeoJSON or WKT xy shapes and not to throw an exception. Default is `false` (throw an exception when xy shapes are malformed). `ignore_z_value` | Specific to points with three coordinates. If `ignore_z_value` is `true`, the third coordinate is not indexed but is still stored in the _source field. If `ignore_z_value` is `false`, an exception is thrown. Default is `true`. -`orientation` | Specifies the traversal order of the vertices in the xy shape's list of coordinates. `orientation` takes the following values:
1. RIGHT: counterclockwise. Specify RIGHT orientation by using one of the following strings (uppercase or lowercase): `right`, `counterclockwise`, `ccw`.
2. LEFT: clockwise. Specify LEFT orientation by using one of the following strings (uppercase or lowercase): `left`, `clockwise`, `cw`. This value can be overridden by individual documents.
Default is `RIGHT`. +`orientation` | Specifies the traversal order of the vertices in the xy shape's list of coordinates. `orientation` takes the following values:
1. RIGHT: counterclockwise. Specify RIGHT orientation by using one of the following strings (uppercase or lowercase): `right`, `counterclockwise`, `ccw`.
2. LEFT: clockwise. Specify LEFT orientation by using one of the following strings (uppercase or lowercase): `left`, `clockwise`, `cw`. This value can be overridden by individual documents.
Default is `RIGHT`. \ No newline at end of file diff --git a/images/xy_query.png b/images/xy_query.png new file mode 100644 index 0000000000000000000000000000000000000000..6888c1938a2ca5a186180c75947ae54de3c3cc20 GIT binary patch literal 14737 zcma*Oby!qyzc)HVH%LmCgoCtnH%NC#2nr0{T|)^dt#pTU2n^lbjiN|OOAp;=`P4?2~+1A&B?m1L!KyiE_X zFpYJ-kquhEH&;LbqmoHVqCSx_Bt}hn+5a--6|%$h;!N#~E1N@oKhx_Mz1mK4ylHT2?v{=Ye zEO|IZq%4Dxh18`)UaORj4l#QTEcDs2MLaBU;CXN;r4&JZt|&nm$!GMCuOSFY0zC~H zj2^5JWGMqFA36*+R(uq5)XiYJib$uW7E2o&CA&YY?Cjs{-@JXRZD63t_Gjt_&zDP4 zQStcnw1C88l@7D*>9gD%7Yi*+RCJ})emd}dG*K4YzYh85P6r5rkNxm4I<)tmJ_fH} z&uSs-Rh!VMM{j%{;UP@qHu(27mJs-nF7V{B};um{9J_xSh6 zI@x@h0)?aV6Q7CRx1Srmu87p_J)FIN_mf$F{`^^ku`mf{reU_S>axC7VMhD-P5(q) zjIY>fWp%b#ebzA;aeuk;c(tAvjLaz{!dcr$Yh^7kH0}`i_>gk3-&||^4Ptv1`E`U* zOiYZA&tp1YP6H1UGnmH)J(<(Y(R@wF_v{k>05k8^YiWti5javcQZPb}?}mYqRaJ}8 zQTx3PTAKYX#~&U}>g#7iL(yU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()0aQG@~}I%3UNZiAkWLEQq8{#>qpC2 zzI)dvX!L=mP!85b)}eF7L64WGO2y2|ijm#C>(q;bBk>Z!3;W;(F+S=Mx@`2LPunGVLqpM58ev-DhXl(SG z3mAgPWy1TEm?*8hSY+7Ya)5w(Gn3iS3wBJ&({0<}pd0{(H1r=V;Xk_6c8~i%w$tn1 h<~PoTl=OjiC2#*lAnAM(0HXvc$*IX!NxupCe*li<6%GIZ literal 0 HcmV?d00001 diff --git a/images/xy_query_point.png b/images/xy_query_point.png new file mode 100644 index 0000000000000000000000000000000000000000..dbfc3a9aa0c1b1719df93986758c7728fad16f45 GIT binary patch literal 13201 zcmb8W2UJt<_AN>$h?LNqp@c4o2nvd!gpvT#6huI(ASxYcMtbidNKxrUDM}Lrq=TU- zN*9nKRUm-$Uhjv$bMF7#GwvJjJ;q=#va_?v{?_`|nrqIvBXqSzd1FK+OM_~~sFlBl?givV7b*(zx%5fPPPsgEql!D}jKw9!){BHGVq zzr^iM`PM{4QiAF#O8Q=Af6{#1?zYyiYC&6@TFH2s#KXuIspH&QVdZG05Ds%5hJ3@7 zD~}C~X-otAyi{6MjhD(U-fszkR=>uh+WN&sPr_^l4q2|MieEMSEEDnV07 z_Isnxp$Bs$ZT}GIbWz9K&73O*x^6EUU={~V>pS6E$*dih%%LuP!Svl(FeuVK0HXpa zBVUB_;#u-h!Sp7X|342dac@UYMA_d^7*be-_7BbMZjgM8nlRLMdCiSK`>rUP+gS^j zeGpAsBGo5))~PV=j!RoZ5Z+2f1Yhtl$#yus74-ld87{7i{eL=WaTkls>PZqeDJ(3M zKU|hdRDtl0TWDa-{EoK=2JD;~kNuA4{RY3k-Y&mba+EBT?u9&7gYeFO4u=())nn$q zg@v8ppD;4=W0#uy5gmQug`iJ`%Z!lBm~+lorK6_Q>rWZFvg09=>dV^;O#!3|2fYt+ zP$k^gmi-EIqb@Cu%3Mbrv-+JL8fHA3V^36Bet3Ma4SqI?W|n`J3+bf4_vOK}l?~+> zn)|p9zObpR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{XcUtpDn|Y*{t?{7Nk@qQwu^=raRzt!R=!nkgOH&FcLr+RWGNA60n#B6D;myAz``0zVfWChP^eEsuSB~eoZPoaQ z{^ymlkW26U-i#{{vq0j01R{O@`uh+Ep6?=Q6L8} z%)QKg=gl9Rmsyz=ISGA%UXEIk@yEr=QAfsk>PHHiBtTs7 z`}1*#Up1QJXAAa4sjN?ZrRQJEyVBubEAPOio*ap^Noj>;iU0kCLw&VsOIMnlo?fZJ zx}zct9A_<_*b+H933s>%6x_XI4nnk-b!qgOFB>qMoKAImeN>V(+u?3%b)^9ATTt85 z{7UUvhx1Zo!Ejwo_H7=mk<1r7wiIyYRFahcUmj5S??)N7NObs`cLgeM-r8ei=^4%I^e^(GaPtYO53@Edu`+wJ}sV literal 0 HcmV?d00001 From 56acf45e07bc5c5d124b58c6bfca1ec5655b2318 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Thu, 27 Oct 2022 16:10:21 -0400 Subject: [PATCH 4/9] Updated BBOX coordinates Signed-off-by: Fanit Kolchina --- _opensearch/supported-field-types/xy-shape.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index 8f9224b6d3..b1fb29134a 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -356,14 +356,14 @@ PUT testindex/_doc/2 } ``` -In WKT format, use `BBOX (minX, maxX, maxY, minY)`. +In WKT format, use `BBOX (minX, maxY, maxX, minY)`. Index an envelope in WKT BBOX format: ```json PUT testindex/_doc/8 { - "location" : "BBOX (3.0, 6.0, 2.0, 0.0)" + "location" : "BBOX (3.0, 2.0, 6.0, 0.0)" } ``` From 69ae4326e561067687f6da0473ad91f9e1d17dc9 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Fri, 28 Oct 2022 09:26:26 -0400 Subject: [PATCH 5/9] Fixed typo Signed-off-by: Fanit Kolchina --- _opensearch/supported-field-types/xy-shape.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index b1fb29134a..64b02f47c7 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -9,7 +9,7 @@ grand_parent: Supported field types # xy shape field type -An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/8_3_0/sandbox/org/apache/lucene/document/XYShape.html) field type. To index a geoshape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. +An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/8_3_0/sandbox/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). From e38233a544272553268406d06e4213156fb7d8b1 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Fri, 28 Oct 2022 12:10:02 -0400 Subject: [PATCH 6/9] Updated links and GeoJSON Signed-off-by: Fanit Kolchina --- _opensearch/supported-field-types/xy-point.md | 14 +++++++++++++- _opensearch/supported-field-types/xy-shape.md | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/_opensearch/supported-field-types/xy-point.md b/_opensearch/supported-field-types/xy-point.md index d042985e47..7d429f7d78 100644 --- a/_opensearch/supported-field-types/xy-point.md +++ b/_opensearch/supported-field-types/xy-point.md @@ -9,7 +9,7 @@ grand_parent: Supported field types # xy point field type -An xy point field type contains a point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. It is based on the Lucene [XYPoint](https://lucene.apache.org/core/8_5_1/core/org/apache/lucene/geo/XYPoint.html) field type. The xy point field type is similar to the [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) field type, but does not have the range limitations of geopoint. The coordinates of an xy point are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). +An xy point field type contains a point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. It is based on the Lucene [XYPoint](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/geo/XYPoint.html) field type. The xy point field type is similar to the [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) field type, but does not have the range limitations of geopoint. The coordinates of an xy point are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). ## Example @@ -71,6 +71,18 @@ PUT testindex1/_doc/4 } ``` +- GeoJSON format + +```json +PUT testindex1/_doc/5 +{ + "point" : { + "type" : "Point", + "coordinates" : [0.5, 4.5] + } +} +``` + In all xy point formats the coordinates must be specified in the `x, y` order. {: .note} diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index 64b02f47c7..0664f5d96d 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -9,7 +9,7 @@ grand_parent: Supported field types # xy shape field type -An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/8_3_0/sandbox/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. +An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). From f340f087f6aa1f5553847c07f23d35dc753299c4 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Wed, 2 Nov 2022 20:24:30 -0400 Subject: [PATCH 7/9] Incorporated doc review comments Signed-off-by: Fanit Kolchina --- _opensearch/query-dsl/xy.md | 8 ++++---- _opensearch/supported-field-types/xy-point.md | 2 +- _opensearch/supported-field-types/xy-shape.md | 6 +++--- _opensearch/supported-field-types/xy.md | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_opensearch/query-dsl/xy.md b/_opensearch/query-dsl/xy.md index 18c8da27e4..a30cd2fbe2 100644 --- a/_opensearch/query-dsl/xy.md +++ b/_opensearch/query-dsl/xy.md @@ -11,10 +11,10 @@ To search for documents that contain [xy point]({{site.url}}{{site.baseurl}}/ope ## Spatial relations -When you provide an xy shape to the xy query, the xy fields are matched using following spatial relations to the provided shape: +When you provide an xy shape to the xy query, the xy fields are matched using the following spatial relations to the provided shape: Relation | Description | Supporting xy Field Type -:--- | :--- | :--- | :--- +:--- | :--- | :--- `INTERSECTS` | (Default) Matches documents whose xy point or xy shape intersects the shape provided in the query. | `xy_point`, `xy_shape` `DISJOINT` | Matches documents whose xy shape does not intersect with the shape provided in the query. | `xy_shape` `WITHIN` | Matches documents whose xy shape is completely within the shape provided in the query. | `xy_shape` @@ -24,7 +24,7 @@ The examples below illustrate searching for documents that contain xy shapes. To ## Defining the shape in an xy query -You can define the shape in an xy query either by providing a new shape definition at query time, or by referencing the name of a shape pre-indexed in another index. +You can define the shape in an xy query either by providing a new shape definition at query time or by referencing the name of a shape pre-indexed in another index. ### Using a new shape definition @@ -367,7 +367,7 @@ PUT testindex1/_doc/3 } ``` -Search for points that lie within the circle with the center (0, 0) and radius 2: +Search for points that lie within the circle with the center (0, 0) and radius of 2: ```json GET testindex1/_search diff --git a/_opensearch/supported-field-types/xy-point.md b/_opensearch/supported-field-types/xy-point.md index 7d429f7d78..c99a454353 100644 --- a/_opensearch/supported-field-types/xy-point.md +++ b/_opensearch/supported-field-types/xy-point.md @@ -94,4 +94,4 @@ Parameter | Description :--- | :--- `ignore_malformed` | A Boolean value that specifies to ignore malformed values and not to throw an exception. Default is `false`. `ignore_z_value` | Specific to points with three coordinates. If `ignore_z_value` is `true`, the third coordinate is not indexed but is still stored in the _source field. If `ignore_z_value` is `false`, an exception is thrown. -[`null_value`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/index#null-value) | A value to be used in place of `null`. Must be of the same type as the field. If this parameter is not specified, the field is treated as missing when its value is `null`. Default is `null`. \ No newline at end of file +[`null_value`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/index#null-value) | A value to be used in place of `null`. The value must be of the same type as the field. If this parameter is not specified, the field is treated as missing when its value is `null`. Default is `null`. \ No newline at end of file diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index 0664f5d96d..56a445b0cc 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -9,9 +9,9 @@ grand_parent: Supported field types # xy shape field type -An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tesselates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. +An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tessellates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. -The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). +The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating-point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). ## Example @@ -239,7 +239,7 @@ PUT testindex/_doc/6 A multiline string is an array of line strings. -Index a line string in GeoJSON format: +Index a multiline string in GeoJSON format: ```json PUT testindex/_doc/2 diff --git a/_opensearch/supported-field-types/xy.md b/_opensearch/supported-field-types/xy.md index cb70c7e564..1060a3ece8 100644 --- a/_opensearch/supported-field-types/xy.md +++ b/_opensearch/supported-field-types/xy.md @@ -11,9 +11,9 @@ parent: Supported field types Cartesian field types facilitate indexing and searching of points and shapes in a two-dimensional Cartesian coordinate system. Cartesian field types are similar to [geographic]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geographic/) field types, except they represent points and shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. Calculating distances on a plane is more efficient than calculating distances on a sphere, so distance sorting is faster for Cartesian field types. -Cartesian field types work well for spatial applications like virtual reality, CAD, and amusement park and sporting venue mapping. +Cartesian field types work well for spatial applications like virtual reality, computer-aided design (CAD), and amusement park and sporting venue mapping. -The coordinates for the Cartesian field types are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). +The coordinates for the Cartesian field types are single-precision floating-point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). The following table lists all Cartesian field types that OpenSearch supports. From eac1d883ddcedaa588bf9debd382c5683885befd Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Wed, 2 Nov 2022 21:01:25 -0400 Subject: [PATCH 8/9] One more doc review comment Signed-off-by: Fanit Kolchina --- _opensearch/supported-field-types/xy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/supported-field-types/xy.md b/_opensearch/supported-field-types/xy.md index 1060a3ece8..aaa942b8f1 100644 --- a/_opensearch/supported-field-types/xy.md +++ b/_opensearch/supported-field-types/xy.md @@ -22,5 +22,5 @@ Field data type | Description [`xy_point`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-point/) | A point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. [`xy_shape`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape/) | A shape, such as a polygon or a collection of xy points, in a two-dimensional Cartesian coordinate system. -Currently OpenSearch supports indexing and searching Cartesian field types, but not aggregations on Cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). +Currently, OpenSearch supports indexing and searching Cartesian field types, but not aggregations on Cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). {: .note} \ No newline at end of file From e98f233c05fd2da752e6f0959ee625b4f096c348 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Thu, 3 Nov 2022 21:16:19 -0400 Subject: [PATCH 9/9] Incorporated editorial comments Signed-off-by: Fanit Kolchina --- _opensearch/query-dsl/xy.md | 14 +++---- .../supported-field-types/geo-shape.md | 36 ++++++++-------- _opensearch/supported-field-types/xy-point.md | 8 ++-- _opensearch/supported-field-types/xy-shape.md | 42 +++++++++---------- _opensearch/supported-field-types/xy.md | 6 +-- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/_opensearch/query-dsl/xy.md b/_opensearch/query-dsl/xy.md index a30cd2fbe2..bf0bb8b982 100644 --- a/_opensearch/query-dsl/xy.md +++ b/_opensearch/query-dsl/xy.md @@ -11,7 +11,7 @@ To search for documents that contain [xy point]({{site.url}}{{site.baseurl}}/ope ## Spatial relations -When you provide an xy shape to the xy query, the xy fields are matched using the following spatial relations to the provided shape: +When you provide an xy shape to the xy query, the xy fields are matched using the following spatial relations to the provided shape. Relation | Description | Supporting xy Field Type :--- | :--- | :--- @@ -20,7 +20,7 @@ Relation | Description | Supporting xy Field Type `WITHIN` | Matches documents whose xy shape is completely within the shape provided in the query. | `xy_shape` `CONTAINS` | Matches documents whose xy shape completely contains the shape provided in the query. | `xy_shape` -The examples below illustrate searching for documents that contain xy shapes. To learn how to search for documents that contain xy points, see the [Querying xy points](#querying-xy-points) section. +The following examples illustrate searching for documents that contain xy shapes. To learn how to search for documents that contain xy points, see the [Querying xy points](#querying-xy-points) section. ## Defining the shape in an xy query @@ -92,7 +92,7 @@ GET testindex/_search } ``` -Refer to the following image to visualize the example. Both the point and the polygon are within the bounding envelope: +The following image depicts the example. Both the point and the polygon are within the bounding envelope. xy shape query @@ -171,7 +171,7 @@ The response contains both documents: ### Using a pre-indexed shape definition -When constructing an xy query, you can also reference the name of a shape pre-indexed in another index. Using this method, you can define an xy shape at index time and refer to it by name, providing the following parameters in the `indexed_shape` object: +When constructing an xy query, you can also reference the name of a shape pre-indexed in another index. Using this method, you can define an xy shape at index time and refer to it by name, providing the following parameters in the `indexed_shape` object. Parameter | Description :--- | :--- @@ -257,7 +257,7 @@ GET testindex/_search } ``` -The above query uses the default spatial relation `INTERSECTS` and returns both the point and the polygon: +The preceding query uses the default spatial relation `INTERSECTS` and returns both the point and the polygon: ```json { @@ -367,7 +367,7 @@ PUT testindex1/_doc/3 } ``` -Search for points that lie within the circle with the center (0, 0) and radius of 2: +Search for points that lie within the circle with the center at (0, 0) and a radius of 2: ```json GET testindex1/_search @@ -389,7 +389,7 @@ GET testindex1/_search xy point only supports the default `INTERSECTS` spatial relation, so you don't need to provide the `relation` parameter. {: .note} -Refer to the following image to visualize the example. Points 1 and 2 are within the circle, and point 3 is outside the circle: +The following image depicts the example. Points 1 and 2 are within the circle, and point 3 is outside the circle. xy point query diff --git a/_opensearch/supported-field-types/geo-shape.md b/_opensearch/supported-field-types/geo-shape.md index 2f4c51e545..674822c726 100644 --- a/_opensearch/supported-field-types/geo-shape.md +++ b/_opensearch/supported-field-types/geo-shape.md @@ -51,7 +51,7 @@ OpenSearch type | GeoJSON type | WKT type | Description [`multilinestring`](#multiline-string) | MultiLineString | MULTILINESTRING | An array of linestrings. [`multipolygon`](#multi-polygon) | MultiPolygon | MULTIPOLYGON | An array of polygons. [`geometrycollection`](#geometry-collection) | GeometryCollection | GEOMETRYCOLLECTION | A collection of geoshapes that may be of different types. -[`envelope`](#envelope) | N/A | BBOX | A bounding rectangle specified by top-left and bottom-right vertices. +[`envelope`](#envelope) | N/A | BBOX | A bounding rectangle specified by upper-left and lower-right vertices. ## Point @@ -78,11 +78,11 @@ PUT testindex/_doc/1 } ``` -## Line string +## Linestring -A line string is a line specified by two or more points. If the points are collinear, the line string is a straight line. Otherwise, the line string represents a path made of line segments. +A linestring is a line specified by two or more points. If the points are collinear, the linestring is a straight line. Otherwise, the linestring represents a path made of line segments. -Index a line string in GeoJSON format: +Index a linestring in GeoJSON format: ```json PUT testindex/_doc/2 @@ -94,7 +94,7 @@ PUT testindex/_doc/2 } ``` -Index a line string in WKT format: +Index a linestring in WKT format: ```json PUT testindex/_doc/2 @@ -208,11 +208,11 @@ PUT testindex/_doc/3 } ``` -## Multi point +## Multipoint -A multi point is an array of discrete related points that are not connected. +A multipoint is an array of discrete related points that are not connected. -Index a multi point in GeoJSON format: +Index a multipoint in GeoJSON format: ```json PUT testindex/_doc/6 @@ -227,7 +227,7 @@ PUT testindex/_doc/6 } ``` -Index a multi point in WKT format: +Index a multipoint in WKT format: ```json PUT testindex/_doc/6 @@ -236,11 +236,11 @@ PUT testindex/_doc/6 } ``` -## Multiline string +## Multilinestring -A multiline string is an array of line strings. +A multilinestring is an array of linestrings. -Index a line string in GeoJSON format: +Index a linestring in GeoJSON format: ```json PUT testindex/_doc/2 @@ -255,7 +255,7 @@ PUT testindex/_doc/2 } ``` -Index a line string in WKT format: +Index a linestring in WKT format: ```json PUT testindex/_doc/2 @@ -264,11 +264,11 @@ PUT testindex/_doc/2 } ``` -## Multi polygon +## Multipolygon -A multi polygon is an array of polygons. In this example, the first polygon contains a hole, and the second does not. +A multipolygon is an array of polygons. In this example, the first polygon contains a hole, and the second does not. -Index a multi polygon in GeoJSON format: +Index a multipolygon in GeoJSON format: ```json PUT testindex/_doc/4 @@ -298,7 +298,7 @@ PUT testindex/_doc/4 } ``` -Index a multi polygon in WKT format: +Index a multipolygon in WKT format: ```json PUT testindex/_doc/4 @@ -336,7 +336,7 @@ PUT testindex/_doc/7 ## Envelope -An envelope is a bounding rectangle specified by top-left and bottom-right vertices. The GeoJSON format is `[[minLon, maxLat], [maxLon, minLat]]`. +An envelope is a bounding rectangle specified by upper-left and lower-right vertices. The GeoJSON format is `[[minLon, maxLat], [maxLon, minLat]]`. Index an envelope in GeoJSON format: diff --git a/_opensearch/supported-field-types/xy-point.md b/_opensearch/supported-field-types/xy-point.md index c99a454353..bcafa2c31f 100644 --- a/_opensearch/supported-field-types/xy-point.md +++ b/_opensearch/supported-field-types/xy-point.md @@ -9,7 +9,7 @@ grand_parent: Supported field types # xy point field type -An xy point field type contains a point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. It is based on the Lucene [XYPoint](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/geo/XYPoint.html) field type. The xy point field type is similar to the [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) field type, but does not have the range limitations of geopoint. The coordinates of an xy point are single-precision floating point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). +An xy point field type contains a point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. It is based on the Lucene [XYPoint](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/geo/XYPoint.html) field type. The xy point field type is similar to the [geopoint]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-point/) field type, but does not have the range limitations of geopoint. The coordinates of an xy point are single-precision floating-point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). ## Example @@ -32,7 +32,7 @@ PUT testindex1 xy points can be indexed in the following formats: -- An object with an x and y coordinate +- An object with x and y coordinates ```json PUT testindex1/_doc/1 @@ -62,7 +62,7 @@ PUT testindex1/_doc/3 } ``` -- A [Well-Known Text](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) POINT in the "POINT(`x` `y`)" format +- A [well-known text (WKT)](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) POINT in the "POINT(`x` `y`)" format ```json PUT testindex1/_doc/4 @@ -83,7 +83,7 @@ PUT testindex1/_doc/5 } ``` -In all xy point formats the coordinates must be specified in the `x, y` order. +In all xy point formats, the coordinates must be specified in the `x, y` order. {: .note} ## Parameters diff --git a/_opensearch/supported-field-types/xy-shape.md b/_opensearch/supported-field-types/xy-shape.md index 56a445b0cc..510868e72d 100644 --- a/_opensearch/supported-field-types/xy-shape.md +++ b/_opensearch/supported-field-types/xy-shape.md @@ -9,9 +9,9 @@ grand_parent: Supported field types # xy shape field type -An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tessellates the shape into a triangular mesh and stores each triangle in a BKD tree. This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. +An xy shape field type contains a shape, such as a polygon or a collection of xy points. It is based on the Lucene [XYShape](https://lucene.apache.org/core/9_3_0/core/org/apache/lucene/document/XYShape.html) field type. To index an xy shape, OpenSearch tessellates the shape into a triangular mesh and stores each triangle in a BKD tree (a set of balanced k-dimensional trees). This provides a 10-7decimal degree of precision, which represents near-perfect spatial resolution. -The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating-point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). +The xy shape field type is similar to the [geoshape]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geo-shape/) field type, but it represents shapes on the Cartesian plane, which is not based on the Earth-fixed terrestrial reference system. The coordinates of an xy shape are single-precision floating-point values. For information about the range and precision of floating-point values, see [Numeric field types]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/numeric/). ## Example @@ -35,7 +35,7 @@ PUT testindex xy shapes can be indexed in the following formats: - [GeoJSON](https://geojson.org/) -- [Well-Known Text (WKT)](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) +- [Well-known text (WKT)](https://docs.opengeospatial.org/is/12-063r5/12-063r5.html) In both GeoJSON and WKT, the coordinates must be specified in the `x, y` order within coordinate arrays. {: .note} @@ -53,7 +53,7 @@ OpenSearch type | GeoJSON type | WKT type | Description [`multilinestring`](#multiline-string) | MultiLineString | MULTILINESTRING | An array of linestrings. [`multipolygon`](#multi-polygon) | MultiPolygon | MULTIPOLYGON | An array of polygons. [`geometrycollection`](#geometry-collection) | GeometryCollection | GEOMETRYCOLLECTION | A collection of xy shapes that may be of different types. -[`envelope`](#envelope) | N/A | BBOX | A bounding rectangle specified by top-left and bottom-right vertices. +[`envelope`](#envelope) | N/A | BBOX | A bounding rectangle specified by upper-left and lower-right vertices. ## Point @@ -80,11 +80,11 @@ PUT testindex/_doc/1 } ``` -## Line string +## Linestring -A line string is a line specified by two or more points. If the points are collinear, the line string is a straight line. Otherwise, the line string represents a path made of line segments. +A linestring is a line specified by two or more points. If the points are collinear, the linestring is a straight line. Otherwise, the linestring represents a path made of line segments. -Index a line string in GeoJSON format: +Index a linestring in GeoJSON format: ```json PUT testindex/_doc/2 @@ -96,7 +96,7 @@ PUT testindex/_doc/2 } ``` -Index a line string in WKT format: +Index a linestring in WKT format: ```json PUT testindex/_doc/2 @@ -207,11 +207,11 @@ PUT testindex/_doc/3 } ``` -## Multi point +## Multipoint -A multi point is an array of discrete related points that are not connected. +A multipoint is an array of discrete related points that are not connected. -Index a multi point in GeoJSON format: +Index a multipoint in GeoJSON format: ```json PUT testindex/_doc/6 @@ -226,7 +226,7 @@ PUT testindex/_doc/6 } ``` -Index a multi point in WKT format: +Index a multipoint in WKT format: ```json PUT testindex/_doc/6 @@ -235,11 +235,11 @@ PUT testindex/_doc/6 } ``` -## Multiline string +## Multilinestring -A multiline string is an array of line strings. +A multilinestring is an array of linestrings. -Index a multiline string in GeoJSON format: +Index a multilinestring in GeoJSON format: ```json PUT testindex/_doc/2 @@ -254,7 +254,7 @@ PUT testindex/_doc/2 } ``` -Index a line string in WKT format: +Index a linestring in WKT format: ```json PUT testindex/_doc/2 @@ -263,11 +263,11 @@ PUT testindex/_doc/2 } ``` -## Multi polygon +## Multipolygon -A multi polygon is an array of polygons. In this example, the first polygon contains a hole, and the second does not. +A multipolygon is an array of polygons. In this example, the first polygon contains a hole, and the second does not. -Index a multi polygon in GeoJSON format: +Index a multipolygon in GeoJSON format: ```json PUT testindex/_doc/4 @@ -297,7 +297,7 @@ PUT testindex/_doc/4 } ``` -Index a multi polygon in WKT format: +Index a multipolygon in WKT format: ```json PUT testindex/_doc/4 @@ -342,7 +342,7 @@ PUT testindex/_doc/7 ## Envelope -An envelope is a bounding rectangle specified by top-left and bottom-right vertices. The GeoJSON format is `[[minX, maxY], [maxX, minY]]`. +An envelope is a bounding rectangle specified by upper-left and lower-right vertices. The GeoJSON format is `[[minX, maxY], [maxX, minY]]`. Index an envelope in GeoJSON format: diff --git a/_opensearch/supported-field-types/xy.md b/_opensearch/supported-field-types/xy.md index aaa942b8f1..79750eefa3 100644 --- a/_opensearch/supported-field-types/xy.md +++ b/_opensearch/supported-field-types/xy.md @@ -9,7 +9,7 @@ parent: Supported field types # Cartesian field types -Cartesian field types facilitate indexing and searching of points and shapes in a two-dimensional Cartesian coordinate system. Cartesian field types are similar to [geographic]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geographic/) field types, except they represent points and shapes on the Cartesian plane, which is not based on the earth-fixed terrestrial reference system. Calculating distances on a plane is more efficient than calculating distances on a sphere, so distance sorting is faster for Cartesian field types. +Cartesian field types facilitate indexing and searching of points and shapes in a two-dimensional Cartesian coordinate system. Cartesian field types are similar to [geographic]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/geographic/) field types, except they represent points and shapes on the Cartesian plane, which is not based on the Earth-fixed terrestrial reference system. Calculating distances on a plane is more efficient than calculating distances on a sphere, so distance sorting is faster for Cartesian field types. Cartesian field types work well for spatial applications like virtual reality, computer-aided design (CAD), and amusement park and sporting venue mapping. @@ -17,10 +17,10 @@ The coordinates for the Cartesian field types are single-precision floating-poin The following table lists all Cartesian field types that OpenSearch supports. -Field data type | Description +Field Data Type | Description :--- | :--- [`xy_point`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-point/) | A point in a two-dimensional Cartesian coordinate system, specified by x and y coordinates. [`xy_shape`]({{site.url}}{{site.baseurl}}/opensearch/supported-field-types/xy-shape/) | A shape, such as a polygon or a collection of xy points, in a two-dimensional Cartesian coordinate system. -Currently, OpenSearch supports indexing and searching Cartesian field types, but not aggregations on Cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). +Currently, OpenSearch supports indexing and searching of Cartesian field types but not aggregations on Cartesian field types. If you'd like to see aggregations implemented, open a [GitHub issue](https://github.com/opensearch-project/geospatial). {: .note} \ No newline at end of file