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