[DOCS] Make geoshape docs less memory hungry (#31014)
Reduces shape size and precision in geo shape mapper examples to reduce amount of memory required to check docs. Fixes #23836
This commit is contained in:
parent
6fb1e4a759
commit
7376c35960
|
@ -175,7 +175,7 @@ PUT /example
|
||||||
"location": {
|
"location": {
|
||||||
"type": "geo_shape",
|
"type": "geo_shape",
|
||||||
"tree": "quadtree",
|
"tree": "quadtree",
|
||||||
"precision": "1m"
|
"precision": "100m"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,8 +186,8 @@ PUT /example
|
||||||
// TESTSETUP
|
// TESTSETUP
|
||||||
|
|
||||||
This mapping maps the location field to the geo_shape type using the
|
This mapping maps the location field to the geo_shape type using the
|
||||||
quad_tree implementation and a precision of 1m. Elasticsearch translates
|
quad_tree implementation and a precision of 100m. Elasticsearch translates
|
||||||
this into a tree_levels setting of 26.
|
this into a tree_levels setting of 20.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
===== Performance considerations
|
===== Performance considerations
|
||||||
|
@ -364,7 +364,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
The following is an example of a Polygon with a hole in WKT:
|
The following is an example of a Polygon with a hole in WKT:
|
||||||
|
|
||||||
|
@ -376,7 +375,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
*IMPORTANT NOTE:* WKT does not enforce a specific order for vertices thus
|
*IMPORTANT NOTE:* WKT does not enforce a specific order for vertices thus
|
||||||
ambiguous polygons around the dateline and poles are possible.
|
ambiguous polygons around the dateline and poles are possible.
|
||||||
|
@ -411,7 +409,7 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
// TEST[catch:/mapper_parsing_exception/]
|
||||||
|
|
||||||
An `orientation` parameter can be defined when setting the geo_shape mapping (see <<geo-shape-mapping-options>>). This will define vertex
|
An `orientation` parameter can be defined when setting the geo_shape mapping (see <<geo-shape-mapping-options>>). This will define vertex
|
||||||
order for the coordinate list on the mapped geo_shape field. It can also be overridden on each document. The following is an example for
|
order for the coordinate list on the mapped geo_shape field. It can also be overridden on each document. The following is an example for
|
||||||
|
@ -425,14 +423,12 @@ POST /example/doc
|
||||||
"type" : "polygon",
|
"type" : "polygon",
|
||||||
"orientation" : "clockwise",
|
"orientation" : "clockwise",
|
||||||
"coordinates" : [
|
"coordinates" : [
|
||||||
[ [-177.0, 10.0], [176.0, 15.0], [172.0, 0.0], [176.0, -15.0], [-177.0, -10.0], [-177.0, 10.0] ],
|
[ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]
|
||||||
[ [178.2, 8.2], [-178.8, 8.2], [-180.8, -8.8], [178.2, 8.8] ]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
===== http://www.geojson.org/geojson-spec.html#id5[MultiPoint]
|
===== http://www.geojson.org/geojson-spec.html#id5[MultiPoint]
|
||||||
|
@ -484,7 +480,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
The following is an example of a list of WKT linestrings:
|
The following is an example of a list of WKT linestrings:
|
||||||
|
|
||||||
|
@ -496,7 +491,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
===== http://www.geojson.org/geojson-spec.html#id7[MultiPolygon]
|
===== http://www.geojson.org/geojson-spec.html#id7[MultiPolygon]
|
||||||
|
@ -518,7 +512,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
The following is an example of a list of WKT polygons (second polygon contains a hole):
|
The following is an example of a list of WKT polygons (second polygon contains a hole):
|
||||||
|
|
||||||
|
@ -530,7 +523,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
===== http://geojson.org/geojson-spec.html#geometrycollection[Geometry Collection]
|
===== http://geojson.org/geojson-spec.html#geometrycollection[Geometry Collection]
|
||||||
|
@ -557,7 +549,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
The following is an example of a collection of WKT geometry objects:
|
The following is an example of a collection of WKT geometry objects:
|
||||||
|
|
||||||
|
@ -569,7 +560,6 @@ POST /example/doc
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
|
@ -585,12 +575,11 @@ POST /example/doc
|
||||||
{
|
{
|
||||||
"location" : {
|
"location" : {
|
||||||
"type" : "envelope",
|
"type" : "envelope",
|
||||||
"coordinates" : [ [-45.0, 45.0], [45.0, -45.0] ]
|
"coordinates" : [ [100.0, 1.0], [101.0, 0.0] ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
The following is an example of an envelope using the WKT BBOX format:
|
The following is an example of an envelope using the WKT BBOX format:
|
||||||
|
|
||||||
|
@ -600,11 +589,10 @@ The following is an example of an envelope using the WKT BBOX format:
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
POST /example/doc
|
POST /example/doc
|
||||||
{
|
{
|
||||||
"location" : "BBOX (-45.0, 45.0, 45.0, -45.0)"
|
"location" : "BBOX (100.0, 102.0, 2.0, 0.0)"
|
||||||
}
|
}
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
// CONSOLE
|
// CONSOLE
|
||||||
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
|
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
===== Circle
|
===== Circle
|
||||||
|
@ -618,7 +606,7 @@ POST /example/doc
|
||||||
{
|
{
|
||||||
"location" : {
|
"location" : {
|
||||||
"type" : "circle",
|
"type" : "circle",
|
||||||
"coordinates" : [-45.0, 45.0],
|
"coordinates" : [101.0, 1.0],
|
||||||
"radius" : "100m"
|
"radius" : "100m"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue