我在弹性搜索中有像这样的数据
"id": "edff12sd3"
"main_array": [
{
"id": "2308",
"name": "Grey Area",
"location": {
"lat": 28.5696577,
"lon": 77.3229933
}
}
,
{
"id": "2274",
"name": "Tribute to The Beatles by Atul Ahuja- Live Music",
"location": {
"lat": 29.5696577,
"lon": 77.3229933
}
}
现在我想为location字段设置geo_point。我试过这种方式
{
"mappings": {
"search_data": {
"properties": {
"main_array.location": {
"type": "geo_point"
}
}
}
}
}
但它会引发我的错误
"type": "mapper_parsing_exception",
"reason": "Field name [main_array.location] cannot contain '.'"
你能帮帮我吗?感谢
答案 0 :(得分:2)