2
我試圖在Elastic Search上的_score字段上運行一個聚合查詢,但沒有結果。似乎不可能使用_score字段,也許是因爲它不是文檔的一個字段。我如何彙總_score?如何彙總_score
這是我的查詢:
{
"_source": false, "explain": false, "from": 0, "size": 0,
"aggs" : {
"score_ranges" : {
"range" : {
"field" : "_score",
"ranges" : [
{ "to" : 50 },
{ "from" : 50, "to" : 75 },
{ "from" : 75 }
]
}
}
},
"query": {
"function_score": {
"query": {
"match_all": { }
}
}
}
}