Geo Distance Query(地理距离查询)
PUT /my_locations
{
"mappings": {
"location": {
"properties": {
"pin": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}
}
}
PUT /my_locations/location/1
{
"pin" : {
"location" : {
"lat" : 40.12,
"lon" : -71.34
}
}
}Accepted Formats (接受格式)
Lat Lon As Properties (Lat Lon作为属性)
Lat Lon As Array (Lat Lon作为阵列)
Lat Lon As String(Lat Lon作为字符串)
Geohash(地理散列)
Options(选项)
geo_point Type(geo_point类型)
Multi Location Per Document(每个文档的多个位置)
Ignore Unmapped(忽略未映射)
Last updated