집계가있는 탄성 검색 쿼리를 실행 중이며,이를 100 레코드로 제한하려고합니다. 문제는 "크기"필터를 적용하더라도 집계에 아무런 영향이 없다는 것입니다. 당신이 집합이 수행 될 기록 제한에 영향이 없다시피탄성 검색 집계 된 레코드 제한
GET /index_name/index_type/_search
{
"size":0,
"query":{
"match_all": {}
},
"aggregations":{
"courier_code" : {
"terms" : {
"field" : "city"
}
}
}}
결과 집합
{
"took": 7,
"timed_out": false,
"_shards": {
"total": 10,
"successful": 10,
"failed": 0
},
"hits": {
"total": 10867,
"max_score": 0,
"hits": []
},
"aggregations": {
"city": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "Mumbai",
"doc_count": 2706
},
{
"key": "London",
"doc_count": 2700
},
{
"key": "Patna",
"doc_count": 1800
},
{
"key": "New York",
"doc_count": 1800
},
{
"key": "Melbourne",
"doc_count": 900
}
]
}
}
}
이다. Elastic Search의 상위 100 개 레코드에 대한 필터가 있습니까?