@@ -642,23 +642,46 @@ POST /example/_doc
642
642
===== Circle
643
643
644
644
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.
649
654
650
655
[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
653
676
{
654
677
"location" : {
655
678
"type" : "circle",
656
679
"coordinates" : [101.0, 1.0],
657
680
"radius" : "100m"
658
681
}
659
682
}
660
- --------------------------------------------------
661
- // TEST[skip:not supported in default ]
683
+ ----
684
+ // TEST[continued ]
662
685
663
686
Note: The inner `radius` field is required. If not specified, then
664
687
the units of the `radius` will default to `METERS`.
0 commit comments