Is there any performance difference between the below two quires assuming "type" is a keyword?
{
"size": 0,
"aggs": {
"t_shirts": {
"filter": {
"term": {
"type": "t-shirt"
}
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}
}
}
{
"size": 0,
"query": {
"bool": {
"must": [
{
"term": {
"type": {
"value": "t-shirt"
}
}
}
]
}
},
"aggs": {
"avg_price": {
"avg": {
"field": "price"
}
}
}
}