栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

ES接数据时索引类型对不上报错:failed to find geo

ES接数据时索引类型对不上报错:failed to find geo

 错误:

{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to find geo_point field [geoPointFiled]","index_uuid":"kSLBp959TPGbNiTf3c0vAg","index":"map_data_address"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"map_data_address","node":"HgPYdB43RZWjoMzFsAccmw","reason":{"type":"query_shard_exception","reason":"failed to find geo_point field [geoPointFiled]","index_uuid":"kSLBp959TPGbNiTf3c0vAg","index":"map_data_address"}}]},"status":400}

解决办法:

@ESMapping(datatype = DataType.geo_point_type)
    private EsGeoPoint geoPointFiled;

我这里是解析第三方数据然后接到我们的es库中

我这里就是接的数据中geoPointFiled是geo_point格式的而es库不是,所以导致数据接不进来报错,这种情况只能重建索引,把原来的删掉重新建一个废话不多说,上代码:

PUT 索引名
{
  "mappings": {
      "properties": {
        "字段名": {
          "type":   "geo_point"
            }
    }
  }
}

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/679955.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号