【发布时间】:2015-06-30 20:55:21
【问题描述】:
当我运行此脚本以将经度和纬度双精度数据连接到 geo_point 时出现错误。
ElasticsearchIllegalArgumentException[the character \'.\' is not a valid geohash character]
这是我的脚本供参考:
mappings: {
'index': {
'transform': {
'lang': 'groovy',
'script': "ctx._source['coords'] = [ctx._source['lon'],ctx._source['lat']]"
}
'properties': {
'lon': {
'type': 'double',
},
'lat': {
'type': 'string',
},
'coords': {
'type': 'geo_point',
}
}
}
}
感谢您的帮助,谢谢!
【问题讨论】: