您可以按照以下方式使其按预期方式工作:
{
"size": 0,
"query": {
"match_all": {}
},
"aggregations": {
"selected_types": {
"filters": {
"filters": {
"good_restaurants": {
"match": {
"rating": "CONTINENTAL"
}
},
"continental_restaurants": {
"match": {
"type": "CONTINENTAL"
}
},
"restaurants_in_new_york": {
"match": {
"type": "CONTINENTAL"
}
}
}
}
}
}
}