我们正在发送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 } '
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
1条答案
按热度按时间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