카테고리 없음
[통사론] ElasticSearch 1.0의 집계 범위 쿼리에서 doc_count를 사용하는 방법
행복을전해요
2021. 1. 26. 22:54
이 문제로 https://github.com/elasticsearch/elasticsearch/issues/4983?_pjax=%23js-repo-pjax-container 도 업데이트했습니다 .
집계 프레임 워크에 대한 사소한 향상처럼 보이지만 (하지만) 정말 유용 할 것입니다.
-------------------아마도 다음과 같이 할 수 있습니다.
{
"aggs" : {
"tally" : {
"sum" : {
"script": "1"
}
},
"aggs" : {
//refer to tally here as the value would be same as doc_count
}
}
}
출처
https://stackoverflow.com/questions/22029796