Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\es::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/es.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\es::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/es.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\es::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
地理坐标点 | Elasticsearch: 权威指南 | Elastic - 互联网笔记

略微加速

Elasticsearch权威指南 - 互联网笔记

地理坐标点 | Elasticsearch: 权威指南 | Elastic

2025-04-18

地理坐标点编辑

地理坐标点 是指地球表面可以用经纬度描述的一个点。 地理坐标点可以用来计算两个坐标间的距离,还可以判断一个坐标是否在一个区域中,或在聚合中。

地理坐标点不能被动态映射 dynamic mapping)自动检测,而是需要显式声明对应字段类型为 geo-point

PUT /attractions
{
  "mappings": {
    "restaurant": {
      "properties": {
        "name": {
          "type": "string"
        },
        "location": {
          "type": "geo_point"
        }
      }
    }
  }
}

官方地址:https://www.elastic.co/guide/cn/elasticsearch/guide/current/geopoints.html

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3