This information applies to version 2.x of Elasticsearch. For the
most up to date information, see the current version of the
Elasticsearch Reference.
A geo-point is a single latitude/longitude point on the Earth’s surface. Geo-points can be used to calculate distance from a point, to determine whether a point falls within a bounding box, or in aggregations.
Geo-points cannot be automatically detected with
dynamic mapping. Instead, geo_point fields should be
mapped explicitly:
PUT /attractions
{
"mappings": {
"restaurant": {
"properties": {
"name": {
"type": "string"
},
"location": {
"type": "geo_point"
}
}
}
}
}