xy point field type
Create a mapping with an xy point field type:
copy
xy points can be indexed in the following formats:
- An object with x and y coordinates
{
"point": {
"x": 0.5,
}
}
- A string in the “
x
,y
” format
copy
- An array in the [
x
,y
] format
{
"point": [0.5, 4.5]
}
copy
copy
- GeoJSON format
PUT testindex1/_doc/5
{
"point" : {
"type" : "Point",
"coordinates" : [0.5, 4.5]
}
In all xy point formats, the coordinates must be specified in the x, y
order.
The following table lists the parameters accepted by xy point field types. All parameters are optional.