0
私の文書の平均年齢フィールドを求め、パーセンタイル機能を使ってオンラインで例を見つけました。elasticsearchの中央値要素を見つける
curl localhost:9200/residents/_search -d '{"size": 0,
"aggs" : {
"percentile" : {
"percentile" : {
"field" : "age" ,
"percents" : [50]}}}}'
が、私は受信エラー
{
"error" : {
"root_cause" : [
{
"type" : "unknown_named_object_exception",
"reason" : "Unknown BaseAggregationBuilder [percentile]",
"line" : 6,
"col" : 25
}
],
"type" : "unknown_named_object_exception",
"reason" : "Unknown BaseAggregationBuilder [percentile]",
"line" : 6,
"col" : 25
},
"status" : 400
}