原文地址: https://www.elastic.co/guide/en/elasticsearch/guide/current/geopoints.html, 版权归 www.elastic.co 所有
WARNING: The 2.x versions of Elasticsearch have passed their EOL dates. If you are running a 2.x version, we strongly advise you to upgrade.
This documentation is no longer maintained and may be removed. For the latest information, see the current Elasticsearch documentation.
Geo Pointsedit
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" } } } } }