Hi everyone. I have this aggregation to count the inputs in some field:
"aggs": {
"prodt": {
"filter": {
"bool": {}
},
"aggs": {
"prodt": {
"terms": {
"field": "product_type",
"size": 500
}
}
}
}
Which will return something like this
"buckets": [
{
"key": "movie",
"docCount": 7817
},
{
"key": "book",
"docCount": 2628
},
{
"key": "other",
"docCount": 12628
}
]
Is there a way to do the same thing, but with actual values? For example, count only the "movie" and the "book" in field "product_type"? And will it be more efficient?