Skip to content

Commit 247627e

Browse files
authored
[DOCS] Improve docs for geo_shape field type's circle type (#69285) (#69363)
1 parent 1b87ddd commit 247627e

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

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

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -642,23 +642,46 @@ POST /example/_doc
642642
===== Circle
643643

644644
Elasticsearch supports a `circle` type, which consists of a center
645-
point with a radius. Note that this circle representation can only
646-
be indexed when using the `recursive` Prefix Tree strategy. For
647-
the default <<geoshape-indexing-approach>> circles should be approximated using
648-
a `POLYGON`.
645+
point with a radius.
646+
647+
IMPORTANT: You cannot index the `circle` type using the default
648+
<<geoshape-indexing-approach,BKD tree indexing approach>>. Instead, use a
649+
<<ingest-circle-processor,circle ingest processor>> to approximate the circle as
650+
a <<geo-polygon,`polygon`>>.
651+
652+
The `circle` type requires a `geo_shape` field mapping with the deprecated
653+
`recursive` Prefix Tree strategy.
649654

650655
[source,console]
651-
--------------------------------------------------
652-
POST /example/_doc
656+
----
657+
PUT /circle-example
658+
{
659+
"mappings": {
660+
"properties": {
661+
"location": {
662+
"type": "geo_shape",
663+
"strategy": "recursive"
664+
}
665+
}
666+
}
667+
}
668+
----
669+
// TEST[warning:Parameter [strategy] is deprecated and will be removed in a future version]
670+
671+
The following request indexes a `circle` geo-shape.
672+
673+
[source,console]
674+
----
675+
POST /circle-example/_doc
653676
{
654677
"location" : {
655678
"type" : "circle",
656679
"coordinates" : [101.0, 1.0],
657680
"radius" : "100m"
658681
}
659682
}
660-
--------------------------------------------------
661-
// TEST[skip:not supported in default]
683+
----
684+
// TEST[continued]
662685

663686
Note: The inner `radius` field is required. If not specified, then
664687
the units of the `radius` will default to `METERS`.

0 commit comments

Comments
 (0)