GET indexName/_search?pretty
{
"size": 0,
"query":{
"bool":{
"must":[
{
"term":{
"fieldName":"***"
}
}
],
"must_not": [
{
"term": {
"fieldName": "***"
}
}
]
}
},
"aggs": {
"group_by_tags": {
"terms": { "field": "fieldName.keyword" ,"size": 200}
}
}
}
fieldName:替换成相应的字段