0
是否可以在geo_point字段上使用最大聚合或最小聚合?在geo_point字段上使用最大/最小聚合类型
我试图max
直接到我的坐标属性,它的类型是geo_point
{
"size": 0,
"aggs" : {
"max_lat" : { "max" : { "field" : "coordinate" } }
}
}
这可以理解返回ClassCastException
,所以我想直接的coordinate
的lat
或lon
场运行查询其是双重类型的。
{
"size": 0,
"aggs" : {
"max_lat" : { "max" : { "field" : "coordinate.lat" } },
"max_lon" : { "max" : { "field" : "coordinate.lon" } }
}
}
现在我没有收到ClassCastExcxeption和查询返回200但是聚合为空。
响应:
{
"aggregations": {
"max_lat": {
"value": null
},
"max_lon": {
"value": null
}
}
}
使用elasticsearch V1.7