某个字段分组,排序、分页
GET mcs_monitor_decrpt_apply/_search
{
"from": 0,
"size": 0,
"query": {
"bool": {
"adjust_pure_negative": true,
"boost": 1
}
},
"_source": {
"includes": [],
"excludes": []
},
"aggregations": {
"fileApplyInfos": {
"terms": {
"field": "employeeCode",
"size": 2,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_term": "asc"
}
]
},
"aggregations": {
"hit": {
"top_hits": {
"from": 0,
"size": 2,
"version": false,
"explain": false,
"_source": {
"includes": [
"serialNumber",
"employeeCode",
"userName",
"approveStatus"
],
"excludes": []
},
"sort": [
{
"approveStatus": {
"order": "desc"
}
}
]
}
}
}
}
}
}