所以我创建了2个桶,Sale和Rent,我想计算它们的比例,但我无法这样做。
{
"size":"0",
"query":{
"filtered":{
"filter":{
"term":{"area":"Ireland"}
}
}
},
"aggs":{
"Sale":{"filter":{"term":{"type":"sale"}}, "aggs":{"price":{"percentiles":{"field":"price", "percents":[75]}}}},
"Rent":{"filter":{"term":{"type":"rent"}}, "aggs":{"price":{"percentiles":{"field":"price", "percents":[75]}}}}
}}
感谢帮助。谢谢!