logstash 如何通过HTTPS摄取动态识别点?

zbq4xfa0  于 2022-12-09  发布在  Logstash
关注(0)|答案(1)|浏览(147)

我们正在发送https请求以获取数据。如何设置请求的格式,以便Elastic将“geo_point”字段动态Map为type:point而不是text或number?谢谢!

curl -X POST "https://in-https.URL" -H 'Content-Type: application/json' -d'
{
    "geo_point": -71.34, 41.12
}
'
os8fio9y

os8fio9y1#

不支持geo_point动态Map-https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-field-mapping.html
要对geo_point字段进行索引,请在原始请求之前加上请求to _mapping,以将geo_point字段添加到索引Map-https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html

相关问题