Skip to content

Commit 7376c35

Browse files
authored
[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
1 parent 6fb1e4a commit 7376c35

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

docs/reference/mapping/types/geo-shape.asciidoc

+8-20
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ PUT /example
175175
"location": {
176176
"type": "geo_shape",
177177
"tree": "quadtree",
178-
"precision": "1m"
178+
"precision": "100m"
179179
}
180180
}
181181
}
@@ -186,8 +186,8 @@ PUT /example
186186
// TESTSETUP
187187

188188
This mapping maps the location field to the geo_shape type using the
189-
quad_tree implementation and a precision of 1m. Elasticsearch translates
190-
this into a tree_levels setting of 26.
189+
quad_tree implementation and a precision of 100m. Elasticsearch translates
190+
this into a tree_levels setting of 20.
191191

192192
[float]
193193
===== Performance considerations
@@ -364,7 +364,6 @@ POST /example/doc
364364
}
365365
--------------------------------------------------
366366
// CONSOLE
367-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
368367

369368
The following is an example of a Polygon with a hole in WKT:
370369

@@ -376,7 +375,6 @@ POST /example/doc
376375
}
377376
--------------------------------------------------
378377
// CONSOLE
379-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
380378

381379
*IMPORTANT NOTE:* WKT does not enforce a specific order for vertices thus
382380
ambiguous polygons around the dateline and poles are possible.
@@ -411,7 +409,7 @@ POST /example/doc
411409
}
412410
--------------------------------------------------
413411
// CONSOLE
414-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
412+
// TEST[catch:/mapper_parsing_exception/]
415413

416414
An `orientation` parameter can be defined when setting the geo_shape mapping (see <<geo-shape-mapping-options>>). This will define vertex
417415
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
425423
"type" : "polygon",
426424
"orientation" : "clockwise",
427425
"coordinates" : [
428-
[ [-177.0, 10.0], [176.0, 15.0], [172.0, 0.0], [176.0, -15.0], [-177.0, -10.0], [-177.0, 10.0] ],
429-
[ [178.2, 8.2], [-178.8, 8.2], [-180.8, -8.8], [178.2, 8.8] ]
426+
[ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]
430427
]
431428
}
432429
}
433430
--------------------------------------------------
434431
// CONSOLE
435-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
436432

437433
[float]
438434
===== http://www.geojson.org/geojson-spec.html#id5[MultiPoint]
@@ -484,7 +480,6 @@ POST /example/doc
484480
}
485481
--------------------------------------------------
486482
// CONSOLE
487-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
488483

489484
The following is an example of a list of WKT linestrings:
490485

@@ -496,7 +491,6 @@ POST /example/doc
496491
}
497492
--------------------------------------------------
498493
// CONSOLE
499-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
500494

501495
[float]
502496
===== http://www.geojson.org/geojson-spec.html#id7[MultiPolygon]
@@ -518,7 +512,6 @@ POST /example/doc
518512
}
519513
--------------------------------------------------
520514
// CONSOLE
521-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
522515

523516
The following is an example of a list of WKT polygons (second polygon contains a hole):
524517

@@ -530,7 +523,6 @@ POST /example/doc
530523
}
531524
--------------------------------------------------
532525
// CONSOLE
533-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
534526

535527
[float]
536528
===== http://geojson.org/geojson-spec.html#geometrycollection[Geometry Collection]
@@ -557,7 +549,6 @@ POST /example/doc
557549
}
558550
--------------------------------------------------
559551
// CONSOLE
560-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
561552

562553
The following is an example of a collection of WKT geometry objects:
563554

@@ -569,7 +560,6 @@ POST /example/doc
569560
}
570561
--------------------------------------------------
571562
// CONSOLE
572-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
573563

574564

575565
[float]
@@ -585,12 +575,11 @@ POST /example/doc
585575
{
586576
"location" : {
587577
"type" : "envelope",
588-
"coordinates" : [ [-45.0, 45.0], [45.0, -45.0] ]
578+
"coordinates" : [ [100.0, 1.0], [101.0, 0.0] ]
589579
}
590580
}
591581
--------------------------------------------------
592582
// CONSOLE
593-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
594583

595584
The following is an example of an envelope using the WKT BBOX format:
596585

@@ -600,11 +589,10 @@ The following is an example of an envelope using the WKT BBOX format:
600589
--------------------------------------------------
601590
POST /example/doc
602591
{
603-
"location" : "BBOX (-45.0, 45.0, 45.0, -45.0)"
592+
"location" : "BBOX (100.0, 102.0, 2.0, 0.0)"
604593
}
605594
--------------------------------------------------
606595
// CONSOLE
607-
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
608596

609597
[float]
610598
===== Circle
@@ -618,7 +606,7 @@ POST /example/doc
618606
{
619607
"location" : {
620608
"type" : "circle",
621-
"coordinates" : [-45.0, 45.0],
609+
"coordinates" : [101.0, 1.0],
622610
"radius" : "100m"
623611
}
624612
}

0 commit comments

Comments
 (0)