OpenSearch/docs/reference
Igor Motov 70ea3cf847
SQL: Add initial geo support (#42031) (#42135)
Adds an initial limited implementations of geo features to SQL. This implementation is based on the [OpenGIS® Implementation Standard for Geographic information - Simple feature access](http://www.opengeospatial.org/standards/sfs), which is the current standard for GIS system implementation. This effort is concentrate on SQL option AKA ISO 19125-2. 

Queries that are supported as a result of this initial implementation

Metadata commands

- `DESCRIBE table`  - returns the correct column types `GEOMETRY` for geo shapes and geo points.
- `SHOW FUNCTIONS` - returns a list that includes supported `ST_` functions
- `SYS TYPES` and `SYS COLUMNS` display correct types `GEO_SHAPE` and `GEO_POINT` for geo shapes and geo points accordingly. 

Returning geoshapes and geopoints from elasticsearch

- `SELECT geom FROM table` - returns the geoshapes and geo_points as libs/geo objects in JDBC or as WKT strings in console.
- `SELECT ST_AsWKT(geom) FROM table;` and `SELECT ST_AsText(geom) FROM table;`- returns the geoshapes ang geopoints in their WKT representation;

Using geopoints to elasticsearch

- The following functions will be supported for geopoints in queries, sorting and aggregations: `ST_GeomFromText`, `ST_X`, `ST_Y`, `ST_Z`, `ST_GeometryType`, and `ST_Distance`. In most cases when used in queries, sorting and aggregations, these function are translated into script. These functions can be used in the SELECT clause for both geopoints and geoshapes. 
- `SELECT * FROM table WHERE ST_Distance(ST_GeomFromText(POINT(1 2), point) < 10;` - returns all records for which `point` is located within 10m from the `POINT(1 2)`. In this case the WHERE clause is translated into a range query.

Limitations:

Geoshapes cannot be used in queries, sorting and aggregations as part of this initial effort. In order to fully take advantage of geoshapes we would need to have access to geoshape doc values, which is coming in #37206. `ST_Z` cannot be used on geopoints in queries, sorting and aggregations since we don't store altitude in geo_point doc values.

Relates to #29872
Backport of #42031
2019-05-14 18:57:12 -05:00
..
aggregations [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
analysis Improvements to docs around multiplexer and synonyms (#41645) 2019-05-07 09:10:14 +01:00
cat [DOCS] match description with example in allocation docs page (#39606) 2019-03-29 17:01:14 +01:00
ccr Remove mention of soft deletes from getting started (#40668) 2019-03-31 22:11:09 -04:00
cluster Remove reference to fs.data.spins in docs 2019-05-10 11:49:01 -04:00
commands [DOCS] Escape depcreated[] note for Asciidoctor migration (#41608) 2019-04-30 15:19:43 -04:00
data-frames/apis [ML DataFrame] Update Preview docs for source config change (#41761) 2019-05-03 16:34:10 +01:00
docs [DOCS] Fix typo referring to multi search API 2019-05-07 09:08:36 -04:00
graph Remove X-Pack centric graph endpoints (#36010) 2018-11-29 07:09:37 -05:00
how-to [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
ilm Add note about ILM action ordering (#41771) 2019-05-08 16:42:50 -06:00
images SQL: Update JDBC class name in client screenshots 2019-03-27 12:21:53 +02:00
index-modules Update docs for the DFR similarity (#40579) 2019-03-29 10:44:24 +01:00
indices [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
ingest Add HTML strip processor (#41888) 2019-05-09 13:01:07 +02:00
licensing [DOCS] Remind users to include @ symbol when applying license file (#40688) 2019-04-04 11:50:20 -04:00
mapping Clarify that path_match also considers object fields. (#41658) 2019-05-06 14:48:08 -07:00
migration Reject port ranges in `discovery.seed_hosts` (#41905) 2019-05-08 08:34:32 +01:00
ml [DOCS] Allow attribute substitution in titleabbrevs for Asciidoctor migration (#41574) 2019-04-30 13:46:45 -04:00
modules [DOCS] Rewrite 'rewrite' parameter docs (#42018) 2019-05-13 08:43:12 -04:00
monitoring [DOCS] Remove soft line breaks (+) for Asciidoctor migration (#41600) 2019-04-30 16:22:50 -04:00
query-dsl [DOCS] Rewrite 'rewrite' parameter docs (#42018) 2019-05-13 08:43:12 -04:00
release-notes [DOCS] Adds placeholder for 7.1.0 release notes (#42024) 2019-05-09 13:17:04 -04:00
rest-api [ML DataFrame] Update Preview docs for source config change (#41761) 2019-05-03 16:34:10 +01:00
rollup [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
search [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
security Fix discovery config in docker-compose docs (#41753) 2019-05-03 10:46:48 +02:00
settings Clarify settings in default SSL/TLS (#41930) 2019-05-08 16:07:21 +10:00
setup Recognise direct buffers in heap size docs (#42070) 2019-05-10 13:56:47 +01:00
sql SQL: Add initial geo support (#42031) (#42135) 2019-05-14 18:57:12 -05:00
testing Uppercasing some docs section title (#37781) 2019-01-24 22:54:55 +01:00
upgrade [DOCS] Fix delimited blocks for Asciidoctor migration (#41583) 2019-04-26 11:43:41 -04:00
aggregations.asciidoc [Docs] Update aggregations.asciidoc (#29265) 2018-03-28 15:01:45 +02:00
analysis.asciidoc Remove more include_type_name and types from docs (#37601) 2019-01-18 14:11:18 +01:00
api-conventions.asciidoc Fixed very small typo in date (#41398) 2019-04-25 13:05:35 -04:00
cat.asciidoc Minor docs cleanup (#37595) 2019-01-18 09:28:48 +01:00
cluster.asciidoc [DOCS] Adds overview and API ref for cluster voting configurations (#36954) 2019-01-07 09:11:14 -08:00
docs.asciidoc Document Seq No powered optimistic concurrency control (#37284) 2019-01-11 07:59:15 -08:00
frozen-indices.asciidoc [DOCS] Adds anchors and x-pack icons for frozen indices 2019-03-26 15:53:18 -07:00
getting-started.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
glossary.asciidoc Update glossary.asciidoc (#41364) 2019-04-19 10:25:07 +02:00
gs-index.asciidoc [DOCS] Adding index file for GS "mini book". 2017-07-18 13:44:08 -07:00
how-to.asciidoc Correct grammar in list in how-to docs 2017-01-17 20:57:22 -05:00
index-modules.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
index.asciidoc [DOCS] Removes X-Pack settings section (#39870) 2019-03-14 14:37:37 -07:00
index.x.asciidoc [DOCS] Removes redundant index.asciidoc files (#30707) 2018-05-18 11:05:40 -07:00
indices.asciidoc add split index reference in indices.asciidoc 2017-11-06 12:55:41 +01:00
ingest.asciidoc ingest: document index.default_pipeline (#34500) 2018-10-23 13:49:25 -05:00
mapping.asciidoc Add a soft limit to the field name length (#40309) 2019-03-26 17:58:32 +01:00
modules.asciidoc [DOCS] Replaces CCS terms with attributes (#40076) 2019-03-15 07:57:51 -07:00
query-dsl.asciidoc Update query-dsl.asciidoc (#27669) 2017-12-11 18:06:08 +01:00
redirects.asciidoc [DOCS] Explicitly set section IDs for Asciidoctor migration (#41547) 2019-04-25 15:07:52 -04:00
release-notes.asciidoc [DOCS] Adds placeholder for 7.1.0 release notes (#42024) 2019-05-09 13:17:04 -04:00
search.asciidoc Make sure to use the type _doc in the REST documentation. (#34662) 2018-10-22 11:54:04 -07:00
setup.asciidoc Clean up docs regarding recommended JVM (#41356) 2019-04-18 14:17:48 -06:00
testing.asciidoc [Docs] Unify spelling of Elasticsearch (#27567) 2017-11-29 09:44:25 +01:00
upgrade.asciidoc [Docs] Remove extraneous text (#40914) 2019-04-05 15:32:25 -07:00