下面是我记录里面地址栏的部分
"addressList" : [
{
"city" : "Göteborg",
"country" : "",
"fullAddress" : "Lilla Bommen 5A, 411 04 Göteborg, Sverige",
"location" : {
"longitudeLatitude" : {
"lat" : 57.7123,
"lon" : 11.9677
}
},
这部分的映射如下
"addressList" : {
"properties" : {
"city" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"country" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"fullAddress" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"location" : {
"properties" : {
"longitudeLatitude" : {
"properties" : {
"lat" : {
"type" : "float"
},
"lon" : {
"type" : "float"
}
}
}
}
},
"prov" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
我想根据纬度经度和距离获取记录,此时我真的不想编辑我的映射,我苦苦挣扎了数周才能获得基于经纬度的查询来获取记录